Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue737 menuitem and groups #784

Merged
merged 3 commits into from
Jul 12, 2018
Merged

Issue737 menuitem and groups #784

merged 3 commits into from
Jul 12, 2018

Conversation

jnurthen
Copy link
Member

@jnurthen jnurthen commented Jun 21, 2018

  • resolve inconsistencies around menuitems being allowed in groups
  • allow menuitemcheckbox to be in a group.

Preview | Diff

* resolve inconsistencies around menuitems being allowed in groups
* allow menuitemcheckbox to be in a group.
index.html Outdated
@@ -4201,7 +4205,7 @@ <h4>Plain HTML or Polyfill DOM Result of the MathML Quadratic Formula</h4>
<div class="role-description">
<p>An option in a set of choices contained by a <rref>menu</rref> or <rref>menubar</rref>.</p>
<p>Authors MAY disable a menu item with the <sref>aria-disabled</sref> attribute. If the menu item has its <pref>aria-haspopup</pref> attribute set to <code>true</code>, it indicates that the menu item may be used to launch a sub-level menu, and authors SHOULD display a new sub-level menu when the menu item is activated.</p>
<p>Authors MUST ensure that menu items are <a>owned</a> by an element with role <rref>menu</rref> or <rref>menubar</rref> in order to identify that they are related <a>widgets</a>. Authors MAY separate menu items into sets by use of a <rref>separator</rref> or an element with an equivalent role from the native markup language.</p>
<p>Authors MUST ensure that menu items are <a>owned</a> by an element with role <rref>group</rref>, <rref>menu</rref> or <rref>menubar</rref> in order to identify that they are related <a>widgets</a>. Authors MAY separate menu items into sets by use of a <rref>separator</rref> or an element with an equivalent role from the native markup language.</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This to me suggests that a menuitem inside a group is valid even if that group does not descend from a menu. Do we want to clarify that menuitem instances must be contained within a menu?

@jnurthen jnurthen merged commit d02bba9 into master Jul 12, 2018
jnurthen added a commit that referenced this pull request Oct 23, 2019
* Issue #737
* resolve inconsistencies around menuitems being allowed in groups
* allow menuitemcheckbox to be in a group.
@jnurthen jnurthen deleted the Issue737_menuitem_and_groups branch November 8, 2019 00:00
straker pushed a commit to dequelabs/axe-core that referenced this pull request Feb 9, 2021
…1.2 (#2737)

* Allow 'menuitem' and 'menuitemcheckbox' to be in a 'group', per ARIA 1.2

Fixes: #2736
Spec issue: w3c/aria#737
Spec PR: w3c/aria#784

* tests: Add happy and sad path tests for role=group

* feat: Make 'getMissingContext' check 'group'’s parent’s role

* fix: Test 'role=group' is disallowed

* fix: Only permit role=group when it’s an allowed context
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants