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

Fix reference to closed menu in "aria-controls" #3031

Merged

Conversation

danxuliu
Copy link
Contributor

@danxuliu danxuliu commented Aug 13, 2022

Fixes #2842

The aria-controls attribute must point to an element in the same document. When the menu is closed it is removed from the DOM, so the aria-controls attribute should be set only when the menu is open.

According to MDN The aria-controls only needs to be set when the popup is visible, so I guess it is fine to remove it if the menu is not there rather than always having it in the DOM but hidden, although I do not really know.

The "aria-controls" attribute must point to an element in the same
document. When the menu is closed it is removed from the DOM, so the
"aria-controls" attribute should be set only when the menu is open.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@danxuliu danxuliu added bug Something isn't working 3. to review Waiting for reviews feature: actions Related to the actions components accessibility Making sure we design for the widest range of people possible, including those who have disabilities labels Aug 13, 2022
@raimund-schluessler raimund-schluessler merged commit 5b8364d into master Aug 16, 2022
@raimund-schluessler raimund-schluessler deleted the fix-reference-to-closed-menu-in-aria-controls branch August 16, 2022 07:30
@skjnldsv skjnldsv mentioned this pull request Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews accessibility Making sure we design for the widest range of people possible, including those who have disabilities bug Something isn't working feature: actions Related to the actions components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: The aria-controls attribute must point to an element in the same document.
3 participants