Skip to content

Clarify Accessibility Parent-Child Relationships for menu, group, and menuitem - #2483

Open
giacomo-petri wants to merge 22 commits into
mainfrom
giacomo-petri-acc-parent-child-menu-widgets
Open

Clarify Accessibility Parent-Child Relationships for menu, group, and menuitem#2483
giacomo-petri wants to merge 22 commits into
mainfrom
giacomo-petri-acc-parent-child-menu-widgets

Conversation

@giacomo-petri

@giacomo-petri giacomo-petri commented Mar 21, 2025

Copy link
Copy Markdown
Contributor

🚀 Netlify Preview:
🔄 this PR updates the following sspecs:

Closes #2438

The current specifications for menu and menubar contradict those for menuitem, menuitemcheckbox, and menuitemradio.

Specifically, the following structure is allowed under the menu role but not when considering the menuitem role:

<div role="menu">
	<div role="group">
		<span role="menuitem">Item 1</span>
		<div role="group">
			<span role="menuitem">Item 2</span>
			<span role="menuitem">Item 3</span>
		</div>
	</div>
</div>

This PR clarifies that this structure is indeed allowed.

Additionally, it explicitly clarifies in a note that the following example, where a group contains a button and an input as accessibility children, is not permitted. This prevents ambiguity by making it clear that having at least one menuitem as an accessibility child of the group does not justify including other unrelated elements, which was not clearly stated.

<div role="menu">
	<div role="group">
		<span role="menuitem">Item 1</span>
		<div role="group">
			<span role="menuitem">Item 2</span>
			<span role="menuitem">Item 3</span>
		</div>
		<button>Test</button>
		<input type="text aria-label="Test">
	</div>
</div>

This update refines the specifications for menu, menubar, menuitem, menuitemcheckbox, and menuitemradio roles consistently.


Test, Documentation and Implementation tracking

Once this PR has been reviewed and has consensus from the working group, tests should be written and issues should be opened on browsers. Add N/A and check when not applicable.

  • "author MUST" tests:
  • "user agent MUST" tests:
  • Browser implementations (link to issue or commit):
    • WebKit:
    • Gecko:
    • Blink:
  • Does this need AT implementations?
  • Related APG Issue/PR:
  • MDN Issue/PR:

Preview | Diff

@netlify

netlify Bot commented Mar 21, 2025

Copy link
Copy Markdown

Deploy Preview for wai-aria ready!

Name Link
🔨 Latest commit 12c340a
🔍 Latest deploy log https://app.netlify.com/projects/wai-aria/deploys/6a4b58c151bafa00080fe057
😎 Deploy Preview https://deploy-preview-2483--wai-aria.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkra pkra added the clarification clarifying or correcting language that is either confusing, misleading or under-specified label Mar 21, 2025
Comment thread index.html Outdated
Comment thread index.html Outdated
pkra
pkra previously requested changes Mar 21, 2025
Comment thread index.html Outdated
Comment thread index.html Outdated
Comment thread index.html Outdated
Comment thread index.html Outdated
giacomo-petri and others added 4 commits March 21, 2025 20:53
Co-authored-by: Peter Krautzberger <p.krautzberger@gmail.com>
Co-authored-by: Peter Krautzberger <p.krautzberger@gmail.com>
@giacomo-petri
giacomo-petri requested a review from pkra March 21, 2025 20:14
@giacomo-petri
giacomo-petri dismissed pkra’s stale review March 21, 2025 20:14

suggestions applied

Comment thread index.html Outdated
@spectranaut

Copy link
Copy Markdown
Contributor

@np-at to review as well!

@scottaohara
scottaohara removed their request for review March 27, 2025 17:27
@scottaohara

Copy link
Copy Markdown
Member

actually, taking myself off as a reviewer since we have so many others.

@giacomo-petri

Copy link
Copy Markdown
Contributor Author

@pkra, I just realized the same issue affects tree/group/treeitem structures. Should we include this change in this PR or create a separate one?

@pkra

pkra commented Apr 3, 2025

Copy link
Copy Markdown
Member

@giacomo-petri sounds good. Hopefully it's simpler since #2094 prevents group as child of tree.

@spectranaut spectranaut moved this from Needs Review to Needs updates from review in ARIA Normative PR Tracking Jan 15, 2026
@github-project-automation github-project-automation Bot moved this to Agenda+ in ARIA Editors Jun 15, 2026
giacomo-petri and others added 2 commits July 2, 2026 17:00
Co-authored-by: Peter Krautzberger <p.krautzberger@gmail.com>
@pkra
pkra requested review from pkra and removed request for pkra July 2, 2026 17:23
@giacomo-petri

Copy link
Copy Markdown
Contributor Author

I've made some adjustments to address the concerns that were raised. This needs another round of review.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed on https://deploy-preview-2483--wai-aria.netlify.app

@github-actions
github-actions Bot temporarily deployed to pull request July 6, 2026 07:28 Inactive
@pkra
pkra removed their request for review July 6, 2026 08:01
@pkra
pkra dismissed their stale review July 6, 2026 08:01

Dismissing my own review for lack of time.

@daniel-montalvo
daniel-montalvo dismissed stale reviews from MelSumner and spectranaut July 7, 2026 09:57

Further changes made, another round of review is required.

@css-meeting-bot

Copy link
Copy Markdown
Member

The ARIA Working Group just discussed Clarify Accessibility Parent-Child Relationships for menu, group, and menuitem.

The full IRC log of that discussion <Zakim> agendum 6 -- [Clarify Accessibility Parent-Child Relationships for menu, group, and menuitem](https://github.com//pull/2483) -- taken up [from jamesn]
<front-endian-jane> This PR had people added last week, they made comments, giacomo made updates and he removed the Agenda label, so no need to discuss
<jamesn> Agenda?
<front-endian-jane> zakim, next item

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clarification clarifying or correcting language that is either confusing, misleading or under-specified spec:aria

Projects

Status: Needs updates from review

Development

Successfully merging this pull request may close these issues.

Group as allowed acc child of role menu if acc child of menuitem

8 participants