mirror of https://github.com/sveltejs/svelte
A11y rule no-onchange (#4788)
* A11y rule no-onchange * Fix message * Fix tests * Removing declarationspull/4853/head
parent
40dca5252b
commit
f7d1bf35a0
@ -0,0 +1,16 @@
|
|||||||
|
<select on:change={e => {}}>
|
||||||
|
<option>foo</option>
|
||||||
|
<option>bar</option>
|
||||||
|
</select>
|
||||||
|
<select on:change={e => {}} on:blur={e => {}}>
|
||||||
|
<option>foo</option>
|
||||||
|
<option>bar</option>
|
||||||
|
</select>
|
||||||
|
<select>
|
||||||
|
<option on:change={e => {}}>foo</option>
|
||||||
|
<option>bar</option>
|
||||||
|
</select>
|
||||||
|
<select>
|
||||||
|
<option on:change={e => {}} on:blur={e => {}}>foo</option>
|
||||||
|
<option>bar</option>
|
||||||
|
</select>
|
@ -0,0 +1,32 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"code": "a11y-no-onchange",
|
||||||
|
"end": {
|
||||||
|
"character": 88,
|
||||||
|
"column": 9,
|
||||||
|
"line": 4
|
||||||
|
},
|
||||||
|
"message": "A11y: on:blur must be used instead of on:change, unless absolutely necessary and it causes no negative consequences for keyboard only or screen reader users.",
|
||||||
|
"pos": 0,
|
||||||
|
"start": {
|
||||||
|
"character": 0,
|
||||||
|
"column": 0,
|
||||||
|
"line": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "a11y-no-onchange",
|
||||||
|
"end": {
|
||||||
|
"character": 249,
|
||||||
|
"column": 44,
|
||||||
|
"line": 10
|
||||||
|
},
|
||||||
|
"message": "A11y: on:blur must be used instead of on:change, unless absolutely necessary and it causes no negative consequences for keyboard only or screen reader users.",
|
||||||
|
"pos": 209,
|
||||||
|
"start": {
|
||||||
|
"character": 209,
|
||||||
|
"column": 4,
|
||||||
|
"line": 10
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
Loading…
Reference in new issue