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(material/chip): allow focusing to disabled listbox options #25771
Conversation
This is still a draft, need to do more testing and cleanup the code a bit. |
2f537cd
to
751ff55
Compare
Allow user to focus to disabled listbox options. Unlike other chips, disabled `MatChipOption` remains in the tab order, but it cannot be clicked. This aligns with WAI ARIA documented best practice to allow focusing disabled listbox options. Fix issue where screen reader does not announce disabled item in single selection list. Summary of API and behavior changes: - when disabled, `MatChipOption` sets `aria-disabled="true"` and omits `disabled` attribute. - Add private `@Input _alowFocusWithDisabled` to `MatChipAction` to support focusing the action when it is disabled. - `MatChipSet` defines `_skipPredicate` as an instance member which dervied classes may override. `_alowFocusWithDisabled` and `_skipPredicate` are internal API to the chips.
751ff55
to
ce420a8
Compare
Hi @crisbeto , this is working now, and it's ready for your review |
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.
LGTM
Allow user to focus to disabled listbox options. Unlike other chips, disabled `MatChipOption` remains in the tab order, but it cannot be clicked. This aligns with WAI ARIA documented best practice to allow focusing disabled listbox options. Fix issue where screen reader does not announce disabled item in single selection list. Summary of API and behavior changes: - when disabled, `MatChipOption` sets `aria-disabled="true"` and omits `disabled` attribute. - Add private `@Input _alowFocusWithDisabled` to `MatChipAction` to support focusing the action when it is disabled. - `MatChipSet` defines `_skipPredicate` as an instance member which dervied classes may override. `_alowFocusWithDisabled` and `_skipPredicate` are internal API to the chips. (cherry picked from commit 3f68996)
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. |
allow focusing to disabled listbox options