mirror of https://github.com/sveltejs/svelte
parent
c81522f992
commit
d587175852
@ -0,0 +1,18 @@
|
||||
<script>
|
||||
const dynamicRole = "button";
|
||||
</script>
|
||||
|
||||
<!-- valid -->
|
||||
<button on:click={() => {}} />
|
||||
<!-- svelte-ignore a11y-interactive-supports-focus -->
|
||||
<div on:keydown={() => {}} role="button" />
|
||||
<input type="text" on:click={() => {}} />
|
||||
<div on:copy={() => {}} />
|
||||
<a href="/foo" on:click={() => {}}>link</a>
|
||||
<div role={dynamicRole} on:click={() => {}} />
|
||||
<footer on:keydown={() => {}} />
|
||||
|
||||
<!-- invalid -->
|
||||
<div on:keydown={() => {}} />
|
||||
<!-- svelte-ignore a11y-missing-attribute -->
|
||||
<a on:mousedown={() => {}} on:mouseup={() => {}} on:copy={() => {}}>link</a>
|
@ -0,0 +1,26 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-no-static-element-interactions",
|
||||
"end": {
|
||||
"column": 29,
|
||||
"line": 16
|
||||
},
|
||||
"message": "A11y: <div> with keydown handler must have an ARIA role",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 16
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-static-element-interactions",
|
||||
"end": {
|
||||
"column": 76,
|
||||
"line": 18
|
||||
},
|
||||
"message": "A11y: <a> with mousedown, mouseup handlers must have an ARIA role",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 18
|
||||
}
|
||||
}
|
||||
]
|
Loading…
Reference in new issue