Skip to content

[material-ui][Autocomplete] Remove legacy aria-owns attribute for combobox#45302

Merged
ZeeshanTamboli merged 2 commits into
mui:masterfrom
ZeeshanTamboli:remove-aria-owns-autocomplete
Feb 14, 2025
Merged

[material-ui][Autocomplete] Remove legacy aria-owns attribute for combobox#45302
ZeeshanTamboli merged 2 commits into
mui:masterfrom
ZeeshanTamboli:remove-aria-owns-autocomplete

Conversation

@ZeeshanTamboli

@ZeeshanTamboli ZeeshanTamboli commented Feb 14, 2025

Copy link
Copy Markdown
Member

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 scope: autocomplete Changes related to the autocomplete. This includes ComboBox. labels Feb 14, 2025
@mui-bot

mui-bot commented Feb 14, 2025

Copy link
Copy Markdown

@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

@aarongarciah aarongarciah left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Member Author

@aarongarciah Should this be cherry-picked to v6?

@aarongarciah

Copy link
Copy Markdown
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
@ZeeshanTamboli
ZeeshanTamboli deleted the remove-aria-owns-autocomplete branch February 14, 2025 10:03
@github-actions

Copy link
Copy Markdown

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 needs cherry-pick The PR should be cherry-picked to master after merge. scope: autocomplete Changes related to the autocomplete. This includes ComboBox. v6.x

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[autocomplete] Update to ARIA 1.2

3 participants