Skip to content

Commit

Permalink
fix(html-elms): update role allowances for nav element (#3402)
Browse files Browse the repository at this point in the history
* update role allowances for nav element

closes #3401

allows `none` and `presentation` role on `<nav>` element.

* tests for nav role allowance update

* add entries for nav role allowance updates

* Update lib/standards/html-elms.js

Co-authored-by: Wilco Fiers <WilcoFiers@users.noreply.github.com>

Co-authored-by: Wilco Fiers <WilcoFiers@users.noreply.github.com>
  • Loading branch information
2 people authored and straker committed May 12, 2022
1 parent 9db7c63 commit 8aa816a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/standards/html-elms.js
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,8 @@ const htmlElms = {
'doc-toc',
'menu',
'menubar',
'none',
'presentation',
'tablist'
],
shadowRoot: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ <h1 role="text" id="fail-text-1">ok</h1>
<!-- landmarks -->
<main><header role="banner" id="pass-header-banner">ok</header></main>
<main><footer role="contentinfo" id="pass-footer-contentinfo">ok</footer></main>
<nav role="none" id="pass-navnone-1">ok</nav>
<nav role="presentation" id="pass-navnone-2">ok</nav>

<img usemap="#my-map" />
<map name="my-map">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@
["#pass-img-valid-role-aria-labelledby"],
["#pass-img-valid-role-radio"],
["#pass-imgmap-1"],
["#pass-imgmap-2"]
["#pass-imgmap-2"],
["#pass-navnone-1"],
["#pass-navnone-2"]
],
"violations": [
["#fail-dd-no-role"],
Expand Down

0 comments on commit 8aa816a

Please sign in to comment.