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.
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(tree,tree-item): replace checkbox with div and a11y attributes #9849
fix(tree,tree-item): replace checkbox with div and a11y attributes #9849
Changes from 6 commits
8462d8b
6ea4dd3
7bf7434
cda50ab
8bf68f3
3cbb666
e3c3bb0
eee773b
f0053a1
b2643ee
a472f5a
c60efd7
da40476
bd3f229
5fe1cfc
6b69401
d8fda37
ca0770a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I think this
div
might need a role (maybe checkbox). I ran the test app through aXe toolbar and it showed this:@geospatialem do you know what this might need?
I'm not sure we even need aria-checked here because the tree-item role has aria-selected so that should really account for selection to a screen reader right?
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.
@driskull Adding
role="checkbox"
gets rid of the error above. Do we want to get rid ofaria-checked
entirely?cc @geospatialem
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.
From testing, it looks like we should omit this
div
to only contain theclass
andtabIndex
. For instance: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.
Instead we'd add the contents to the
Host
tree-item
element to announce the selection viaaria-live="polite"
:The above would also remove the
aria-selected
attribute, which currently contains:Not sure if there is an impact there, but I didn't notice one in testing.
The above two code changes allow JAWS and NVDA to hear the selections and live changes, in addition to passing all axe conditions.
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.
@driskull Got rid of
tabIndex
in the latest update 🐱💻