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][Autocomplete] Remove legacy aria-owns attribute for combobox #45302

Merged

Conversation

ZeeshanTamboli
Copy link
Member

@ZeeshanTamboli ZeeshanTamboli commented Feb 14, 2025

I was looking into issue #25365 and noticed that we can remove the legacy aria-owns attribute, as we already use aria-controls.

From the spec https://www.w3.org/TR/wai-aria-1.2/#combobox:

The ARIA 1.0 specification required the input element with the combobox role to be a single-line text field and reference the popup element with aria-owns instead of aria-controls

The APG also states:

In ARIA 1.0, the combobox referenced its popup with aria-owns instead of aria-controls. While user agents might support comboboxes with aria-owns for backwards compatibility with legacy content, it is strongly recommended that authors use aria-controls.

After reading the spec and docs, I believe we can close #25365 since it seems we fully support ARIA 1.2. Part of this was addressed in #30601—see #30601 (review)

@ZeeshanTamboli ZeeshanTamboli added package: material-ui Specific to @mui/material component: autocomplete This is the name of the generic UI component, not the React module! labels Feb 14, 2025
@mui-bot
Copy link

mui-bot commented Feb 14, 2025

Netlify deploy preview

https://deploy-preview-45302--material-ui.netlify.app/

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 9e2fe83

@ZeeshanTamboli ZeeshanTamboli marked this pull request as ready for review February 14, 2025 08:50
@ZeeshanTamboli ZeeshanTamboli changed the title [material-ui][Autocomplete] Remove legacy aria-owns attribute [material-ui][Autocomplete] Remove legacy aria-owns attribute for combobox Feb 14, 2025
Copy link
Member

@aarongarciah aarongarciah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tested it and looks like the behavior and screen reader UX is intact.

@ZeeshanTamboli
Copy link
Member Author

@aarongarciah Should this be cherry-picked to v6?

@aarongarciah
Copy link
Member

@ZeeshanTamboli yeah, let's do it.

@ZeeshanTamboli ZeeshanTamboli added v6.x needs cherry-pick The PR should be cherry-picked to master after merge labels Feb 14, 2025
@ZeeshanTamboli ZeeshanTamboli merged commit 2c1c9ad into mui:master Feb 14, 2025
24 checks passed
@ZeeshanTamboli ZeeshanTamboli deleted the remove-aria-owns-autocomplete branch February 14, 2025 10:03
Copy link

Cherry-pick PRs will be created targeting branches: v6.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility a11y component: autocomplete This is the name of the generic UI component, not the React module! needs cherry-pick The PR should be cherry-picked to master after merge package: material-ui Specific to @mui/material v6.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[autocomplete] Update to ARIA 1.2
3 participants