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

[material-ui][Select] Aria-controls references invalid id when not expanded #43876

Open
siddhantantil39 opened this issue Sep 24, 2024 · 3 comments
Assignees
Labels
accessibility a11y component: select This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material

Comments

@siddhantantil39
Copy link

siddhantantil39 commented Sep 24, 2024

Steps to reproduce

Aria-controls references invalid id when not expanded mui select component
select-error

Link to live example: (required)
Go to: https://mui.com/material-ui/react-select/

Steps:

  1. Download ARC Toolkit: https://chromewebstore.google.com/detail/arc-toolkit/chdkkkccnlfncngelccgbgfmjebmkmce?hl=en and install it
  2. Expand Inspect and select ARC Toolkit and Run tests on https://mui.com/material-ui/react-select/
  3. Look into the error for "ARIA attribute value is incorrect
    Description: The value :R9alal9h9l6kud6: is not allowed on the aria-controls attribute(s)."

It is also observed using access-assistant also.

PFA the ARC snapshot:

Current behavior

ARIA attribute value is incorrect is observed on the select component upon ADA Testing using automation tools such as ARC.

Expected behavior

Aria-control should refer to the id of the menu-item, in non-expanded state also.

Context

No response

Your environment

No response

Search keywords: select

@siddhantantil39 siddhantantil39 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Sep 24, 2024
@zannager zannager added the component: select This is the name of the generic UI component, not the React module! label Sep 25, 2024
@DiegoAndai
Copy link
Member

Thanks for the report @siddhantantil39!

@michaldudak, do you know what's the behaviour on Base UI's Select regarding this?

@DiegoAndai DiegoAndai added package: material-ui Specific to @mui/material accessibility a11y and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 2, 2024
@DiegoAndai DiegoAndai added this to the Material UI with Base UI milestone Oct 2, 2024
@DiegoAndai DiegoAndai changed the title Aria-controls references invalid id when not expanded mui select component [material-ui][Select] Aria-controls references invalid id when not expanded Oct 2, 2024
@michaldudak
Copy link
Member

AFAIR @mui/base did not place the aria-controls attribute when its target doesn't exist. @atomiks, how does the new implementation handle this case?

@atomiks
Copy link
Contributor

atomiks commented Oct 4, 2024

@michaldudak yes, aria-controls is not added to the trigger unless the popup is in the open state

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility a11y component: select This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material
Projects
None yet
Development

No branches or pull requests

5 participants