update tabindex warning to ignore tabpanels

pull/8025/head
Bert B 4 years ago
parent 91f8764145
commit b4986ea691

@ -43,7 +43,9 @@ const interactive_roles = new Set(
.concat(
// 'toolbar' does not descend from widget, but it does support
// aria-activedescendant, thus in practice we treat it as a widget.
'toolbar'
'toolbar',
//focusable tabpanel elements are recommended if any panels in a set contain content where the first element in the panel is not focusable.
'tabpanel'
)
);

@ -7,8 +7,11 @@
<div role='button' tabindex='0' />
<div role='article' tabindex='-1' />
<article tabindex='-1' />
<div role="tabpanel" tabindex='0' />
<!-- invalid -->
<div tabindex='0' />
<div role='article' tabindex='0' />
<article tabindex='0' />
<article tabindex='{0}' />

@ -2,61 +2,61 @@
{
"code": "a11y-no-noninteractive-tabindex",
"end": {
"character": 241,
"character": 278,
"column": 20,
"line": 11
"line": 12
},
"message": "A11y: noninteractive element cannot have positive tabIndex value",
"pos": 221,
"pos": 258,
"start": {
"character": 221,
"character": 258,
"column": 0,
"line": 11
"line": 12
}
},
{
"code": "a11y-no-noninteractive-tabindex",
"end": {
"character": 277,
"character": 314,
"column": 35,
"line": 12
"line": 13
},
"message": "A11y: noninteractive element cannot have positive tabIndex value",
"pos": 242,
"pos": 279,
"start": {
"character": 242,
"character": 279,
"column": 0,
"line": 12
"line": 13
}
},
{
"code": "a11y-no-noninteractive-tabindex",
"end": {
"character": 302,
"character": 339,
"column": 24,
"line": 13
"line": 14
},
"message": "A11y: noninteractive element cannot have positive tabIndex value",
"pos": 278,
"pos": 315,
"start": {
"character": 278,
"character": 315,
"column": 0,
"line": 13
"line": 14
}
},
{
"code": "a11y-no-noninteractive-tabindex",
"end": {
"character": 329,
"character": 366,
"column": 26,
"line": 14
"line": 15
},
"message": "A11y: noninteractive element cannot have positive tabIndex value",
"pos": 303,
"pos": 340,
"start": {
"character": 303,
"character": 340,
"column": 0,
"line": 14
"line": 15
}
}
]

Loading…
Cancel
Save