-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(core/mat-option): don't remove aria-selected from deselected options #25749
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
Conversation
3368086
to
95bd6f5
Compare
Draft. Here is remaining work before this converts to a real PR
|
16d67d7
to
f198ec2
Compare
494cc1e
to
c5ec0e3
Compare
responded to comments, and this is ready for review again 👀 |
src/material/core/option/option.ts
Outdated
@@ -243,6 +233,19 @@ export class _MatOptionBase<T = any> implements FocusableOption, AfterViewChecke | |||
|
|||
/** | |||
* Single option inside of a `<mat-select>` element. | |||
* | |||
* The aria-selected attribute applied to the option conforms to WAI ARIA best practices for listbox |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't put the aria-selected
explanation here, because it's going to show up in the docs site. It can be put right before the '[attr.aria-selected]': 'selected',
on line 261.
c5ec0e3
to
c31f13a
Compare
For mat-option, set `aria-selected="false"` on deselected options that are selectable. Conforms with [WAI ARIA Listbox authoring practices guide]( https://www.w3.org/WAI/ARIA/apg/patterns/listbox/), which says to always include aria-selected attribute on options that are selectable. Fix issue where voiceover reads every option as "selected" (angular#25736). Fix angular#25736
c31f13a
to
ac9e95d
Compare
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
For mat-option, set
aria-selected="false"
on deselected options that are selectable. Conforms with WAI ARIA Listbox authoring practices guide, which says to always include aria-selected attribute on options that are selectable. Fix issue where voiceover reads every option as "selected" (#25736).Fix #25736