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

Improve handling of aria-controls #3243

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

dodomorandi
Copy link

Description

This should fix the a11y issues around aria-controls being used even when components are in the closed state, and the related element is unmounted.

I have not been able to create a working test for the Menu component, and I also think that the forceMount attribute does not work very well with this feature (I am only checking the value of the open state).

Closes #3242

The `aria-controls` attribute should be set only when an element with the
specified id is available in the DOM.
The `aria-controls` attribute should be set only when an element with the
specified id is available in the DOM.
The `aria-controls` attribute should be set only when an element with the
specified id is available in the DOM.
The `aria-controls` attribute should be set only when an element with the
specified id is available in the DOM.
The `aria-controls` attribute should be set only when an element with the
specified id is available in the DOM.
The `aria-controls` attribute should be set only when an element with the
specified id is available in the DOM.
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.

aria-controls should not point to unmounted elements
1 participant