Skip to content

fix(aria/combobox): empty aria-controls when the popup widget has no id - #33635

Open
lazerg wants to merge 2 commits into
angular:mainfrom
lazerg:fix/issue-70082-combobox-empty-aria-controls
Open

fix(aria/combobox): empty aria-controls when the popup widget has no id#33635
lazerg wants to merge 2 commits into
angular:mainfrom
lazerg:fix/issue-70082-combobox-empty-aria-controls

Conversation

@lazerg

@lazerg lazerg commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

ngComboboxWidget reads its ID off the host element, so a popup whose widget doesn't set one (for example the dialog popup in the docs, where the widget is a plain div) leaves the combobox with aria-controls="", which Axe flags. The same happened when the ID came from a host binding such as ngListbox, since it isn't on the element yet when the widget reads it.

The widget now generates an ID after the first render if the element still doesn't have one, and re-reads the ID at that point so binding-provided ones are picked up.

Fixes #33640.

@pullapprove
pullapprove Bot requested review from andrewseguin and tjshiu August 5, 2026 08:14
@angular-robot angular-robot Bot added area: aria/combobox area: docs Related to the documentation labels Aug 5, 2026
@lazerg
lazerg force-pushed the fix/issue-70082-combobox-empty-aria-controls branch from 1cef0e3 to 70a1084 Compare August 5, 2026 08:32
@crisbeto
crisbeto requested a review from ok7sai August 5, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: aria/combobox area: docs Related to the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Combobox sets an empty aria-controls attribute when using a dialog popup

1 participant