This repository was archived by the owner on Sep 5, 2024. It is now read-only.
fix(select): A11y fixes allowing screen readers (VoiceOver) to read list item position #10760
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add role="presentation" to the container divs so assistive technology
(primarily VoiceOver) to accurately count and announce "item 3 of 7".
https://www.w3.org/TR/wai-aria/roles#presentation
Only add aria-owns when the md-select element does not contain its
menu element in the DOM. This means when the select is opened, as
opening the select means the element, previously nestled within
md-select, gets appended to the end of the DOM.
Dynamically hide md-select-value with aria-hidden to get an accurate
item count for the md-select. This can't just be hidden all the time
because VoiceOver does not allow linear navigation into selects with no
visible options.
Move autoFocus call to after the select menu element is fully rendered
in order to properly focus the first item in the select.
Addresses some points in #9908.