mirror of https://github.com/sveltejs/svelte
parent
ea113b629a
commit
7f10d53be0
@ -0,0 +1,11 @@
|
||||
<img src='foo.jpg'>
|
||||
|
||||
<map>
|
||||
<area>
|
||||
</map>
|
||||
|
||||
<object></object>
|
||||
|
||||
<input type='image'>
|
||||
|
||||
<input type='image' alt='hey'>
|
||||
@ -0,0 +1,50 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-missing-attribute",
|
||||
"message": "A11y: <img> element should have an alt attribute",
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 19
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-missing-attribute",
|
||||
"message": "A11y: <area> element should have an alt, aria-label or aria-labelledby attribute",
|
||||
"start": {
|
||||
"line": 4,
|
||||
"column": 1
|
||||
},
|
||||
"end": {
|
||||
"line": 4,
|
||||
"column": 7
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-missing-attribute",
|
||||
"message": "A11y: <object> element should have a title, aria-label or aria-labelledby attribute",
|
||||
"start": {
|
||||
"line": 7,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 7,
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-missing-attribute",
|
||||
"message": "A11y: <input type=\"image\"> element should have an alt, aria-label or aria-labelledby attribute",
|
||||
"start": {
|
||||
"line": 9,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 9,
|
||||
"column": 20
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1 @@
|
||||
<a href="/foo" aria-label="baz"></a>
|
||||
@ -0,0 +1 @@
|
||||
[]
|
||||
@ -0,0 +1,2 @@
|
||||
<a href='/foo'></a>
|
||||
<a href="#{'foo'}">bar</a>
|
||||
@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-missing-content",
|
||||
"message": "A11y: <a> element should have child content",
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 19
|
||||
}
|
||||
}
|
||||
]
|
||||
|
After Width: | Height: | Size: 182 B |
@ -0,0 +1,38 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-missing-attribute",
|
||||
"message": "A11y: <a> element should have an href attribute",
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 11
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 37
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-invalid-attribute",
|
||||
"message": "A11y: '' is not a valid xlink:href attribute",
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 14
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-invalid-attribute",
|
||||
"message": "A11y: '#' is not a valid xlink:href attribute",
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 14
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 28
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,8 @@
|
||||
<a>not actually a link</a>
|
||||
<a href=''>invalid</a>
|
||||
<a href='#'>invalid</a>
|
||||
<a href='javascript:void(0)'>invalid</a>
|
||||
<a name=''>invalid</a>
|
||||
<a id=''>invalid</a>
|
||||
<a name='fragment'>valid</a>
|
||||
<a id='fragment'>valid</a>
|
||||
@ -0,0 +1,74 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-missing-attribute",
|
||||
"message": "A11y: <a> element should have an href attribute",
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 26
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-invalid-attribute",
|
||||
"message": "A11y: '' is not a valid href attribute",
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 3
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 10
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-invalid-attribute",
|
||||
"message": "A11y: '#' is not a valid href attribute",
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 3
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-invalid-attribute",
|
||||
"message": "A11y: 'javascript:void(0)' is not a valid href attribute",
|
||||
"start": {
|
||||
"line": 4,
|
||||
"column": 3
|
||||
},
|
||||
"end": {
|
||||
"line": 4,
|
||||
"column": 28
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-missing-attribute",
|
||||
"message": "A11y: <a> element should have an href attribute",
|
||||
"start": {
|
||||
"line": 5,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 22
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-missing-attribute",
|
||||
"message": "A11y: <a> element should have an href attribute",
|
||||
"start": {
|
||||
"line": 6,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 6,
|
||||
"column": 20
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,16 @@
|
||||
<!-- VALID -->
|
||||
<input />
|
||||
<input tabindex="0" />
|
||||
<input aria-activedescendant="some-id" />
|
||||
<input aria-activedescendant="some-id" tabindex={0} />
|
||||
<input aria-activedescendant="some-id" tabindex={1} />
|
||||
<input aria-activedescendant="some-id" tabindex="0" />
|
||||
<input aria-activedescendant="some-id" tabindex={-1} />
|
||||
<input aria-activedescendant="some-id" tabindex="-1" />
|
||||
<svelte:element this={Math.random() ? 'input' : 'button'} aria-activedescendant="some-id" />
|
||||
<div />
|
||||
<div aria-activedescendant="some-id" role="tablist" tabindex={-1} />
|
||||
<div aria-activedescendant="some-id" role="tablist" tabindex="-1" />
|
||||
|
||||
<!-- INVALID -->
|
||||
<div aria-activedescendant="some-id" />
|
||||
@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-aria-activedescendant-has-tabindex",
|
||||
"end": {
|
||||
"column": 36,
|
||||
"line": 16
|
||||
},
|
||||
"message": "A11y: Elements with attribute aria-activedescendant should have tabindex value",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 16
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1 @@
|
||||
<input type="image" aria-labeledby="foo">
|
||||
@ -0,0 +1,26 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-unknown-aria-attribute",
|
||||
"message": "A11y: Unknown aria attribute 'aria-labeledby' (did you mean 'labelledby'?)",
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 20
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 40
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-missing-attribute",
|
||||
"message": "A11y: <input type=\"image\"> element should have an alt, aria-label or aria-labelledby attribute",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 1
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 41
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,8 @@
|
||||
<script>
|
||||
const abc = 'abc';
|
||||
</script>
|
||||
|
||||
<button aria-disabled="yes"/>
|
||||
<button aria-disabled="no"/>
|
||||
<button aria-disabled={1234}/>
|
||||
<button aria-disabled={`${abc}`}/>
|
||||
@ -0,0 +1,26 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-incorrect-aria-attribute-type",
|
||||
"message": "A11y: The value of 'aria-disabled' must be exactly one of true or false",
|
||||
"start": {
|
||||
"line": 5,
|
||||
"column": 8
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-incorrect-aria-attribute-type",
|
||||
"message": "A11y: The value of 'aria-disabled' must be exactly one of true or false",
|
||||
"start": {
|
||||
"line": 6,
|
||||
"column": 8
|
||||
},
|
||||
"end": {
|
||||
"line": 6,
|
||||
"column": 26
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,7 @@
|
||||
<div aria-level="yes" />
|
||||
<div aria-level="no" />
|
||||
<div aria-level={`abc`} />
|
||||
<div aria-level={true} />
|
||||
<div aria-level />
|
||||
<div aria-level={"false"} />
|
||||
<div aria-level={!"false"} />
|
||||
@ -0,0 +1,38 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-incorrect-aria-attribute-type",
|
||||
"message": "A11y: The value of 'aria-level' must be of type integer",
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 21
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-incorrect-aria-attribute-type",
|
||||
"message": "A11y: The value of 'aria-level' must be of type integer",
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-incorrect-aria-attribute-type",
|
||||
"message": "A11y: The value of 'aria-level' must be of type integer",
|
||||
"start": {
|
||||
"line": 5,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 15
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,7 @@
|
||||
<div aria-valuemax="yes" />
|
||||
<div aria-valuemax="no" />
|
||||
<div aria-valuemax={`abc`} />
|
||||
<div aria-valuemax={true} />
|
||||
<div aria-valuemax />
|
||||
<div aria-valuemax={'false'} />
|
||||
<div aria-valuemax={!'false'} />
|
||||
@ -0,0 +1,38 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-incorrect-aria-attribute-type",
|
||||
"message": "A11y: The value of 'aria-valuemax' must be of type number",
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 24
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-incorrect-aria-attribute-type",
|
||||
"message": "A11y: The value of 'aria-valuemax' must be of type number",
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-incorrect-aria-attribute-type",
|
||||
"message": "A11y: The value of 'aria-valuemax' must be of type number",
|
||||
"start": {
|
||||
"line": 5,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 18
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,5 @@
|
||||
<div aria-label />
|
||||
<div aria-label={true} />
|
||||
<div aria-label={false} />
|
||||
<div aria-label={1234} />
|
||||
<div aria-label={!true} />
|
||||
@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-incorrect-aria-attribute-type",
|
||||
"message": "A11y: The value of 'aria-label' must be of type string",
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 15
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,6 @@
|
||||
<div aria-sort="" />
|
||||
<div aria-sort="incorrect" />
|
||||
<div aria-sort />
|
||||
<div aria-sort={true} />
|
||||
<div aria-sort={"false"} />
|
||||
<div aria-sort="ascending descending" />
|
||||
@ -0,0 +1,50 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-incorrect-aria-attribute-type",
|
||||
"message": "A11y: The value of 'aria-sort' must be exactly one of ascending, descending, none, other",
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-incorrect-aria-attribute-type",
|
||||
"message": "A11y: The value of 'aria-sort' must be exactly one of ascending, descending, none, other",
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 26
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-incorrect-aria-attribute-type",
|
||||
"message": "A11y: The value of 'aria-sort' must be exactly one of ascending, descending, none, other",
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-incorrect-aria-attribute-type",
|
||||
"message": "A11y: The value of 'aria-sort' must be exactly one of ascending, descending, none, other",
|
||||
"start": {
|
||||
"line": 6,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 6,
|
||||
"column": 37
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,7 @@
|
||||
<div aria-relevant="" />
|
||||
<div aria-relevant="foobar" />
|
||||
<div aria-relevant />
|
||||
<div aria-relevant={true} />
|
||||
<div aria-relevant={"false"} />
|
||||
<div aria-relevant="additions removals_" />
|
||||
<div aria-relevant="additions removals_ " />
|
||||
@ -0,0 +1,62 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-incorrect-aria-attribute-type",
|
||||
"message": "A11y: The value of 'aria-relevant' must be a space-separated list of one or more of additions, all, removals, text",
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 21
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-incorrect-aria-attribute-type",
|
||||
"message": "A11y: The value of 'aria-relevant' must be a space-separated list of one or more of additions, all, removals, text",
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-incorrect-aria-attribute-type",
|
||||
"message": "A11y: The value of 'aria-relevant' must be a space-separated list of one or more of additions, all, removals, text",
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 18
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-incorrect-aria-attribute-type",
|
||||
"message": "A11y: The value of 'aria-relevant' must be a space-separated list of one or more of additions, all, removals, text",
|
||||
"start": {
|
||||
"line": 6,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 6,
|
||||
"column": 40
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-incorrect-aria-attribute-type",
|
||||
"message": "A11y: The value of 'aria-relevant' must be a space-separated list of one or more of additions, all, removals, text",
|
||||
"start": {
|
||||
"line": 7,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 7,
|
||||
"column": 41
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,8 @@
|
||||
<script>
|
||||
const abc = 'abc';
|
||||
</script>
|
||||
|
||||
<div aria-checked="yes" />
|
||||
<div aria-checked="no" />
|
||||
<div aria-checked={1234} />
|
||||
<div aria-checked={`${abc}`} />
|
||||
@ -0,0 +1,26 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-incorrect-aria-attribute-type",
|
||||
"message": "A11y: The value of 'aria-checked' must be exactly one of true, false, or mixed",
|
||||
"start": {
|
||||
"line": 5,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-incorrect-aria-attribute-type",
|
||||
"message": "A11y: The value of 'aria-checked' must be exactly one of true, false, or mixed",
|
||||
"start": {
|
||||
"line": 6,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 6,
|
||||
"column": 22
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,7 @@
|
||||
<!-- valid -->
|
||||
<div role="tooltip"></div>
|
||||
<div role="button tooltip"></div>
|
||||
|
||||
<!-- not valid -->
|
||||
<div role="toooltip"></div>
|
||||
<div role="button toooltip"></div>
|
||||
@ -0,0 +1,26 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-unknown-role",
|
||||
"message": "A11y: Unknown role 'toooltip' (did you mean 'tooltip'?)",
|
||||
"start": {
|
||||
"line": 6,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 6,
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-unknown-role",
|
||||
"message": "A11y: Unknown role 'toooltip' (did you mean 'tooltip'?)",
|
||||
"start": {
|
||||
"line": 7,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 7,
|
||||
"column": 27
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,2 @@
|
||||
<meta aria-hidden="false">
|
||||
<meta role="tooltip">
|
||||
@ -0,0 +1,26 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-aria-attributes",
|
||||
"message": "A11y: <meta> should not have aria-* attributes",
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 6
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 25
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-misplaced-role",
|
||||
"message": "A11y: <meta> should not have role attribute",
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 6
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 20
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,27 @@
|
||||
<script>
|
||||
let dynamic = '';
|
||||
</script>
|
||||
|
||||
<!-- VALID -->
|
||||
<input type="text" />
|
||||
<input type="text" autocomplete="name" />
|
||||
<input type="text" autocomplete="off" />
|
||||
<input type="text" autocomplete="on" />
|
||||
<input type="text" autocomplete="billing family-name" />
|
||||
<input type="hidden" autocomplete="section-blue shipping street-address" />
|
||||
<input type="text" autocomplete="section-somewhere shipping work email" />
|
||||
<input type="text" autocomplete="section-somewhere shipping work email webauthn" />
|
||||
<input type="text" autocomplete="SECTION-SOMEWHERE SHIPPING WORK EMAIL WEBAUTHN" />
|
||||
<input type="TEXT" autocomplete="ON" />
|
||||
<input type="email" autocomplete="url" />
|
||||
<input type="text" autocomplete="section-blue shipping street-address" />
|
||||
<input type="hidden" autocomplete="off" />
|
||||
<input type="hidden" autocomplete="on" />
|
||||
<input type="text" autocomplete="" />
|
||||
<input type="{dynamic}" autocomplete="" />
|
||||
<input type="text" autocomplete="{dynamic}" />
|
||||
|
||||
<!-- INVALID -->
|
||||
<input type="text" autocomplete />
|
||||
<input type="text" autocomplete="incorrect" />
|
||||
<input type="text" autocomplete="webauthn" />
|
||||
@ -0,0 +1,38 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-autocomplete-valid",
|
||||
"end": {
|
||||
"column": 31,
|
||||
"line": 25
|
||||
},
|
||||
"message": "A11y: The value 'true' is not supported by the attribute 'autocomplete' on element <input type=\"text\">",
|
||||
"start": {
|
||||
"column": 19,
|
||||
"line": 25
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-autocomplete-valid",
|
||||
"end": {
|
||||
"column": 43,
|
||||
"line": 26
|
||||
},
|
||||
"message": "A11y: The value 'incorrect' is not supported by the attribute 'autocomplete' on element <input type=\"text\">",
|
||||
"start": {
|
||||
"column": 19,
|
||||
"line": 26
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-autocomplete-valid",
|
||||
"end": {
|
||||
"column": 42,
|
||||
"line": 27
|
||||
},
|
||||
"message": "A11y: The value 'webauthn' is not supported by the attribute 'autocomplete' on element <input type=\"text\">",
|
||||
"start": {
|
||||
"column": 19,
|
||||
"line": 27
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,71 @@
|
||||
<script>
|
||||
function noop() {}
|
||||
|
||||
let props = {};
|
||||
|
||||
const dynamicTypeValue = "checkbox";
|
||||
const dynamicAriaHiddenValue = "false";
|
||||
const dynamicRole = "button";
|
||||
</script>
|
||||
|
||||
<!-- should warn -->
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div on:click={noop} />
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div on:click={noop} aria-hidden="false" />
|
||||
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<section on:click={noop} />
|
||||
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
|
||||
<main on:click={noop} />
|
||||
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
|
||||
<article on:click={noop} />
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<header on:click={noop} />
|
||||
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
|
||||
<footer on:click={noop} />
|
||||
|
||||
<!-- should not warn -->
|
||||
<div class="foo" />
|
||||
|
||||
<a href="http://x.y.z" on:click={noop}>foo</a>
|
||||
<button on:click={noop} />
|
||||
<select on:click={noop} />
|
||||
|
||||
<input type="button" on:click={noop} />
|
||||
<input type={dynamicTypeValue} on:click={noop} />
|
||||
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div on:click={noop} {...props} />
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div on:click={noop} on:keydown={noop} />
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div on:click={noop} on:keyup={noop} />
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div on:click={noop} on:keypress={noop} />
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div on:click={noop} on:keydown={noop} on:keyup={noop} />
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div on:click={noop} on:keyup={noop} on:keypress={noop} />
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div on:click={noop} on:keypress={noop} on:keydown={noop} />
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div on:click={noop} on:keydown={noop} on:keyup={noop} on:keypress={noop} />
|
||||
|
||||
<input on:click={noop} type="hidden" />
|
||||
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div on:click={noop} aria-hidden />
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div on:click={noop} aria-hidden="true" />
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div on:click={noop} aria-hidden="false" on:keydown={noop} />
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div on:click={noop} aria-hidden={dynamicAriaHiddenValue} />
|
||||
|
||||
<div on:click={noop} role="presentation" />
|
||||
<div on:click={noop} role="none" />
|
||||
<div on:click={noop} role={dynamicRole} />
|
||||
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<svelte:element this={Math.random() ? 'button' : 'div'} on:click={noop} />
|
||||
@ -0,0 +1,86 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-click-events-have-key-events",
|
||||
"message": "A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.",
|
||||
"start": {
|
||||
"line": 13,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 13,
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-click-events-have-key-events",
|
||||
"message": "A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.",
|
||||
"start": {
|
||||
"line": 15,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 15,
|
||||
"column": 43
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-click-events-have-key-events",
|
||||
"message": "A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.",
|
||||
"start": {
|
||||
"line": 18,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 18,
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-click-events-have-key-events",
|
||||
"message": "A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.",
|
||||
"start": {
|
||||
"line": 20,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 20,
|
||||
"column": 24
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-click-events-have-key-events",
|
||||
"message": "A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.",
|
||||
"start": {
|
||||
"line": 22,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 22,
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-click-events-have-key-events",
|
||||
"message": "A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.",
|
||||
"start": {
|
||||
"line": 24,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 24,
|
||||
"column": 26
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-click-events-have-key-events",
|
||||
"message": "A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.",
|
||||
"start": {
|
||||
"line": 26,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 26,
|
||||
"column": 26
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"code": "missing-contenteditable-attribute",
|
||||
"message": "'contenteditable' attribute is required for textContent, innerHTML and innerText two-way bindings",
|
||||
"start": {
|
||||
"line": 6,
|
||||
"column": 3
|
||||
},
|
||||
"end": {
|
||||
"line": 6,
|
||||
"column": 24
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,6 @@
|
||||
<script>
|
||||
let text = 'Hello world';
|
||||
</script>
|
||||
<p bind:textContent={text} contenteditable="true"></p>
|
||||
<p bind:innerHTML={text} contenteditable="true"></p>
|
||||
<p bind:innerHTML={text}></p>
|
||||
@ -0,0 +1,10 @@
|
||||
<script>
|
||||
let caption = 'a foo in its natural habitat';
|
||||
</script>
|
||||
|
||||
<figure>
|
||||
<img src='foo.jpg' alt='a foo'>
|
||||
{#if caption}
|
||||
<figcaption>{caption}</figcaption>
|
||||
{/if}
|
||||
</figure>
|
||||
@ -0,0 +1 @@
|
||||
[]
|
||||
@ -0,0 +1,7 @@
|
||||
<figure>
|
||||
<img src='foo.jpg' alt='a foo'>
|
||||
|
||||
<figcaption>
|
||||
a foo in its natural habitat
|
||||
</figcaption>
|
||||
</figure>
|
||||
@ -0,0 +1 @@
|
||||
[]
|
||||
@ -0,0 +1,19 @@
|
||||
<figure>
|
||||
<img src='foo.jpg' alt='a foo'>
|
||||
|
||||
<figcaption>
|
||||
a foo in its natural habitat
|
||||
</figcaption>
|
||||
|
||||
<p>this should not be here</p>
|
||||
</figure>
|
||||
|
||||
<figure>
|
||||
<img src='foo.jpg' alt='a foo'>
|
||||
|
||||
<div class='markup-for-styling'>
|
||||
<figcaption>
|
||||
this element should be a child of the figure
|
||||
</figcaption>
|
||||
</div>
|
||||
</figure>
|
||||
@ -0,0 +1,26 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-structure",
|
||||
"message": "A11y: <figcaption> must be first or last child of <figure>",
|
||||
"start": {
|
||||
"line": 4,
|
||||
"column": 1
|
||||
},
|
||||
"end": {
|
||||
"line": 6,
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-structure",
|
||||
"message": "A11y: <figcaption> must be an immediate child of <figure>",
|
||||
"start": {
|
||||
"line": 15,
|
||||
"column": 2
|
||||
},
|
||||
"end": {
|
||||
"line": 17,
|
||||
"column": 15
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,2 @@
|
||||
<h1></h1>
|
||||
<h2 aria-hidden>invisible header</h2>
|
||||
@ -0,0 +1,26 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-missing-content",
|
||||
"message": "A11y: <h1> element should have child content",
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 9
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-hidden",
|
||||
"message": "A11y: <h2> element should not be hidden",
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 4
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 15
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,9 @@
|
||||
<script>
|
||||
export let language;
|
||||
</script>
|
||||
|
||||
<html lang="en"></html>
|
||||
<html lang="en-US"></html>
|
||||
<html lang={language}></html>
|
||||
|
||||
<html></html>
|
||||
@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-missing-attribute",
|
||||
"message": "A11y: <html> element should have a lang attribute",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 9
|
||||
},
|
||||
"end": {
|
||||
"line": 9,
|
||||
"column": 13
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,5 @@
|
||||
<script>
|
||||
export let src;
|
||||
</script>
|
||||
|
||||
<iframe src={src}></iframe>
|
||||
@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-missing-attribute",
|
||||
"message": "A11y: <iframe> element should have a title attribute",
|
||||
"start": {
|
||||
"line": 5,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 27
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,9 @@
|
||||
<img src="foo" alt="Foo eating a sandwich." />
|
||||
<img src="bar" aria-hidden alt="Picture of me taking a photo of an image" />
|
||||
<img src="foo" alt="Photo of foo being weird." />
|
||||
<img src="bar" alt="Image of me at a bar!" />
|
||||
<img src="foo" alt="Picture of baz fixing a bug." />
|
||||
<img src="bar" alt="Plant doing photosynthesis in the afternoon" />
|
||||
<img src="foo" alt="Picturesque food" />
|
||||
<img src="baz" alt={'baz'} />
|
||||
<img src="baz" alt />
|
||||
@ -0,0 +1,38 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-img-redundant-alt",
|
||||
"message": "A11y: Screenreaders already announce <img> elements as an image.",
|
||||
"end": {
|
||||
"column": 49,
|
||||
"line": 3
|
||||
},
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-img-redundant-alt",
|
||||
"message": "A11y: Screenreaders already announce <img> elements as an image.",
|
||||
"end": {
|
||||
"column": 45,
|
||||
"line": 4
|
||||
},
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 4
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-img-redundant-alt",
|
||||
"message": "A11y: Screenreaders already announce <img> elements as an image.",
|
||||
"end": {
|
||||
"column": 52,
|
||||
"line": 5
|
||||
},
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 5
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,7 @@
|
||||
<svelte:options namespace="foreign" />
|
||||
<page>
|
||||
<a>not actually a link</a>
|
||||
<label>This isn't a html label</label>
|
||||
<figure>This is maybe a QT figure</figure>
|
||||
</page>
|
||||
|
||||
@ -0,0 +1 @@
|
||||
[]
|
||||
@ -0,0 +1,32 @@
|
||||
<!-- VALID -->
|
||||
<div aria-hidden role="button" on:keypress={() => {}} />
|
||||
<div aria-disabled role="button" on:keypress={() => {}} />
|
||||
<div disabled role="button" on:keypress={() => {}} />
|
||||
<div role="presentation" on:keypress={() => {}} />
|
||||
<button on:click={() => {}} />
|
||||
<div role="menuitem" tabindex="0" on:click={() => {}} on:keypress={() => {}} />
|
||||
<div role="button" tabindex="-1" on:click={() => {}} on:keypress={() => {}} />
|
||||
|
||||
<!-- INVALID -->
|
||||
<div role="button" on:keypress={() => {}} />
|
||||
<span role="menuitem" on:keydown={() => {}} />
|
||||
<div role="button" on:keyup={() => {}} />
|
||||
<span role="menuitem" on:click={() => {}} on:keypress={() => {}} />
|
||||
<div role="button" on:contextmenu={() => {}} />
|
||||
<span role="menuitem" on:dblclick={() => {}} />
|
||||
<div role="button" on:drag={() => {}} />
|
||||
<span role="menuitem" on:dragend={() => {}} />
|
||||
<div role="button" on:dragenter={() => {}} />
|
||||
<span role="menuitem" on:dragexit={() => {}} />
|
||||
<div role="button" on:dragleave={() => {}} />
|
||||
<span role="menuitem" on:dragover={() => {}} />
|
||||
<div role="button" on:dragstart={() => {}} />
|
||||
<span role="menuitem" on:drop={() => {}} />
|
||||
<div role="button" on:mousedown={() => {}} />
|
||||
<span role="menuitem" on:mouseenter={() => {}} />
|
||||
<div role="button" on:mouseleave={() => {}} />
|
||||
<span role="menuitem" on:mousemove={() => {}} />
|
||||
<div role="button" on:mouseout={() => {}} />
|
||||
<span role="menuitem" on:mouseover={() => {}} />
|
||||
<div role="button" on:mouseup={() => {}} />
|
||||
|
||||
@ -0,0 +1,278 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-interactive-supports-focus",
|
||||
"end": {
|
||||
"column": 44,
|
||||
"line": 11
|
||||
},
|
||||
"message": "A11y: Elements with the 'button' interactive role must have a tabindex value.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 11
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-interactive-supports-focus",
|
||||
"end": {
|
||||
"column": 46,
|
||||
"line": 12
|
||||
},
|
||||
"message": "A11y: Elements with the 'menuitem' interactive role must have a tabindex value.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 12
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-interactive-supports-focus",
|
||||
"end": {
|
||||
"column": 41,
|
||||
"line": 13
|
||||
},
|
||||
"message": "A11y: Elements with the 'button' interactive role must have a tabindex value.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 13
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-interactive-supports-focus",
|
||||
"end": {
|
||||
"column": 67,
|
||||
"line": 14
|
||||
},
|
||||
"message": "A11y: Elements with the 'menuitem' interactive role must have a tabindex value.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 14
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-interactive-supports-focus",
|
||||
"end": {
|
||||
"column": 47,
|
||||
"line": 15
|
||||
},
|
||||
"message": "A11y: Elements with the 'button' interactive role must have a tabindex value.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 15
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-interactive-supports-focus",
|
||||
"end": {
|
||||
"column": 47,
|
||||
"line": 16
|
||||
},
|
||||
"message": "A11y: Elements with the 'menuitem' interactive role must have a tabindex value.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 16
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-interactive-supports-focus",
|
||||
"end": {
|
||||
"column": 40,
|
||||
"line": 17
|
||||
},
|
||||
"message": "A11y: Elements with the 'button' interactive role must have a tabindex value.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 17
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-interactive-supports-focus",
|
||||
"end": {
|
||||
"column": 46,
|
||||
"line": 18
|
||||
},
|
||||
"message": "A11y: Elements with the 'menuitem' interactive role must have a tabindex value.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 18
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-interactive-supports-focus",
|
||||
"end": {
|
||||
"column": 45,
|
||||
"line": 19
|
||||
},
|
||||
"message": "A11y: Elements with the 'button' interactive role must have a tabindex value.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 19
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-interactive-supports-focus",
|
||||
"end": {
|
||||
"column": 47,
|
||||
"line": 20
|
||||
},
|
||||
"message": "A11y: Elements with the 'menuitem' interactive role must have a tabindex value.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 20
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-interactive-supports-focus",
|
||||
"end": {
|
||||
"column": 45,
|
||||
"line": 21
|
||||
},
|
||||
"message": "A11y: Elements with the 'button' interactive role must have a tabindex value.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 21
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-interactive-supports-focus",
|
||||
"end": {
|
||||
"column": 47,
|
||||
"line": 22
|
||||
},
|
||||
"message": "A11y: Elements with the 'menuitem' interactive role must have a tabindex value.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 22
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-interactive-supports-focus",
|
||||
"end": {
|
||||
"column": 45,
|
||||
"line": 23
|
||||
},
|
||||
"message": "A11y: Elements with the 'button' interactive role must have a tabindex value.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 23
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-interactive-supports-focus",
|
||||
"end": {
|
||||
"column": 43,
|
||||
"line": 24
|
||||
},
|
||||
"message": "A11y: Elements with the 'menuitem' interactive role must have a tabindex value.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 24
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-interactive-supports-focus",
|
||||
"end": {
|
||||
"column": 45,
|
||||
"line": 25
|
||||
},
|
||||
"message": "A11y: Elements with the 'button' interactive role must have a tabindex value.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 25
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-interactive-supports-focus",
|
||||
"end": {
|
||||
"column": 49,
|
||||
"line": 26
|
||||
},
|
||||
"message": "A11y: Elements with the 'menuitem' interactive role must have a tabindex value.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 26
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-interactive-supports-focus",
|
||||
"end": {
|
||||
"column": 46,
|
||||
"line": 27
|
||||
},
|
||||
"message": "A11y: Elements with the 'button' interactive role must have a tabindex value.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 27
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-interactive-supports-focus",
|
||||
"end": {
|
||||
"column": 48,
|
||||
"line": 28
|
||||
},
|
||||
"message": "A11y: Elements with the 'menuitem' interactive role must have a tabindex value.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 28
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-interactive-supports-focus",
|
||||
"end": {
|
||||
"column": 44,
|
||||
"line": 29
|
||||
},
|
||||
"message": "A11y: Elements with the 'button' interactive role must have a tabindex value.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 29
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-mouse-events-have-key-events",
|
||||
"end": {
|
||||
"column": 44,
|
||||
"line": 29
|
||||
},
|
||||
"message": "A11y: on:mouseout must be accompanied by on:blur",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 29
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-interactive-supports-focus",
|
||||
"end": {
|
||||
"column": 48,
|
||||
"line": 30
|
||||
},
|
||||
"message": "A11y: Elements with the 'menuitem' interactive role must have a tabindex value.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 30
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-mouse-events-have-key-events",
|
||||
"end": {
|
||||
"column": 48,
|
||||
"line": 30
|
||||
},
|
||||
"message": "A11y: on:mouseover must be accompanied by on:focus",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 30
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-interactive-supports-focus",
|
||||
"end": {
|
||||
"column": 43,
|
||||
"line": 31
|
||||
},
|
||||
"message": "A11y: Elements with the 'button' interactive role must have a tabindex value.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 31
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,3 @@
|
||||
<label>
|
||||
<slot />
|
||||
</label>
|
||||
@ -0,0 +1 @@
|
||||
[]
|
||||
@ -0,0 +1,12 @@
|
||||
<script>
|
||||
import LabelComponent from './label.svelte'
|
||||
</script>
|
||||
|
||||
<label>A</label>
|
||||
<label for="id">B</label>
|
||||
|
||||
<label>C <input type="text" /></label>
|
||||
<label>D <button>D</button></label>
|
||||
<label>E <span></span></label>
|
||||
<label>F {#if true}<input type="text" />{/if}</label>
|
||||
<LabelComponent>G <input type="text" /></LabelComponent>
|
||||
@ -0,0 +1,26 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-label-has-associated-control",
|
||||
"end": {
|
||||
"column": 16,
|
||||
"line": 5
|
||||
},
|
||||
"message": "A11y: A form label must be associated with a control.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-label-has-associated-control",
|
||||
"end": {
|
||||
"column": 30,
|
||||
"line": 10
|
||||
},
|
||||
"message": "A11y: A form label must be associated with a control.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 10
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,7 @@
|
||||
<video><track kind="captions"/></video>
|
||||
<video></video>
|
||||
<video><track /></video>
|
||||
<audio></audio>
|
||||
<video aria-hidden></video>
|
||||
<video aria-hidden="false"></video>
|
||||
<video aria-hidden="true"></video>
|
||||
@ -0,0 +1,50 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-media-has-caption",
|
||||
"end": {
|
||||
"column": 15,
|
||||
"line": 2
|
||||
},
|
||||
"message": "A11y: <video> elements must have a <track kind=\"captions\">",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-media-has-caption",
|
||||
"end": {
|
||||
"column": 24,
|
||||
"line": 3
|
||||
},
|
||||
"message": "A11y: <video> elements must have a <track kind=\"captions\">",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-media-has-caption",
|
||||
"end": {
|
||||
"column": 27,
|
||||
"line": 5
|
||||
},
|
||||
"message": "A11y: <video> elements must have a <track kind=\"captions\">",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-media-has-caption",
|
||||
"end": {
|
||||
"column": 35,
|
||||
"line": 6
|
||||
},
|
||||
"message": "A11y: <video> elements must have a <track kind=\"captions\">",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 6
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,21 @@
|
||||
<script>
|
||||
// Even if otherProps contains onBlur and/or onFocus, the rule will still fail.
|
||||
// Props should be passed down explicitly for rule to pass.
|
||||
const otherProps = {
|
||||
onBlur: () => void 0,
|
||||
onFocus: () => void 0
|
||||
};
|
||||
</script>
|
||||
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div on:mouseover={() => void 0} />
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div on:mouseover={() => void 0} on:focus={() => void 0} />
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div on:mouseover={() => void 0} {...otherProps} />
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div on:mouseout={() => void 0} />
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div on:mouseout={() => void 0} on:blur={() => void 0} />
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div on:mouseout={() => void 0} {...otherProps} />
|
||||
@ -0,0 +1,50 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-mouse-events-have-key-events",
|
||||
"end": {
|
||||
"column": 35,
|
||||
"line": 11
|
||||
},
|
||||
"message": "A11y: on:mouseover must be accompanied by on:focus",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 11
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-mouse-events-have-key-events",
|
||||
"end": {
|
||||
"column": 51,
|
||||
"line": 15
|
||||
},
|
||||
"message": "A11y: on:mouseover must be accompanied by on:focus",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 15
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-mouse-events-have-key-events",
|
||||
"end": {
|
||||
"column": 34,
|
||||
"line": 17
|
||||
},
|
||||
"message": "A11y: on:mouseout must be accompanied by on:blur",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 17
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-mouse-events-have-key-events",
|
||||
"end": {
|
||||
"column": 50,
|
||||
"line": 21
|
||||
},
|
||||
"message": "A11y: on:mouseout must be accompanied by on:blur",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 21
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,12 @@
|
||||
<div role="command"/>
|
||||
<div role="composite"/>
|
||||
<div role="input"/>
|
||||
<div role="landmark"/>
|
||||
<div role="range"/>
|
||||
<div role="roletype"/>
|
||||
<div role="section"/>
|
||||
<div role="sectionhead"/>
|
||||
<div role="select"/>
|
||||
<div role="structure"/>
|
||||
<div role="widget"/>
|
||||
<div role="window"/>
|
||||
@ -0,0 +1,146 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"column": 19,
|
||||
"line": 1
|
||||
},
|
||||
"message": "A11y: Abstract role 'command' is forbidden",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"column": 21,
|
||||
"line": 2
|
||||
},
|
||||
"message": "A11y: Abstract role 'composite' is forbidden",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"column": 17,
|
||||
"line": 3
|
||||
},
|
||||
"message": "A11y: Abstract role 'input' is forbidden",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"column": 20,
|
||||
"line": 4
|
||||
},
|
||||
"message": "A11y: Abstract role 'landmark' is forbidden",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 4
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"column": 17,
|
||||
"line": 5
|
||||
},
|
||||
"message": "A11y: Abstract role 'range' is forbidden",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"column": 20,
|
||||
"line": 6
|
||||
},
|
||||
"message": "A11y: Abstract role 'roletype' is forbidden",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 6
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"column": 19,
|
||||
"line": 7
|
||||
},
|
||||
"message": "A11y: Abstract role 'section' is forbidden",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 7
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"column": 23,
|
||||
"line": 8
|
||||
},
|
||||
"message": "A11y: Abstract role 'sectionhead' is forbidden",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 8
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"column": 18,
|
||||
"line": 9
|
||||
},
|
||||
"message": "A11y: Abstract role 'select' is forbidden",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 9
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"column": 21,
|
||||
"line": 10
|
||||
},
|
||||
"message": "A11y: Abstract role 'structure' is forbidden",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 10
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"column": 18,
|
||||
"line": 11
|
||||
},
|
||||
"message": "A11y: Abstract role 'widget' is forbidden",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 11
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"column": 18,
|
||||
"line": 12
|
||||
},
|
||||
"message": "A11y: Abstract role 'window' is forbidden",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 12
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1 @@
|
||||
<div accessKey='z'></div>
|
||||
@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-accesskey",
|
||||
"message": "A11y: Avoid using accesskey",
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 18
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1 @@
|
||||
<div autofocus></div>
|
||||
@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-autofocus",
|
||||
"message": "A11y: Avoid using autofocus",
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 14
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,2 @@
|
||||
<marquee/>
|
||||
<blink/>
|
||||
@ -0,0 +1,26 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-distracting-elements",
|
||||
"message": "A11y: Avoid <marquee> elements",
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 10
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-distracting-elements",
|
||||
"message": "A11y: Avoid <blink> elements",
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 8
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,148 @@
|
||||
<!-- a -->
|
||||
<a href="test" role="article">link</a>
|
||||
<a href="test" role="banner">link</a>
|
||||
<a href="test" role="complementary">link</a>
|
||||
<a href="test" role="img">link</a>
|
||||
<a href="test" role="listitem">link</a>
|
||||
<a href="test" role="main">link</a>
|
||||
<a href="test" role="region">link</a>
|
||||
<a href="test" role="tooltip">link</a>
|
||||
<a href="test" role="button">link</a>
|
||||
|
||||
<!-- button -->
|
||||
<button role="article">button</button>
|
||||
<button role="banner">button</button>
|
||||
<button role="complementary">button</button>
|
||||
<button role="img">button</button>
|
||||
<button role="listitem">button</button>
|
||||
<button role="main">button</button>
|
||||
<button role="region">button</button>
|
||||
<button role="tooltip">button</button>
|
||||
<button role="button">button</button>
|
||||
|
||||
<!-- input -->
|
||||
<input role="article"/>
|
||||
<input role="banner"/>
|
||||
<input role="complementary"/>
|
||||
<input role="img"/>
|
||||
<input role="listitem"/>
|
||||
<input role="main"/>
|
||||
<input role="region"/>
|
||||
<input role="tooltip"/>
|
||||
<input role="button"/>
|
||||
|
||||
<!-- select -->
|
||||
<select role="article"/>
|
||||
<select role="banner"/>
|
||||
<select role="complementary"/>
|
||||
<select role="img"/>
|
||||
<select role="listitem"/>
|
||||
<select role="main"/>
|
||||
<select role="region"/>
|
||||
<select role="tooltip"/>
|
||||
<select role="button"/>
|
||||
|
||||
<!-- textarea -->
|
||||
<textarea role="article"/>
|
||||
<textarea role="banner"/>
|
||||
<textarea role="complementary"/>
|
||||
<textarea role="img"/>
|
||||
<textarea role="listitem"/>
|
||||
<textarea role="main"/>
|
||||
<textarea role="region"/>
|
||||
<textarea role="tooltip"/>
|
||||
<textarea role="button"/>
|
||||
|
||||
<!-- HTML elements attributed with an abstract role -->
|
||||
<div role="command" />
|
||||
<div role="composite" />
|
||||
<div role="input" />
|
||||
<div role="landmark" />
|
||||
<div role="range" />
|
||||
<div role="roletype" />
|
||||
<div role="section" />
|
||||
<div role="sectionhead" />
|
||||
<div role="select" />
|
||||
<div role="structure" />
|
||||
<div role="tablist" />
|
||||
<div role="toolbar" />
|
||||
<div role="tree" />
|
||||
<div role="treegrid" />
|
||||
<div role="widget" />
|
||||
<div role="window" />
|
||||
|
||||
<!-- VALID: div elements assigned an interactive role. -->
|
||||
<div role="button" />
|
||||
<div role="checkbox" aria-checked={true} />
|
||||
<div role="columnheader" />
|
||||
<div role="combobox" aria-controls={[]} aria-expanded={true} />
|
||||
<div role="grid" />
|
||||
<div role="gridcell" />
|
||||
<div role="link" />
|
||||
<div role="listbox" />
|
||||
<div role="menu" />
|
||||
<div role="menubar" />
|
||||
<div role="menuitem" />
|
||||
<div role="menuitemcheckbox" aria-checked />
|
||||
<div role="menuitemradio" aria-checked />
|
||||
<div role="option" aria-selected />
|
||||
<div role="progressbar" />
|
||||
<div role="radio" aria-checked />
|
||||
<div role="radiogroup" />
|
||||
<div role="row" />
|
||||
<div role="rowheader" />
|
||||
<div role="scrollbar" aria-controls={[]} aria-valuenow={0} />
|
||||
<div role="searchbox" />
|
||||
<div role="slider" aria-valuenow={0} />
|
||||
<div role="spinbutton" />
|
||||
<div role="switch" aria-checked />
|
||||
<div role="tab" />
|
||||
<div role="textbox" />
|
||||
<div role="treeitem" aria-selected={true} />
|
||||
|
||||
<!-- HTML elements attributed with a non-interactive role -->
|
||||
<div role="alert" />
|
||||
<div role="alertdialog" />
|
||||
<div role="application" />
|
||||
<div role="article" />
|
||||
<div role="banner" />
|
||||
<div role="cell" />
|
||||
<div role="complementary" />
|
||||
<div role="contentinfo" />
|
||||
<div role="definition" />
|
||||
<div role="dialog" />
|
||||
<div role="directory" />
|
||||
<div role="document" />
|
||||
<div role="feed" />
|
||||
<div role="figure" />
|
||||
<div role="form" />
|
||||
<div role="group" />
|
||||
<div role="heading" aria-level="1" />
|
||||
<div role="img" />
|
||||
<div role="list" />
|
||||
<div role="listitem" />
|
||||
<div role="log" />
|
||||
<div role="main" />
|
||||
<div role="marquee" />
|
||||
<div role="math" />
|
||||
<div role="navigation" />
|
||||
<div role="note" />
|
||||
<div role="region" />
|
||||
<div role="rowgroup" />
|
||||
<div role="search" />
|
||||
<div role="separator" />
|
||||
<div role="scrollbar" aria-controls="x" aria-valuenow="0" />
|
||||
<div role="status" />
|
||||
<div role="table" />
|
||||
<div role="tabpanel" />
|
||||
<div role="term" />
|
||||
<div role="timer" />
|
||||
<div role="tooltip" />
|
||||
|
||||
<!-- not valid -->
|
||||
<menuitem role="listitem" />
|
||||
<option class="foo" role="listitem" />
|
||||
<select class="foo" role="listitem" />
|
||||
<summary role="listitem" />
|
||||
<textarea class="foo" role="listitem" />
|
||||
<tr role="listitem" />
|
||||
@ -0,0 +1,710 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 38,
|
||||
"line": 2
|
||||
},
|
||||
"message": "A11y: <a> cannot have role 'article'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 37,
|
||||
"line": 3
|
||||
},
|
||||
"message": "A11y: <a> cannot have role 'banner'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 44,
|
||||
"line": 4
|
||||
},
|
||||
"message": "A11y: <a> cannot have role 'complementary'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 4
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 34,
|
||||
"line": 5
|
||||
},
|
||||
"message": "A11y: <a> cannot have role 'img'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 39,
|
||||
"line": 6
|
||||
},
|
||||
"message": "A11y: <a> cannot have role 'listitem'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 6
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 35,
|
||||
"line": 7
|
||||
},
|
||||
"message": "A11y: <a> cannot have role 'main'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 7
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 37,
|
||||
"line": 8
|
||||
},
|
||||
"message": "A11y: <a> cannot have role 'region'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 8
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 38,
|
||||
"line": 9
|
||||
},
|
||||
"message": "A11y: <a> cannot have role 'tooltip'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 9
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 38,
|
||||
"line": 13
|
||||
},
|
||||
"message": "A11y: <button> cannot have role 'article'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 13
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 37,
|
||||
"line": 14
|
||||
},
|
||||
"message": "A11y: <button> cannot have role 'banner'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 14
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 44,
|
||||
"line": 15
|
||||
},
|
||||
"message": "A11y: <button> cannot have role 'complementary'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 15
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 34,
|
||||
"line": 16
|
||||
},
|
||||
"message": "A11y: <button> cannot have role 'img'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 16
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 39,
|
||||
"line": 17
|
||||
},
|
||||
"message": "A11y: <button> cannot have role 'listitem'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 17
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 35,
|
||||
"line": 18
|
||||
},
|
||||
"message": "A11y: <button> cannot have role 'main'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 18
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 37,
|
||||
"line": 19
|
||||
},
|
||||
"message": "A11y: <button> cannot have role 'region'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 19
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 38,
|
||||
"line": 20
|
||||
},
|
||||
"message": "A11y: <button> cannot have role 'tooltip'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 20
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 21,
|
||||
"line": 21
|
||||
},
|
||||
"message": "A11y: Redundant role 'button'",
|
||||
"start": {
|
||||
"column": 8,
|
||||
"line": 21
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 23,
|
||||
"line": 24
|
||||
},
|
||||
"message": "A11y: <input> cannot have role 'article'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 24
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 22,
|
||||
"line": 25
|
||||
},
|
||||
"message": "A11y: <input> cannot have role 'banner'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 25
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 29,
|
||||
"line": 26
|
||||
},
|
||||
"message": "A11y: <input> cannot have role 'complementary'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 26
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 19,
|
||||
"line": 27
|
||||
},
|
||||
"message": "A11y: <input> cannot have role 'img'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 27
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 24,
|
||||
"line": 28
|
||||
},
|
||||
"message": "A11y: <input> cannot have role 'listitem'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 28
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 20,
|
||||
"line": 29
|
||||
},
|
||||
"message": "A11y: <input> cannot have role 'main'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 29
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 22,
|
||||
"line": 30
|
||||
},
|
||||
"message": "A11y: <input> cannot have role 'region'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 30
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 23,
|
||||
"line": 31
|
||||
},
|
||||
"message": "A11y: <input> cannot have role 'tooltip'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 31
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 24,
|
||||
"line": 35
|
||||
},
|
||||
"message": "A11y: <select> cannot have role 'article'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 35
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 23,
|
||||
"line": 36
|
||||
},
|
||||
"message": "A11y: <select> cannot have role 'banner'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 36
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 30,
|
||||
"line": 37
|
||||
},
|
||||
"message": "A11y: <select> cannot have role 'complementary'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 37
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 20,
|
||||
"line": 38
|
||||
},
|
||||
"message": "A11y: <select> cannot have role 'img'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 38
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 25,
|
||||
"line": 39
|
||||
},
|
||||
"message": "A11y: <select> cannot have role 'listitem'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 39
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 21,
|
||||
"line": 40
|
||||
},
|
||||
"message": "A11y: <select> cannot have role 'main'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 40
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 23,
|
||||
"line": 41
|
||||
},
|
||||
"message": "A11y: <select> cannot have role 'region'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 41
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 24,
|
||||
"line": 42
|
||||
},
|
||||
"message": "A11y: <select> cannot have role 'tooltip'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 42
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 26,
|
||||
"line": 46
|
||||
},
|
||||
"message": "A11y: <textarea> cannot have role 'article'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 46
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 25,
|
||||
"line": 47
|
||||
},
|
||||
"message": "A11y: <textarea> cannot have role 'banner'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 47
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 32,
|
||||
"line": 48
|
||||
},
|
||||
"message": "A11y: <textarea> cannot have role 'complementary'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 48
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 22,
|
||||
"line": 49
|
||||
},
|
||||
"message": "A11y: <textarea> cannot have role 'img'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 49
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 27,
|
||||
"line": 50
|
||||
},
|
||||
"message": "A11y: <textarea> cannot have role 'listitem'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 50
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 23,
|
||||
"line": 51
|
||||
},
|
||||
"message": "A11y: <textarea> cannot have role 'main'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 51
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 25,
|
||||
"line": 52
|
||||
},
|
||||
"message": "A11y: <textarea> cannot have role 'region'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 52
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 26,
|
||||
"line": 53
|
||||
},
|
||||
"message": "A11y: <textarea> cannot have role 'tooltip'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 53
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"column": 19,
|
||||
"line": 57
|
||||
},
|
||||
"message": "A11y: Abstract role 'command' is forbidden",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 57
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"column": 21,
|
||||
"line": 58
|
||||
},
|
||||
"message": "A11y: Abstract role 'composite' is forbidden",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 58
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"column": 17,
|
||||
"line": 59
|
||||
},
|
||||
"message": "A11y: Abstract role 'input' is forbidden",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 59
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"column": 20,
|
||||
"line": 60
|
||||
},
|
||||
"message": "A11y: Abstract role 'landmark' is forbidden",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 60
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"column": 17,
|
||||
"line": 61
|
||||
},
|
||||
"message": "A11y: Abstract role 'range' is forbidden",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 61
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"column": 20,
|
||||
"line": 62
|
||||
},
|
||||
"message": "A11y: Abstract role 'roletype' is forbidden",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 62
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"column": 19,
|
||||
"line": 63
|
||||
},
|
||||
"message": "A11y: Abstract role 'section' is forbidden",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 63
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"column": 23,
|
||||
"line": 64
|
||||
},
|
||||
"message": "A11y: Abstract role 'sectionhead' is forbidden",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 64
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"column": 18,
|
||||
"line": 65
|
||||
},
|
||||
"message": "A11y: Abstract role 'select' is forbidden",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 65
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"column": 21,
|
||||
"line": 66
|
||||
},
|
||||
"message": "A11y: Abstract role 'structure' is forbidden",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 66
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"column": 18,
|
||||
"line": 71
|
||||
},
|
||||
"message": "A11y: Abstract role 'widget' is forbidden",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 71
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"column": 18,
|
||||
"line": 72
|
||||
},
|
||||
"message": "A11y: Abstract role 'window' is forbidden",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 72
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 28,
|
||||
"line": 143
|
||||
},
|
||||
"message": "A11y: <menuitem> cannot have role 'listitem'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 143
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 38,
|
||||
"line": 144
|
||||
},
|
||||
"message": "A11y: <option> cannot have role 'listitem'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 144
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 38,
|
||||
"line": 145
|
||||
},
|
||||
"message": "A11y: <select> cannot have role 'listitem'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 145
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 27,
|
||||
"line": 146
|
||||
},
|
||||
"message": "A11y: <summary> cannot have role 'listitem'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 146
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 40,
|
||||
"line": 147
|
||||
},
|
||||
"message": "A11y: <textarea> cannot have role 'listitem'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 147
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"column": 22,
|
||||
"line": 148
|
||||
},
|
||||
"message": "A11y: <tr> cannot have role 'listitem'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 148
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,14 @@
|
||||
<!-- VALID -->
|
||||
<div role="presentation" on:mouseup={() => {}} />
|
||||
<div role="button" tabindex="-1" on:click={() => {}} on:keypress={() => {}} />
|
||||
<div role="listitem" aria-hidden on:click={() => {}} on:keypress={() => {}} />
|
||||
<button on:click={() => {}} />
|
||||
<h1 contenteditable="true" on:keydown={() => {}}>Heading</h1>
|
||||
<h1>Heading</h1>
|
||||
|
||||
<!-- INVALID -->
|
||||
<div role="listitem" on:mousedown={() => {}} />
|
||||
<h1 on:click={() => {}} on:keydown={() => {}}>Heading</h1>
|
||||
<h1 role="banner" on:keyup={() => {}}>Heading</h1>
|
||||
<p on:keypress={() => {}} />
|
||||
<div role="paragraph" on:mouseup={() => {}} />
|
||||
@ -0,0 +1,62 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-interactions",
|
||||
"end": {
|
||||
"column": 47,
|
||||
"line": 10
|
||||
},
|
||||
"message": "A11y: Non-interactive element <div> should not be assigned mouse or keyboard event listeners.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 10
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-interactions",
|
||||
"end": {
|
||||
"column": 58,
|
||||
"line": 11
|
||||
},
|
||||
"message": "A11y: Non-interactive element <h1> should not be assigned mouse or keyboard event listeners.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 11
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-interactions",
|
||||
"end": {
|
||||
"column": 50,
|
||||
"line": 12
|
||||
},
|
||||
"message": "A11y: Non-interactive element <h1> should not be assigned mouse or keyboard event listeners.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 12
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-interactions",
|
||||
"end": {
|
||||
"column": 28,
|
||||
"line": 13
|
||||
},
|
||||
"message": "A11y: Non-interactive element <p> should not be assigned mouse or keyboard event listeners.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 13
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-interactions",
|
||||
"end": {
|
||||
"column": 46,
|
||||
"line": 14
|
||||
},
|
||||
"message": "A11y: Non-interactive element <div> should not be assigned mouse or keyboard event listeners.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 14
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,109 @@
|
||||
<!-- ALL INVALID: HTML elements with interactive role -->
|
||||
<article role="button" />
|
||||
<aside role="checkbox" aria-checked={false} />
|
||||
<blockquote role="columnheader" />
|
||||
<body role="combobox" aria-controls={[]} aria-expanded />
|
||||
<br role="grid" />
|
||||
<caption role="gridcell" />
|
||||
<dd role="link" />
|
||||
<details role="listbox" />
|
||||
<dir role="menu" />
|
||||
<dl role="menubar" />
|
||||
<dfn role="menuitem" />
|
||||
<dt role="menuitemcheckbox" aria-checked />
|
||||
<fieldset role="menuitemradio" aria-checked />
|
||||
<figure>
|
||||
<figcaption role="menuitemradio" aria-checked />
|
||||
</figure>
|
||||
<figure role="option" aria-selected />
|
||||
<footer role="radio" aria-checked />
|
||||
<form role="radiogroup" />
|
||||
<frame role="row" />
|
||||
<h1 role="rowheader">Button</h1>
|
||||
<h2 role="scrollbar" aria-controls={[]} aria-valuenow={0} >Button</h2>
|
||||
<h3 role="searchbox">Button</h3>
|
||||
<h4 role="slider" aria-valuenow={0}>Button</h4>
|
||||
<h5 role="spinbutton">Button</h5>
|
||||
<h6 role="switch" aria-checked>Button</h6>
|
||||
<hr role="tab" />
|
||||
<img role="tabpanel" alt="tabpanel" />
|
||||
<label role="textbox" />
|
||||
<legend role="toolbar" />
|
||||
<li role="tree" />
|
||||
<main role="treegrid" />
|
||||
<mark role="treeitem" aria-selected />
|
||||
<marquee role="doc-backlink" />
|
||||
<menu role="doc-biblioref" />
|
||||
<meter role="doc-glossref" />
|
||||
<nav role="doc-noteref" />
|
||||
<ol role="button" />
|
||||
<optgroup role="treeitem" aria-selected />
|
||||
<output role="treegrid" />
|
||||
<p role="columnheader" />
|
||||
<pre role="tree" />
|
||||
<progress role="combobox" aria-controls={[]} aria-expanded />
|
||||
<ruby role="toolbar" />
|
||||
<section role="radio" aria-label="radio" aria-checked />
|
||||
<table role="menu" />
|
||||
<tbody role="searchbox" />
|
||||
<td role="button" />
|
||||
<tfoot role="listbox" />
|
||||
<thead role="slider" aria-valuenow={0} />
|
||||
<time role="doc-backlink" />
|
||||
<ul role="spinbutton" />
|
||||
|
||||
<!-- VALID under recommended settings, INVALID under strict settings: ul, ol, li has interactive roles -->
|
||||
<!-- ul -->
|
||||
<ul role="menu" />
|
||||
<ul role="menubar" />
|
||||
<ul role="radiogroup" />
|
||||
<ul role="tablist" />
|
||||
<ul role="tree" />
|
||||
<ul role="treegrid" />
|
||||
<!-- ol -->
|
||||
<ol role="menu" />
|
||||
<ol role="menubar" />
|
||||
<ol role="radiogroup" />
|
||||
<ol role="tablist" />
|
||||
<ol role="tree" />
|
||||
<ol role="treegrid" />
|
||||
<!-- li -->
|
||||
<li role="tab" />
|
||||
<li role="menuitem" />
|
||||
<li role="row" />
|
||||
<li role="treeitem" aria-selected={false} />
|
||||
|
||||
<!-- VALID: div elements assigned an interactive role. -->
|
||||
<div role="button" />
|
||||
<div role="checkbox" aria-checked={true} />
|
||||
<div role="columnheader" />
|
||||
<div role="combobox" aria-controls={[]} aria-expanded={true} />
|
||||
<div role="grid" />
|
||||
<div role="gridcell" />
|
||||
<div role="link" />
|
||||
<div role="listbox" />
|
||||
<div role="menu" />
|
||||
<div role="menubar" />
|
||||
<div role="menuitem" />
|
||||
<div role="menuitemcheckbox" aria-checked />
|
||||
<div role="menuitemradio" aria-checked />
|
||||
<div role="option" aria-selected />
|
||||
<div role="progressbar" />
|
||||
<div role="radio" aria-checked />
|
||||
<div role="radiogroup" />
|
||||
<div role="row" />
|
||||
<div role="rowheader" />
|
||||
<div role="scrollbar" aria-controls={[]} aria-valuenow={0} />
|
||||
<div role="searchbox" />
|
||||
<div role="slider" aria-valuenow={0} />
|
||||
<div role="spinbutton" />
|
||||
<div role="switch" aria-checked />
|
||||
<div role="tab" />
|
||||
<div role="textbox" />
|
||||
<div role="treeitem" aria-selected={true} />
|
||||
|
||||
<!-- VALID: HTML elements attributed with a non-interactive role -->
|
||||
<div role="alert" />
|
||||
<div role="document" />
|
||||
<div role="separator" />
|
||||
<div role="timer" />
|
||||
@ -0,0 +1,626 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 25,
|
||||
"line": 2
|
||||
},
|
||||
"message": "A11y: Non-interactive element <article> cannot have interactive role 'button'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 46,
|
||||
"line": 3
|
||||
},
|
||||
"message": "A11y: Non-interactive element <aside> cannot have interactive role 'checkbox'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 34,
|
||||
"line": 4
|
||||
},
|
||||
"message": "A11y: Non-interactive element <blockquote> cannot have interactive role 'columnheader'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 4
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 57,
|
||||
"line": 5
|
||||
},
|
||||
"message": "A11y: Non-interactive element <body> cannot have interactive role 'combobox'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 18,
|
||||
"line": 6
|
||||
},
|
||||
"message": "A11y: Non-interactive element <br> cannot have interactive role 'grid'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 6
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 27,
|
||||
"line": 7
|
||||
},
|
||||
"message": "A11y: Non-interactive element <caption> cannot have interactive role 'gridcell'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 7
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 18,
|
||||
"line": 8
|
||||
},
|
||||
"message": "A11y: Non-interactive element <dd> cannot have interactive role 'link'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 8
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 26,
|
||||
"line": 9
|
||||
},
|
||||
"message": "A11y: Non-interactive element <details> cannot have interactive role 'listbox'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 9
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 19,
|
||||
"line": 10
|
||||
},
|
||||
"message": "A11y: Non-interactive element <dir> cannot have interactive role 'menu'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 10
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 21,
|
||||
"line": 11
|
||||
},
|
||||
"message": "A11y: Non-interactive element <dl> cannot have interactive role 'menubar'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 11
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 23,
|
||||
"line": 12
|
||||
},
|
||||
"message": "A11y: Non-interactive element <dfn> cannot have interactive role 'menuitem'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 12
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 43,
|
||||
"line": 13
|
||||
},
|
||||
"message": "A11y: Non-interactive element <dt> cannot have interactive role 'menuitemcheckbox'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 13
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 46,
|
||||
"line": 14
|
||||
},
|
||||
"message": "A11y: Non-interactive element <fieldset> cannot have interactive role 'menuitemradio'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 14
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 50,
|
||||
"line": 16
|
||||
},
|
||||
"message": "A11y: Non-interactive element <figcaption> cannot have interactive role 'menuitemradio'",
|
||||
"start": {
|
||||
"column": 2,
|
||||
"line": 16
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 38,
|
||||
"line": 18
|
||||
},
|
||||
"message": "A11y: Non-interactive element <figure> cannot have interactive role 'option'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 18
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 36,
|
||||
"line": 19
|
||||
},
|
||||
"message": "A11y: Non-interactive element <footer> cannot have interactive role 'radio'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 19
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 26,
|
||||
"line": 20
|
||||
},
|
||||
"message": "A11y: Non-interactive element <form> cannot have interactive role 'radiogroup'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 20
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 20,
|
||||
"line": 21
|
||||
},
|
||||
"message": "A11y: Non-interactive element <frame> cannot have interactive role 'row'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 21
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 32,
|
||||
"line": 22
|
||||
},
|
||||
"message": "A11y: Non-interactive element <h1> cannot have interactive role 'rowheader'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 22
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 70,
|
||||
"line": 23
|
||||
},
|
||||
"message": "A11y: Non-interactive element <h2> cannot have interactive role 'scrollbar'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 23
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 32,
|
||||
"line": 24
|
||||
},
|
||||
"message": "A11y: Non-interactive element <h3> cannot have interactive role 'searchbox'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 24
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 47,
|
||||
"line": 25
|
||||
},
|
||||
"message": "A11y: Non-interactive element <h4> cannot have interactive role 'slider'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 25
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 33,
|
||||
"line": 26
|
||||
},
|
||||
"message": "A11y: Non-interactive element <h5> cannot have interactive role 'spinbutton'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 26
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 42,
|
||||
"line": 27
|
||||
},
|
||||
"message": "A11y: Non-interactive element <h6> cannot have interactive role 'switch'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 27
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 17,
|
||||
"line": 28
|
||||
},
|
||||
"message": "A11y: Non-interactive element <hr> cannot have interactive role 'tab'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 28
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 38,
|
||||
"line": 29
|
||||
},
|
||||
"message": "A11y: Non-interactive element <img> cannot have interactive role 'tabpanel'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 29
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 24,
|
||||
"line": 30
|
||||
},
|
||||
"message": "A11y: Non-interactive element <label> cannot have interactive role 'textbox'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 30
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-label-has-associated-control",
|
||||
"end": {
|
||||
"column": 24,
|
||||
"line": 30
|
||||
},
|
||||
"message": "A11y: A form label must be associated with a control.",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 30
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 25,
|
||||
"line": 31
|
||||
},
|
||||
"message": "A11y: Non-interactive element <legend> cannot have interactive role 'toolbar'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 31
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 18,
|
||||
"line": 32
|
||||
},
|
||||
"message": "A11y: Non-interactive element <li> cannot have interactive role 'tree'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 32
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 24,
|
||||
"line": 33
|
||||
},
|
||||
"message": "A11y: Non-interactive element <main> cannot have interactive role 'treegrid'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 33
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 38,
|
||||
"line": 34
|
||||
},
|
||||
"message": "A11y: Non-interactive element <mark> cannot have interactive role 'treeitem'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 34
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 31,
|
||||
"line": 35
|
||||
},
|
||||
"message": "A11y: Non-interactive element <marquee> cannot have interactive role 'doc-backlink'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 35
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-distracting-elements",
|
||||
"end": {
|
||||
"column": 31,
|
||||
"line": 35
|
||||
},
|
||||
"message": "A11y: Avoid <marquee> elements",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 35
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 29,
|
||||
"line": 36
|
||||
},
|
||||
"message": "A11y: Non-interactive element <menu> cannot have interactive role 'doc-biblioref'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 36
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 29,
|
||||
"line": 37
|
||||
},
|
||||
"message": "A11y: Non-interactive element <meter> cannot have interactive role 'doc-glossref'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 37
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 26,
|
||||
"line": 38
|
||||
},
|
||||
"message": "A11y: Non-interactive element <nav> cannot have interactive role 'doc-noteref'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 38
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 20,
|
||||
"line": 39
|
||||
},
|
||||
"message": "A11y: Non-interactive element <ol> cannot have interactive role 'button'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 39
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 42,
|
||||
"line": 40
|
||||
},
|
||||
"message": "A11y: Non-interactive element <optgroup> cannot have interactive role 'treeitem'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 40
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 26,
|
||||
"line": 41
|
||||
},
|
||||
"message": "A11y: Non-interactive element <output> cannot have interactive role 'treegrid'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 41
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 25,
|
||||
"line": 42
|
||||
},
|
||||
"message": "A11y: Non-interactive element <p> cannot have interactive role 'columnheader'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 42
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 19,
|
||||
"line": 43
|
||||
},
|
||||
"message": "A11y: Non-interactive element <pre> cannot have interactive role 'tree'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 43
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 61,
|
||||
"line": 44
|
||||
},
|
||||
"message": "A11y: Non-interactive element <progress> cannot have interactive role 'combobox'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 44
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 23,
|
||||
"line": 45
|
||||
},
|
||||
"message": "A11y: Non-interactive element <ruby> cannot have interactive role 'toolbar'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 45
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 56,
|
||||
"line": 46
|
||||
},
|
||||
"message": "A11y: Non-interactive element <section> cannot have interactive role 'radio'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 46
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 21,
|
||||
"line": 47
|
||||
},
|
||||
"message": "A11y: Non-interactive element <table> cannot have interactive role 'menu'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 47
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 26,
|
||||
"line": 48
|
||||
},
|
||||
"message": "A11y: Non-interactive element <tbody> cannot have interactive role 'searchbox'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 48
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 20,
|
||||
"line": 49
|
||||
},
|
||||
"message": "A11y: Non-interactive element <td> cannot have interactive role 'button'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 49
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 24,
|
||||
"line": 50
|
||||
},
|
||||
"message": "A11y: Non-interactive element <tfoot> cannot have interactive role 'listbox'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 50
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 41,
|
||||
"line": 51
|
||||
},
|
||||
"message": "A11y: Non-interactive element <thead> cannot have interactive role 'slider'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 51
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 28,
|
||||
"line": 52
|
||||
},
|
||||
"message": "A11y: Non-interactive element <time> cannot have interactive role 'doc-backlink'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 52
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-element-to-interactive-role",
|
||||
"end": {
|
||||
"column": 24,
|
||||
"line": 53
|
||||
},
|
||||
"message": "A11y: Non-interactive element <ul> cannot have interactive role 'spinbutton'",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 53
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,16 @@
|
||||
<!-- valid -->
|
||||
<button />
|
||||
<button tabindex='0' />
|
||||
<button tabindex='{0}' />
|
||||
<div />
|
||||
<div tabindex='-1' />
|
||||
<div role='button' tabindex='0' />
|
||||
<div role='article' tabindex='-1' />
|
||||
<article tabindex='-1' />
|
||||
<div role="tabpanel" tabindex='0' />
|
||||
<svelte:element this={Math.random() ? 'button' : 'div'} tabindex="0" />
|
||||
<!-- invalid -->
|
||||
<div tabindex='0' />
|
||||
<div role='article' tabindex='0' />
|
||||
<article tabindex='0' />
|
||||
<article tabindex='{0}' />
|
||||
@ -0,0 +1,50 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-no-noninteractive-tabindex",
|
||||
"end": {
|
||||
"column": 20,
|
||||
"line": 13
|
||||
},
|
||||
"message": "A11y: noninteractive element cannot have nonnegative tabIndex value",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 13
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-tabindex",
|
||||
"end": {
|
||||
"column": 35,
|
||||
"line": 14
|
||||
},
|
||||
"message": "A11y: noninteractive element cannot have nonnegative tabIndex value",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 14
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-tabindex",
|
||||
"end": {
|
||||
"column": 24,
|
||||
"line": 15
|
||||
},
|
||||
"message": "A11y: noninteractive element cannot have nonnegative tabIndex value",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 15
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-noninteractive-tabindex",
|
||||
"end": {
|
||||
"column": 26,
|
||||
"line": 16
|
||||
},
|
||||
"message": "A11y: noninteractive element cannot have nonnegative tabIndex value",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 16
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,48 @@
|
||||
<a href="/" role="link">a link</a>
|
||||
<article role="article" />
|
||||
<aside role="complementary" />
|
||||
<body role="document" />
|
||||
<button role="button" />
|
||||
<datalist role="listbox" />
|
||||
<dd role="definition" />
|
||||
<dfn role="term" />
|
||||
<details role="group" />
|
||||
<dialog role="dialog" />
|
||||
<dt role="term" />
|
||||
<fieldset role="group" />
|
||||
<figure role="figure" />
|
||||
<form role="form">foo</form>
|
||||
<h1 role="heading">heading</h1>
|
||||
<h2 role="heading">heading</h2>
|
||||
<h3 role="heading">heading</h3>
|
||||
<h4 role="heading">heading</h4>
|
||||
<h5 role="heading">heading</h5>
|
||||
<h6 role="heading">heading</h6>
|
||||
<hr role="separator" />
|
||||
<li role="listitem" />
|
||||
<link role="link" />
|
||||
<main role="main"></main>
|
||||
<menu role="list" />
|
||||
<nav role="navigation" />
|
||||
<ol role="list" />
|
||||
<optgroup role="group" />
|
||||
<option role="option" />
|
||||
<output role="status" />
|
||||
<progress role="progressbar" />
|
||||
<section role="region" />
|
||||
<summary role="button" />
|
||||
<table role="table" />
|
||||
<tbody role="rowgroup" />
|
||||
<textarea role="textbox" />
|
||||
<tfoot role="rowgroup" />
|
||||
<thead role="rowgroup" />
|
||||
<tr role="row" />
|
||||
<ul role="list" />
|
||||
|
||||
<!-- Tested header/footer not nested in section/article -->
|
||||
<header role="banner"></header>
|
||||
<footer role="contentinfo"></footer>
|
||||
|
||||
<!-- Allowed -->
|
||||
<!-- svelte-ignore a11y-no-noninteractive-element-to-interactive-role -->
|
||||
<menu role="menu" />
|
||||
@ -0,0 +1,506 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 23,
|
||||
"line": 1
|
||||
},
|
||||
"message": "A11y: Redundant role 'link'",
|
||||
"start": {
|
||||
"column": 12,
|
||||
"line": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 23,
|
||||
"line": 2
|
||||
},
|
||||
"message": "A11y: Redundant role 'article'",
|
||||
"start": {
|
||||
"column": 9,
|
||||
"line": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 27,
|
||||
"line": 3
|
||||
},
|
||||
"message": "A11y: Redundant role 'complementary'",
|
||||
"start": {
|
||||
"column": 7,
|
||||
"line": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 21,
|
||||
"line": 4
|
||||
},
|
||||
"message": "A11y: Redundant role 'document'",
|
||||
"start": {
|
||||
"column": 6,
|
||||
"line": 4
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 21,
|
||||
"line": 5
|
||||
},
|
||||
"message": "A11y: Redundant role 'button'",
|
||||
"start": {
|
||||
"column": 8,
|
||||
"line": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 24,
|
||||
"line": 6
|
||||
},
|
||||
"message": "A11y: Redundant role 'listbox'",
|
||||
"start": {
|
||||
"column": 10,
|
||||
"line": 6
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 21,
|
||||
"line": 7
|
||||
},
|
||||
"message": "A11y: Redundant role 'definition'",
|
||||
"start": {
|
||||
"column": 4,
|
||||
"line": 7
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 16,
|
||||
"line": 8
|
||||
},
|
||||
"message": "A11y: Redundant role 'term'",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 8
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 21,
|
||||
"line": 9
|
||||
},
|
||||
"message": "A11y: Redundant role 'group'",
|
||||
"start": {
|
||||
"column": 9,
|
||||
"line": 9
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 21,
|
||||
"line": 10
|
||||
},
|
||||
"message": "A11y: Redundant role 'dialog'",
|
||||
"start": {
|
||||
"column": 8,
|
||||
"line": 10
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 15,
|
||||
"line": 11
|
||||
},
|
||||
"message": "A11y: Redundant role 'term'",
|
||||
"start": {
|
||||
"column": 4,
|
||||
"line": 11
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 22,
|
||||
"line": 12
|
||||
},
|
||||
"message": "A11y: Redundant role 'group'",
|
||||
"start": {
|
||||
"column": 10,
|
||||
"line": 12
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 21,
|
||||
"line": 13
|
||||
},
|
||||
"message": "A11y: Redundant role 'figure'",
|
||||
"start": {
|
||||
"column": 8,
|
||||
"line": 13
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 17,
|
||||
"line": 14
|
||||
},
|
||||
"message": "A11y: Redundant role 'form'",
|
||||
"start": {
|
||||
"column": 6,
|
||||
"line": 14
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 18,
|
||||
"line": 15
|
||||
},
|
||||
"message": "A11y: Redundant role 'heading'",
|
||||
"start": {
|
||||
"column": 4,
|
||||
"line": 15
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 18,
|
||||
"line": 16
|
||||
},
|
||||
"message": "A11y: Redundant role 'heading'",
|
||||
"start": {
|
||||
"column": 4,
|
||||
"line": 16
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 18,
|
||||
"line": 17
|
||||
},
|
||||
"message": "A11y: Redundant role 'heading'",
|
||||
"start": {
|
||||
"column": 4,
|
||||
"line": 17
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 18,
|
||||
"line": 18
|
||||
},
|
||||
"message": "A11y: Redundant role 'heading'",
|
||||
"start": {
|
||||
"column": 4,
|
||||
"line": 18
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 18,
|
||||
"line": 19
|
||||
},
|
||||
"message": "A11y: Redundant role 'heading'",
|
||||
"start": {
|
||||
"column": 4,
|
||||
"line": 19
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 18,
|
||||
"line": 20
|
||||
},
|
||||
"message": "A11y: Redundant role 'heading'",
|
||||
"start": {
|
||||
"column": 4,
|
||||
"line": 20
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 20,
|
||||
"line": 21
|
||||
},
|
||||
"message": "A11y: Redundant role 'separator'",
|
||||
"start": {
|
||||
"column": 4,
|
||||
"line": 21
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 19,
|
||||
"line": 22
|
||||
},
|
||||
"message": "A11y: Redundant role 'listitem'",
|
||||
"start": {
|
||||
"column": 4,
|
||||
"line": 22
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 17,
|
||||
"line": 23
|
||||
},
|
||||
"message": "A11y: Redundant role 'link'",
|
||||
"start": {
|
||||
"column": 6,
|
||||
"line": 23
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 17,
|
||||
"line": 24
|
||||
},
|
||||
"message": "A11y: Redundant role 'main'",
|
||||
"start": {
|
||||
"column": 6,
|
||||
"line": 24
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 17,
|
||||
"line": 25
|
||||
},
|
||||
"message": "A11y: Redundant role 'list'",
|
||||
"start": {
|
||||
"column": 6,
|
||||
"line": 25
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 22,
|
||||
"line": 26
|
||||
},
|
||||
"message": "A11y: Redundant role 'navigation'",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 26
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 15,
|
||||
"line": 27
|
||||
},
|
||||
"message": "A11y: Redundant role 'list'",
|
||||
"start": {
|
||||
"column": 4,
|
||||
"line": 27
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 22,
|
||||
"line": 28
|
||||
},
|
||||
"message": "A11y: Redundant role 'group'",
|
||||
"start": {
|
||||
"column": 10,
|
||||
"line": 28
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 21,
|
||||
"line": 29
|
||||
},
|
||||
"message": "A11y: Redundant role 'option'",
|
||||
"start": {
|
||||
"column": 8,
|
||||
"line": 29
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 21,
|
||||
"line": 30
|
||||
},
|
||||
"message": "A11y: Redundant role 'status'",
|
||||
"start": {
|
||||
"column": 8,
|
||||
"line": 30
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 28,
|
||||
"line": 31
|
||||
},
|
||||
"message": "A11y: Redundant role 'progressbar'",
|
||||
"start": {
|
||||
"column": 10,
|
||||
"line": 31
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 22,
|
||||
"line": 32
|
||||
},
|
||||
"message": "A11y: Redundant role 'region'",
|
||||
"start": {
|
||||
"column": 9,
|
||||
"line": 32
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 22,
|
||||
"line": 33
|
||||
},
|
||||
"message": "A11y: Redundant role 'button'",
|
||||
"start": {
|
||||
"column": 9,
|
||||
"line": 33
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 19,
|
||||
"line": 34
|
||||
},
|
||||
"message": "A11y: Redundant role 'table'",
|
||||
"start": {
|
||||
"column": 7,
|
||||
"line": 34
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 22,
|
||||
"line": 35
|
||||
},
|
||||
"message": "A11y: Redundant role 'rowgroup'",
|
||||
"start": {
|
||||
"column": 7,
|
||||
"line": 35
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 24,
|
||||
"line": 36
|
||||
},
|
||||
"message": "A11y: Redundant role 'textbox'",
|
||||
"start": {
|
||||
"column": 10,
|
||||
"line": 36
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 22,
|
||||
"line": 37
|
||||
},
|
||||
"message": "A11y: Redundant role 'rowgroup'",
|
||||
"start": {
|
||||
"column": 7,
|
||||
"line": 37
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 22,
|
||||
"line": 38
|
||||
},
|
||||
"message": "A11y: Redundant role 'rowgroup'",
|
||||
"start": {
|
||||
"column": 7,
|
||||
"line": 38
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 14,
|
||||
"line": 39
|
||||
},
|
||||
"message": "A11y: Redundant role 'row'",
|
||||
"start": {
|
||||
"column": 4,
|
||||
"line": 39
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 15,
|
||||
"line": 40
|
||||
},
|
||||
"message": "A11y: Redundant role 'list'",
|
||||
"start": {
|
||||
"column": 4,
|
||||
"line": 40
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 21,
|
||||
"line": 43
|
||||
},
|
||||
"message": "A11y: Redundant role 'banner'",
|
||||
"start": {
|
||||
"column": 8,
|
||||
"line": 43
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"column": 26,
|
||||
"line": 44
|
||||
},
|
||||
"message": "A11y: Redundant role 'contentinfo'",
|
||||
"start": {
|
||||
"column": 8,
|
||||
"line": 44
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,19 @@
|
||||
<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={() => {}} />
|
||||
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
|
||||
<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": 17
|
||||
},
|
||||
"message": "A11y: <div> with keydown handler must have an ARIA role",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 17
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-static-element-interactions",
|
||||
"end": {
|
||||
"column": 76,
|
||||
"line": 19
|
||||
},
|
||||
"message": "A11y: <a> with mousedown, mouseup handlers must have an ARIA role",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 19
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,7 @@
|
||||
<script>
|
||||
import Widget from './Widget.svelte';
|
||||
</script>
|
||||
|
||||
<Widget scope="foo">
|
||||
<input autofocus>
|
||||
</Widget>
|
||||
@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-autofocus",
|
||||
"message": "A11y: Avoid using autofocus",
|
||||
"start": {
|
||||
"column": 8,
|
||||
"line": 6
|
||||
},
|
||||
"end": {
|
||||
"line": 6,
|
||||
"column": 17
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,11 @@
|
||||
<div role="heading"></div>
|
||||
<span role="checkbox"></span>
|
||||
<div role="meter"></div>
|
||||
<div role="scrollbar"></div>
|
||||
|
||||
<div role="heading" aria-level="1"></div>
|
||||
<span role="checkbox" aria-checked="false"></span>
|
||||
<div role="meter" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
<div role="scrollbar" aria-controls="panel" aria-valuenow="50"></div>
|
||||
<input role="switch" type="checkbox" />
|
||||
<svelte:element this={Math.random() ? 'input' : 'div'} role="checkbox" />
|
||||
@ -0,0 +1,50 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-role-has-required-aria-props",
|
||||
"message": "A11y: Elements with the ARIA role \"heading\" must have the following attributes defined: \"aria-level\"",
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 19
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-role-has-required-aria-props",
|
||||
"message": "A11y: Elements with the ARIA role \"checkbox\" must have the following attributes defined: \"aria-checked\"",
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 6
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 21
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-role-has-required-aria-props",
|
||||
"message": "A11y: Elements with the ARIA role \"meter\" must have the following attributes defined: \"aria-valuenow\"",
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-role-has-required-aria-props",
|
||||
"message": "A11y: Elements with the ARIA role \"scrollbar\" must have the following attributes defined: \"aria-controls\", \"aria-valuenow\"",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 4
|
||||
},
|
||||
"end": {
|
||||
"column": 21,
|
||||
"line": 4
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,371 @@
|
||||
<!-- INVALID -->
|
||||
<a aria-setsize="0" href="/">Link</a>
|
||||
<area aria-pressed alt="" />
|
||||
<article aria-autocomplete="inline" />
|
||||
<aside aria-modal />
|
||||
<body aria-invalid />
|
||||
<button aria-valuemax="0" />
|
||||
<datalist aria-valuenow="0" />
|
||||
<dd aria-rowindex="0" />
|
||||
<dfn aria-colcount="0" />
|
||||
<dialog aria-posinset="0" />
|
||||
<details aria-orientation="undefined" />
|
||||
<dt aria-valuemin="0" />
|
||||
<fieldset aria-orientation="undefined" />
|
||||
<form aria-disabled />
|
||||
<h1 aria-selected>H1</h1>
|
||||
<h2 aria-selected>H2</h2>
|
||||
<h3 aria-expanded>H3</h3>
|
||||
<h4 aria-valuemin="0">H4</h4>
|
||||
<h5 aria-readonly>H5</h5>
|
||||
<h6 aria-valuemin="0">H6</h6>
|
||||
<hr aria-required />
|
||||
<img aria-level="0" alt="invalid aria" />
|
||||
<li aria-required />
|
||||
<link aria-rowcount="0" />
|
||||
<menu aria-valuemin="0" />
|
||||
<meter aria-colspan="0" />
|
||||
<nav aria-valuetext="" />
|
||||
<ol aria-sort="none" />
|
||||
<option aria-invalid />
|
||||
<optgroup aria-sort="none" />
|
||||
<output aria-multiline />
|
||||
<progress aria-rowcount="0" />
|
||||
<section aria-invalid />
|
||||
<summary aria-rowcount="0" />
|
||||
<tbody aria-colspan="0" />
|
||||
<textarea aria-valuenow="0" />
|
||||
<tfoot aria-required />
|
||||
<thead aria-valuemin="0" />
|
||||
<tr aria-pressed />
|
||||
<ul aria-multiselectable />
|
||||
|
||||
<div role="alert" aria-colspan="0" />
|
||||
<div role="alertdialog" aria-autocomplete="inline" />
|
||||
<div role="application" aria-required />
|
||||
<div role="article" aria-multiline />
|
||||
<div role="banner" aria-autocomplete="inline" />
|
||||
<div role="blockquote" aria-valuetext="" />
|
||||
<div role="button" aria-colspan="0" />
|
||||
<div role="caption" aria-setsize="0" />
|
||||
<div role="cell" aria-multiline />
|
||||
<div role="checkbox" aria-multiline aria-checked />
|
||||
<div role="code" aria-invalid />
|
||||
<div role="columnheader" aria-colcount="0" />
|
||||
<div role="combobox" aria-multiselectable aria-controls={[]} aria-expanded />
|
||||
<div role="complementary" aria-readonly />
|
||||
<div role="contentinfo" aria-valuetext="" />
|
||||
<div role="definition" aria-multiline />
|
||||
<div role="deletion" aria-expanded />
|
||||
<div role="dialog" aria-multiline />
|
||||
<div role="directory" aria-rowcount="0" />
|
||||
<div role="document" aria-valuemin="0" />
|
||||
<div role="emphasis" aria-rowindex="0" />
|
||||
<div role="feed" aria-colindex="0" />
|
||||
<div role="figure" aria-valuemax="0" />
|
||||
<div role="form" aria-readonly />
|
||||
<div role="generic" aria-valuemax="0" />
|
||||
<div role="grid" aria-checked />
|
||||
<div role="gridcell" aria-level="0" />
|
||||
<div role="group" aria-colspan="0" />
|
||||
<div role="heading" aria-activedescendant="id" tabindex="-1" aria-level="0" />
|
||||
<div role="insertion" aria-errormessage="error" />
|
||||
<div role="link" aria-multiline />
|
||||
<div role="list" aria-selected />
|
||||
<div role="listbox" aria-haspopup />
|
||||
<div role="listitem" aria-activedescendant="id" tabindex="-1" />
|
||||
<div role="log" aria-required />
|
||||
<div role="main" aria-sort="none" />
|
||||
<div role="marquee" aria-autocomplete="inline" />
|
||||
<div role="math" aria-multiline />
|
||||
<div role="menu" aria-checked />
|
||||
<div role="menubar" aria-errormessage="error" />
|
||||
<div role="menuitem" aria-checked />
|
||||
<div role="menuitemcheckbox" aria-pressed aria-checked="false" />
|
||||
<div role="menuitemradio" aria-rowspan="0" aria-checked="false" />
|
||||
<div role="meter" aria-valuenow="0" aria-haspopup />
|
||||
<div role="navigation" aria-expanded />
|
||||
<div role="none" aria-placeholder="" />
|
||||
<div role="note" aria-modal />
|
||||
<div role="option" aria-selected aria-valuemax="0" />
|
||||
<div role="paragraph" aria-level="0" />
|
||||
<div role="presentation" aria-disabled />
|
||||
<div role="progressbar" aria-expanded />
|
||||
<div role="radio" aria-checked aria-rowindex="0" />
|
||||
<div role="radiogroup" aria-valuenow="0" />
|
||||
<div role="region" aria-rowspan="0" />
|
||||
<div role="row" aria-required />
|
||||
<div role="rowgroup" aria-expanded />
|
||||
<div role="rowheader" aria-activedescendant="id" tabindex="0" />
|
||||
<div role="scrollbar" aria-controls={[]} aria-valuenow="0" aria-rowspan="0" />
|
||||
<div role="search" aria-autocomplete="inline" />
|
||||
<div role="searchbox" aria-colindex="0" />
|
||||
<div role="separator" aria-sort="none" />
|
||||
<div role="slider" aria-valuenow="0" aria-placeholder="" />
|
||||
<div role="spinbutton" aria-posinset="0" />
|
||||
<div role="status" aria-valuemin="0" />
|
||||
<div role="strong" aria-valuemin="0" />
|
||||
<div role="subscript" aria-colcount="0" />
|
||||
<div role="superscript" aria-level="0" />
|
||||
<div role="switch" aria-checked aria-valuenow="0" />
|
||||
<div role="tab" aria-required />
|
||||
<div role="table" aria-modal />
|
||||
<div role="tablist" aria-setsize="0" />
|
||||
<div role="tabpanel" aria-multiselectable />
|
||||
<div role="term" aria-posinset="0" />
|
||||
<div role="textbox" aria-colspan="0" />
|
||||
<div role="time" aria-selected />
|
||||
<div role="timer" aria-sort="none" />
|
||||
<div role="toolbar" aria-valuetext="" />
|
||||
<div role="tooltip" aria-multiline />
|
||||
<div role="tree" aria-expanded />
|
||||
<div role="treegrid" aria-level="0" />
|
||||
<div role="treeitem" aria-selected aria-activedescendant="id" tabindex="-1" />
|
||||
<div role="doc-abstract" aria-colindex="0" />
|
||||
<div role="doc-acknowledgments" aria-setsize="0" />
|
||||
<div role="doc-afterword" aria-modal />
|
||||
<div role="doc-appendix" aria-activedescendant="id" tabindex="-1" />
|
||||
<div role="doc-backlink" aria-colspan="0" />
|
||||
<div role="doc-biblioentry" aria-valuemax="0" />
|
||||
<div role="doc-bibliography" aria-level="0" />
|
||||
<div role="doc-biblioref" aria-checked />
|
||||
<div role="doc-chapter" aria-required />
|
||||
<div role="doc-colophon" aria-setsize="0" />
|
||||
<div role="doc-conclusion" aria-colindex="0" />
|
||||
<div role="doc-cover" aria-modal />
|
||||
<div role="doc-credit" aria-selected />
|
||||
<div role="doc-credits" aria-orientation="undefined" />
|
||||
<div role="doc-dedication" aria-level="0" />
|
||||
<div role="doc-endnote" aria-checked />
|
||||
<div role="doc-endnotes" aria-colcount="0" />
|
||||
<div role="doc-epigraph" aria-multiline />
|
||||
<div role="doc-epilogue" aria-colcount="0" />
|
||||
<div role="doc-errata" aria-sort="none" />
|
||||
<div role="doc-example" aria-multiselectable />
|
||||
<div role="doc-footnote" aria-rowcount="0" />
|
||||
<div role="doc-foreword" aria-valuenow="0" />
|
||||
<div role="doc-glossary" aria-valuetext="" />
|
||||
<div role="doc-glossref" aria-placeholder="" />
|
||||
<div role="doc-index" aria-rowcount="0" />
|
||||
<div role="doc-introduction" aria-pressed />
|
||||
<div role="doc-noteref" aria-valuenow="0" />
|
||||
<div role="doc-notice" aria-selected />
|
||||
<div role="doc-pagebreak" aria-rowcount="0" />
|
||||
<div role="doc-pagelist" aria-modal />
|
||||
<div role="doc-part" aria-setsize="0" />
|
||||
<div role="doc-preface" aria-orientation="undefined" />
|
||||
<div role="doc-prologue" aria-required />
|
||||
<div role="doc-pullquote" aria-rowcount="0" />
|
||||
<div role="doc-qna" aria-setsize="0" />
|
||||
<div role="doc-subtitle" aria-rowindex="0" />
|
||||
<div role="doc-tip" aria-valuenow="0" />
|
||||
<div role="doc-toc" aria-posinset="0" />
|
||||
|
||||
<!-- input and menuitem have different implicit roles based on different type attributes, and thus different valid and invalid props -->
|
||||
<!-- INVALID -->
|
||||
<input type="text" aria-rowspan="0" /> <!-- implicit role: textbox -->
|
||||
<input type="tel" aria-pressed /> <!-- implicit role: textbox -->
|
||||
<input type="url" aria-level="0" /> <!-- implicit role: textbox -->
|
||||
<input type="email" aria-pressed /> <!-- implicit role: textbox -->
|
||||
<input type="search" aria-valuetext="text" /> <!-- implicit role: searchbox -->
|
||||
<input type="text" list={['id']} aria-valuemin="0" /> <!-- implicit role: combobox -->
|
||||
<input type="tel" list={['id']} aria-colspan="0" /> <!-- implicit role: combobox -->
|
||||
<input type="url" list={['id']} aria-posinset="0" /> <!-- implicit role: combobox -->
|
||||
<input type="email" list={['id']} aria-modal /> <!-- implicit role: combobox -->
|
||||
<input type="search" list={['id']} aria-rowindex="0" /> <!-- implicit role: combobox -->
|
||||
<input type="image" alt="some text" aria-valuemax="0" /> <!-- implicit role: button -->
|
||||
<input type="reset" aria-modal /> <!-- implicit role: button -->
|
||||
<input type="submit" aria-placeholder="placeholder" /> <!-- implicit role: button -->
|
||||
<input type="checkbox" aria-rowindex="0" /> <!-- implicit role: checkbox -->
|
||||
<input type="radio" aria-valuetext="text" /> <!-- implicit role: radio -->
|
||||
<input type="range" aria-checked /> <!-- implicit role: slider -->
|
||||
<menuitem type="command" aria-colindex="0" /> <!-- implicit role: menuitem -->
|
||||
<menuitem type="checkbox" aria-colcount="0" /> <!-- implicit role: menuitemcheckbox -->
|
||||
<menuitem type="radio" aria-placeholder="placeholder" /> <!-- implicit role: menuitemradio -->
|
||||
|
||||
<!-- VALID -->
|
||||
<a aria-keyshortcuts="" href="/">Link</a>
|
||||
<area aria-expanded alt="" />
|
||||
<article aria-dropeffect="none" />
|
||||
<aside aria-keyshortcuts="" />
|
||||
<body aria-labelledby="id" />
|
||||
<button aria-hidden />
|
||||
<datalist aria-activedescendant="id" tabindex="0" />
|
||||
<dd aria-labelledby="id" />
|
||||
<dfn aria-details="id" />
|
||||
<dialog aria-keyshortcuts="" />
|
||||
<details aria-keyshortcuts="" />
|
||||
<dt aria-hidden />
|
||||
<fieldset aria-owns="id" />
|
||||
<form aria-keyshortcuts="" />
|
||||
<h1 aria-keyshortcuts="">H1</h1>
|
||||
<h2 aria-controls={[]}>H2</h2>
|
||||
<h3 aria-controls={[]}>H3</h3>
|
||||
<h4 aria-details="id">H4</h4>
|
||||
<h5 aria-grabbed>H5</h5>
|
||||
<h6 aria-grabbed>H6</h6>
|
||||
<hr aria-relevant="all" />
|
||||
<img aria-flowto="id" alt="Valid aria role" />
|
||||
<li aria-label="" />
|
||||
<link aria-hidden />
|
||||
<menu aria-roledescription="" />
|
||||
<meter aria-valuemin="0" />
|
||||
<nav aria-labelledby="id" />
|
||||
<ol aria-grabbed />
|
||||
<option aria-selected />
|
||||
<optgroup aria-hidden />
|
||||
<output aria-dropeffect="none" />
|
||||
<progress aria-hidden />
|
||||
<section aria-details="id" />
|
||||
<summary aria-controls={[]} />
|
||||
<tbody aria-controls={[]} />
|
||||
<textarea aria-busy />
|
||||
<tfoot aria-labelledby="id" />
|
||||
<thead aria-flowto="id" />
|
||||
<tr aria-describedby="id" />
|
||||
<ul aria-dropeffect="none" />
|
||||
|
||||
<div role="alert" aria-owns="id" />
|
||||
<div role="alertdialog" aria-busy />
|
||||
<div role="application" aria-invalid />
|
||||
<div role="article" aria-atomic />
|
||||
<div role="banner" aria-grabbed />
|
||||
<div role="blockquote" aria-busy />
|
||||
<div role="button" aria-busy />
|
||||
<div role="caption" aria-grabbed />
|
||||
<div role="cell" aria-rowindex="0" />
|
||||
<div role="checkbox" aria-checked aria-details="id" />
|
||||
<div role="code" aria-keyshortcuts="" />
|
||||
<div role="columnheader" aria-rowspan="0" />
|
||||
<div role="combobox" aria-invalid aria-controls={[]} aria-expanded />
|
||||
<div role="complementary" aria-label="" />
|
||||
<div role="contentinfo" aria-dropeffect="none" />
|
||||
<div role="definition" aria-grabbed />
|
||||
<div role="deletion" aria-busy />
|
||||
<div role="dialog" aria-flowto="id" />
|
||||
<div role="directory" aria-controls={[]} />
|
||||
<div role="document" aria-grabbed />
|
||||
<div role="emphasis" aria-atomic />
|
||||
<div role="feed" aria-atomic />
|
||||
<div role="figure" aria-busy />
|
||||
<div role="form" aria-roledescription="" />
|
||||
<div role="generic" aria-current />
|
||||
<div role="grid" aria-busy />
|
||||
<div role="gridcell" aria-relevant="all" />
|
||||
<div role="group" aria-busy />
|
||||
<div role="heading" aria-level="" aria-flowto="id" />
|
||||
<div role="img" aria-grabbed />
|
||||
<div role="insertion" aria-roledescription="" />
|
||||
<div role="link" aria-owns="id" />
|
||||
<div role="list" aria-labelledby="id" />
|
||||
<div role="listbox" aria-current />
|
||||
<div role="listitem" aria-controls={[]} />
|
||||
<div role="log" aria-controls={[]} />
|
||||
<div role="main" aria-keyshortcuts="" />
|
||||
<div role="marquee" aria-labelledby="id" />
|
||||
<div role="math" aria-labelledby="id" />
|
||||
<div role="menu" aria-atomic />
|
||||
<div role="menubar" aria-grabbed />
|
||||
<div role="menuitem" aria-grabbed />
|
||||
<div role="menuitemcheckbox" aria-checked aria-controls={[]} />
|
||||
<div role="menuitemradio" aria-checked aria-grabbed />
|
||||
<div role="meter" aria-valuenow="0" aria-valuetext="" />
|
||||
<div role="navigation" aria-controls={[]} />
|
||||
<div role="none" undefined />
|
||||
<div role="note" aria-hidden />
|
||||
<div role="option" aria-selected aria-describedby="id" />
|
||||
<div role="paragraph" aria-grabbed />
|
||||
<div role="presentation" aria-relevant="all" />
|
||||
<div role="progressbar" aria-valuemin="0" />
|
||||
<div role="radio" aria-checked aria-roledescription="" />
|
||||
<div role="radiogroup" aria-required />
|
||||
<div role="region" aria-roledescription="" />
|
||||
<div role="row" aria-posinset="0" />
|
||||
<div role="rowgroup" aria-busy />
|
||||
<div role="rowheader" aria-label="" />
|
||||
<div role="scrollbar" aria-controls={[]} aria-valuenow="0" aria-relevant="all" />
|
||||
<div role="search" aria-grabbed />
|
||||
<div role="searchbox" aria-dropeffect="none" />
|
||||
<div role="separator" aria-roledescription="" />
|
||||
<div role="slider" aria-valuenow="0" aria-relevant="all" />
|
||||
<div role="spinbutton" aria-required />
|
||||
<div role="status" aria-label="" />
|
||||
<div role="strong" aria-keyshortcuts="" />
|
||||
<div role="subscript" aria-keyshortcuts="" />
|
||||
<div role="superscript" aria-live="off" />
|
||||
<div role="switch" aria-checked aria-roledescription="" />
|
||||
<div role="tab" aria-flowto="id" />
|
||||
<div role="table" aria-rowcount="0" />
|
||||
<div role="tablist" aria-atomic />
|
||||
<div role="tabpanel" aria-labelledby="id" />
|
||||
<div role="term" aria-details="id" />
|
||||
<div role="textbox" aria-hidden />
|
||||
<div role="time" aria-label="" />
|
||||
<div role="timer" aria-hidden />
|
||||
<div role="toolbar" aria-roledescription="" />
|
||||
<div role="tooltip" aria-owns="id" />
|
||||
<div role="tree" aria-errormessage="error" />
|
||||
<div role="treegrid" aria-details="id" />
|
||||
<div role="treeitem" aria-selected="true" aria-dropeffect="none" />
|
||||
<div role="doc-abstract" aria-label="" />
|
||||
<div role="doc-acknowledgments" aria-controls={[]} />
|
||||
<div role="doc-afterword" aria-flowto="id" />
|
||||
<div role="doc-appendix" aria-describedby="id" />
|
||||
<div role="doc-backlink" aria-dropeffect="none" />
|
||||
<div role="doc-biblioentry" aria-roledescription="" />
|
||||
<div role="doc-bibliography" aria-labelledby="id" />
|
||||
<div role="doc-biblioref" aria-haspopup />
|
||||
<div role="doc-chapter" aria-controls={[]} />
|
||||
<div role="doc-colophon" aria-expanded />
|
||||
<div role="doc-conclusion" aria-dropeffect="none" />
|
||||
<div role="doc-cover" aria-controls={[]} />
|
||||
<div role="doc-credit" aria-haspopup />
|
||||
<div role="doc-credits" aria-describedby="id" />
|
||||
<div role="doc-dedication" aria-roledescription="" />
|
||||
<div role="doc-endnote" aria-errormessage="error" />
|
||||
<div role="doc-endnotes" aria-owns="id" />
|
||||
<div role="doc-epigraph" aria-controls={[]} />
|
||||
<div role="doc-epilogue" aria-relevant="all" />
|
||||
<div role="doc-errata" aria-keyshortcuts="" />
|
||||
<div role="doc-example" aria-invalid />
|
||||
<div role="doc-footnote" aria-labelledby="id" />
|
||||
<div role="doc-foreword" aria-expanded />
|
||||
<div role="doc-glossary" aria-grabbed />
|
||||
<div role="doc-glossref" aria-haspopup />
|
||||
<div role="doc-index" aria-controls={[]} />
|
||||
<div role="doc-introduction" aria-labelledby="id" />
|
||||
<div role="doc-noteref" aria-details="id" />
|
||||
<div role="doc-notice" aria-owns="id" />
|
||||
<div role="doc-pagebreak" aria-owns="id" />
|
||||
<div role="doc-pagelist" aria-disabled />
|
||||
<div role="doc-part" aria-relevant="all" />
|
||||
<div role="doc-preface" aria-label="" />
|
||||
<div role="doc-prologue" aria-invalid />
|
||||
<div role="doc-pullquote" undefined />
|
||||
<div role="doc-qna" aria-errormessage="error" />
|
||||
<div role="doc-subtitle" aria-errormessage="error" />
|
||||
<div role="doc-tip" aria-owns="id" />
|
||||
<div role="doc-toc" aria-expanded />
|
||||
|
||||
<!-- input and menuitem have different implicit roles based on different type attributes, and thus different valid and invalid props -->
|
||||
<!-- VALID -->
|
||||
<input type="text" aria-labelledby="id" /> <!-- implicit role: textbox -->
|
||||
<input type="tel" aria-readonly /> <!-- implicit role: textbox -->
|
||||
<input type="url" aria-errormessage="id" /> <!-- implicit role: textbox -->
|
||||
<input type="email" aria-details="id" /> <!-- implicit role: textbox -->
|
||||
<input type="searchbox" aria-owns="id" /> <!-- implicit role: searchbox -->
|
||||
<input type="text" list={['id']} aria-keyshortcuts="key" /> <!-- implicit role: combobox -->
|
||||
<input type="tel" list={['id']} aria-readonly /> <!-- implicit role: combobox -->
|
||||
<input type="url" list={['id']} aria-label="label" /> <!-- implicit role: combobox -->
|
||||
<input type="email" list={['id']} aria-activedescendant="id" /> <!-- implicit role: combobox -->
|
||||
<input type="search" list={['id']} aria-dropeffect="none" /> <!-- implicit role: combobox -->
|
||||
<input type="image" alt="some text" aria-pressed /> <!-- implicit role: button -->
|
||||
<input type="reset" aria-expanded /> <!-- implicit role: button -->
|
||||
<input type="submit" aria-disabled /> <!-- implicit role: button -->
|
||||
<input type="checkbox" aria-controls="id" /> <!-- implicit role: checkbox -->
|
||||
<input type="radio" aria-atomic /> <!-- implicit role: radio -->
|
||||
<input type="range" aria-hidden /> <!-- implicit role: slider -->
|
||||
<menuitem type="command" aria-live="off" /> <!-- implicit role: menuitem -->
|
||||
<menuitem type="checkbox" aria-relevant="all" /> <!-- implicit role: menuitemcheckbox -->
|
||||
<menuitem type="radio" aria-required /> <!-- implicit role: menuitemradio -->
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,6 @@
|
||||
<!-- valid -->
|
||||
<th scope />
|
||||
<svelte:element this={Math.random() ? 'th' : 'td'} scope />
|
||||
|
||||
<!-- invalid -->
|
||||
<div scope/>
|
||||
@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-misplaced-scope",
|
||||
"message": "A11y: The scope attribute should only be used with <th> elements",
|
||||
"start": {
|
||||
"line": 6,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 6,
|
||||
"column": 10
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,8 @@
|
||||
<script>
|
||||
let foo;
|
||||
</script>
|
||||
|
||||
<button tabindex='-1'/>
|
||||
<button tabindex='0'/>
|
||||
<button tabindex='1'/>
|
||||
<button tabindex='{foo}'/>
|
||||
@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-positive-tabindex",
|
||||
"message": "A11y: avoid tabindex values above zero",
|
||||
"start": {
|
||||
"line": 7,
|
||||
"column": 8
|
||||
},
|
||||
"end": {
|
||||
"line": 7,
|
||||
"column": 20
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1 @@
|
||||
<div use:whatever></div>
|
||||
@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"code": "missing-declaration",
|
||||
"message": "'whatever' is not defined. Consider adding a <script> block with 'export let whatever' to declare a prop",
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 17
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,11 @@
|
||||
<script>
|
||||
const obj = {
|
||||
foo : "bar",
|
||||
action(element, { leet }) {
|
||||
element.foo = this.foo + leet;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<button use:obj.action={{ leet: 1337 }}>action</button>
|
||||
<button use:foo.action={{ leet: 1337 }}>action</button>
|
||||
@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"code": "missing-declaration",
|
||||
"end": {
|
||||
"column": 39,
|
||||
"line": 11
|
||||
},
|
||||
"message": "'foo' is not defined",
|
||||
"start": {
|
||||
"column": 8,
|
||||
"line": 11
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"code": "invalid-action",
|
||||
"message": "Actions can only be applied to DOM elements, not components",
|
||||
"start": {
|
||||
"line": 7,
|
||||
"column": 8
|
||||
},
|
||||
"end": {
|
||||
"line": 7,
|
||||
"column": 15
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -0,0 +1,7 @@
|
||||
<script>
|
||||
import Widget from './Widget.svelte';
|
||||
|
||||
function foo(){}
|
||||
</script>
|
||||
|
||||
<Widget use:foo/>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue