-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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(list): Update ARIA attributes for radio/checkbox based list #4055
Conversation
EDIT: role="list" or ul/li (without ‘’listbox’) elements are not supposed
to be keyboard interactive as per ARIA spec. That includes not arrowing
through list.
Fixed typo. Sorry I missed ‘not’ in my previous comment.
…On Thu, Nov 15, 2018 at 3:38 PM Will Ernest ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In packages/mdc-list/README.md
<#4055 (comment)>
:
> @@ -39,7 +39,7 @@ npm install @material/list
### HTML Structure
```html
-<ul class="mdc-list" aria-orientation="vertical">
aria-orienation is used to indicate which arrow keys the foundation
listens to for traversing the list. If we remove this from all ul
examples that are not role="listbox" we need to change the attribute we
use to indicate list direction.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4055 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAC40BS9iR3DeYjEFUwMJIRIVdlla2fgks5uvdDCgaJpZM4YPbS0>
.
|
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
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.
This is currently failing unit test due to coverage %. One easy place for improvement is that the hasCheckboxAtIndex branch of setSelectedIndex is uncovered.
Codecov Report
@@ Coverage Diff @@
## master #4055 +/- ##
=======================================
Coverage 98.36% 98.36%
=======================================
Files 126 126
Lines 5637 5637
Branches 755 755
=======================================
Hits 5545 5545
Misses 92 92
Continue to review full report at Codecov.
|
🤖 Beep boop! Screenshot test report 🚦16 screenshots changed from |
This change updates the aria attributes (
aria-selected
oraria-checked
) for single select, checkbox or radio based lists.BREAKING CHANGE: Replaced
toggleCheckbox
adapter method withsetCheckedCheckboxOrRadioAtIndex
and added 3 more new adapter methods for improved accessibility.Fixes #3659, #3403, #4107