Skip to content

Comments

fix(aria/combobox): Adjust AutoComplete examples to announce no results text#32786

Merged
adolgachev merged 1 commit intoangular:mainfrom
adolgachev:aria-ac-empty
Feb 19, 2026
Merged

fix(aria/combobox): Adjust AutoComplete examples to announce no results text#32786
adolgachev merged 1 commit intoangular:mainfrom
adolgachev:aria-ac-empty

Conversation

@adolgachev
Copy link
Contributor

@adolgachev adolgachev commented Feb 17, 2026

Text has to be updated to be announced again so included the query string. Also removed cdkAriaLive usage as wasn't helping.

This is just update to example code, but shows a simple way to announce "no results".

@adolgachev adolgachev changed the title fix(aria/combobox): Adjust AutoComplete examples to properly announce… fix(aria/combobox): Adjust AutoComplete examples to announce no results text Feb 17, 2026
@adolgachev adolgachev marked this pull request as ready for review February 17, 2026 20:40
@adolgachev adolgachev added Accessibility This issue is related to accessibility (a11y) target: patch This PR is targeted for the next patch release action: review The PR is still awaiting reviews from at least one requested reviewer dev-app preview When applied, previews of the dev-app are deployed to Firebase labels Feb 17, 2026
@github-actions
Copy link

github-actions bot commented Feb 17, 2026

Deployed dev-app for 3d7e876 to: https://ng-dev-previews-comp--pr-angular-components-32786-dev-i9va9327.web.app

Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt.

@adolgachev adolgachev requested review from ok7sai and tjshiu February 18, 2026 17:55

<div class="cdk-visually-hidden"[cdkAriaLive]="'polite'">
{{countries().length === 0 ? 'No results found' : ''}}
<div aria-live="polite" class="cdk-visually-hidden" role="status" >
Copy link
Member

Choose a reason for hiding this comment

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

role="status" implicitly sets aria-live="polite", so don't need both.

Also curious about why cdkAriaLive didn't work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yeah, good catch. That was left-over when I was trying everything to make it work.

I think cdkAriaLive would work with the changes to include the query text as that is the issue with why it doesn't re-announce even when text switches to blank and then back to the text. But it didn't help without so I just took it out as didn't add any value and this is simpler.

@adolgachev adolgachev added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Feb 19, 2026
@adolgachev adolgachev merged commit fcdfed8 into angular:main Feb 19, 2026
27 checks passed
@adolgachev
Copy link
Contributor Author

This PR was merged into the repository. The changes were merged into the following branches:

adolgachev added a commit that referenced this pull request Feb 19, 2026
adolgachev added a commit that referenced this pull request Feb 19, 2026
@adolgachev adolgachev deleted the aria-ac-empty branch February 19, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Accessibility This issue is related to accessibility (a11y) action: merge The PR is ready for merge by the caretaker dev-app preview When applied, previews of the dev-app are deployed to Firebase target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants