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

aria-controls should not point to unmounted elements #3242

Open
dodomorandi opened this issue Nov 21, 2024 · 0 comments · May be fixed by #3243
Open

aria-controls should not point to unmounted elements #3242

dodomorandi opened this issue Nov 21, 2024 · 0 comments · May be fixed by #3243

Comments

@dodomorandi
Copy link

Bug report

Current Behavior

The Popover, Dialog, Select, Menu, NavigationMenu and Collapsible components set the aria-controls attribute even when they are in the closed state.

Expected behavior

An aria-controls attribute should only be set when the related element is available in the DOM. Therefore the presence of the attribute should follow the open state.

Reproducible example

  • Go to the official documentation for one of the components listed above (i.e.: the navigation menu)
  • Leave the component in the closed state and inspect the DOM, searching for the aria-controls attribute

Suggested solution

The presence of the attribute should follow the open state of the component.

@dodomorandi dodomorandi linked a pull request Nov 21, 2024 that will close this issue
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 a pull request may close this issue.

1 participant