Skip to content

Commit

Permalink
fix(aria-required-children): allow menu as child of menu (#3820)
Browse files Browse the repository at this point in the history
  • Loading branch information
straker committed Dec 12, 2022
1 parent 07a5dad commit a6569e5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
8 changes: 7 additions & 1 deletion lib/standards/aria-roles.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,13 @@ const ariaRoles = {
},
menu: {
type: 'composite',
requiredOwned: ['group', 'menuitemradio', 'menuitem', 'menuitemcheckbox'],
requiredOwned: [
'group',
'menuitemradio',
'menuitem',
'menuitemcheckbox',
'menu'
],
allowedAttrs: [
'aria-activedescendant',
'aria-expanded',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,14 @@
<li><div role="radio"></div></li>
</ul>
</div>

<ul role="menu" id="pass15">
<li role="none">
<a href="#" role="menuitem">Foo</a>
<ul role="menu" id="pass16">
<li role="none">
<a href="#" role="menuitem">Bar</a>
</li>
</ul>
</li>
</ul>
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
["#pass11"],
["#pass12"],
["#pass13"],
["#pass14"]
["#pass14"],
["#pass15"],
["#pass16"]
],
"incomplete": [
["#incomplete1"],
Expand Down

0 comments on commit a6569e5

Please sign in to comment.