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

fix(select): wrong option amount being read out by NVDA #5181

Merged
merged 1 commit into from Jul 7, 2017

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Jun 17, 2017

Fixes an issue that caused the wrong amount of options to be read out by NVDA. E.g. if the select has 3 options, NVDA reads out "{{value}} selected, 2 of 4". The issue seems to come from the fact that NVDA considers the trigger as one of the options, potentially because it's clickable.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jun 17, 2017
@crisbeto crisbeto added the Accessibility This issue is related to accessibility (a11y) label Jun 17, 2017
@kara
Copy link
Contributor

kara commented Jun 19, 2017

@crisbeto Thanks for tackling this; it's been driving me crazy. This change definitely helps when navigating through the list and when the list is open, but I've noticed that the trigger is still being counted after you select an option.

So if you open the select, you'll hear "Coffee, 6 of 10", but after you select it, you'll hear "Coffee, 6 of 11" (probably because the panel is closed). Can we address that? It might be more confusing if the total count is inconsistent. I can only test with Voiceover today, so it may or may not be happening with NVDA too.

@jelbourn What do you think about using aria-hidden?

@kara kara assigned crisbeto and unassigned kara Jun 19, 2017
@crisbeto
Copy link
Member Author

That sounds weird @kara. Perhaps we should be using aria-hidden all the time? On the first pass I tried it out that way and it still worked fine (I presume, it's because we focus the selected option which still causes the screen reader to read it out). I opted for the conditional aria-hidden, because it's more accurate as to what is going on.

@jelbourn
Copy link
Member

If the trigger is always aria-hidden, we'd need to make sure that the select itself is still appropriately labeled. We should look at other dropdown implementations for comparison.

Fixes an issue that caused the wrong amount of options to be read out by NVDA. E.g. if the select has 3 options, NVDA reads out "<value> selected, 2 of 4". The issue seems to come from the fact that NVDA considers the trigger as one of the options, potentially because it's clickable.
@crisbeto
Copy link
Member Author

Alright, I got some time to revisit this one. Setting the aria-hidden="true" all the time still works on the screen readers that I could get my hands on (VoiceOver and NVDA), because we have an aria-label on the select already. I updated the PR to always have aria-hidden and left in a unit test as a sanity check.

Copy link
Contributor

@kara kara left a comment

Choose a reason for hiding this comment

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

LGTM

@kara kara added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Jun 26, 2017
@mmalerba mmalerba merged commit b8c900c into angular:master Jul 7, 2017
amcdnl pushed a commit to amcdnl/material2 that referenced this pull request Jul 8, 2017
Fixes an issue that caused the wrong amount of options to be read out by NVDA. E.g. if the select has 3 options, NVDA reads out "<value> selected, 2 of 4". The issue seems to come from the fact that NVDA considers the trigger as one of the options, potentially because it's clickable.
@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 Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Accessibility This issue is related to accessibility (a11y) action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants