Skip to content

Commit

Permalink
Update to aria-query 4.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jessebeach authored and ljharb committed Jun 19, 2020
1 parent d528e8c commit 765da0f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions __tests__/src/rules/role-supports-aria-props-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,8 @@ ruleTester.run('role-supports-aria-props', rule, {
{ code: '<textarea aria-hidden />' },
{ code: '<select aria-expanded />' },
{ code: '<datalist aria-expanded />' },
{ code: '<div role="heading" aria-level />'},
{ code: '<div role="heading" aria-level="1" />'}
{ code: '<div role="heading" aria-level />' },
{ code: '<div role="heading" aria-level="1" />' },

].concat(validTests).map(parserOptionsMapper),

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.10.2",
"aria-query": "^4.2.0",
"aria-query": "^4.2.2",
"array-includes": "^3.1.1",
"ast-types-flow": "^0.0.7",
"axe-core": "^3.5.4",
Expand Down
7 changes: 7 additions & 0 deletions src/util/isNonInteractiveElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@ const isNonInteractiveElement = (
if (!dom.has(tagName)) {
return false;
}
// <header> elements do not technically have semantics, unless the
// element is a direct descendant of <body>, and this plugin cannot
// reliably test that.
// @see https://www.w3.org/TR/wai-aria-practices/examples/landmarks/banner.html
if (tagName === 'header') {
return false;
}

return checkIsNonInteractiveElement(tagName, attributes);
};
Expand Down

0 comments on commit 765da0f

Please sign in to comment.