Add tests for active descendant a11y rule

pull/8172/head
Nguyen Tran 4 years ago
parent dd11917fe5
commit 41e19db486

@ -0,0 +1,17 @@
<!-- 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" />
<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,17 @@
[
{
"code": "a11y-aria-activedescendant-has-tabindex",
"end": {
"character": 568,
"column": 36,
"line": 16
},
"message": "A11y: Elements with attribute aria-activedescendant should have tabindex value",
"pos": 537,
"start": {
"character": 537,
"column": 5,
"line": 16
}
}
]
Loading…
Cancel
Save