Skip to content

fix(material/select): don't announce selected value multiple times #24776

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

Closed

Conversation

mhaertwig
Copy link
Contributor

The screen reader already announces the selected value inside the select field. Therefore, pointing the aria-labelledby attribute to the value field made the screen reader announce the selected value multiple times. This pull request fixes this by removing the value field from aria-labelledby.

Before this fix:
CokeCokeCoke

After this fix:
Coke

@mhaertwig mhaertwig requested a review from crisbeto as a code owner April 14, 2022 12:10
The screen reader already announces the selected value inside the select field. Therefore, pointing the `aria-labelledby` attribute to the value field made the screen reader announce the selected value multiple times. This pull request fixes this by removing the value field from `aria-labelledby`.
@mhaertwig mhaertwig force-pushed the feature/select-accessibility branch from b9c1825 to 016ce12 Compare April 14, 2022 12:27
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

What screen readers did you test this with? If I remember correctly, we had to do this because a specific screen reader wasn't reading the value out automatically.

@mhaertwig
Copy link
Contributor Author

I've tested with NVDA, JAWS and Narrator. It works well with NVDA and JAWS. Narrator still sometimes reads the selected value twice but before it read it three times without any break.

@mhaertwig mhaertwig closed this Apr 25, 2022
@mhaertwig
Copy link
Contributor Author

@crisbeto, you were right: The Chrome plugin "Screen Reader" did not read the value of the combobox after the aria-labelledby pointing to the value was removed. I've investigated this issue further and finally found a quite simple solution: #24831

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators May 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants