-
Notifications
You must be signed in to change notification settings - Fork 191
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(swatch): mixed-value state must be conveyed to screen readers using ARIA #3330
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
c627b87
fix: mixed value state of swatch support aria
7157405
chore: added test to support mixed-value for aria
97bbbdc
chore: updated readme
9361601
fix: removed aria checked from readme
5915a28
Merge branch 'main' into bug/aria-mixed-value
970db2a
Merge branch 'main' into bug/aria-mixed-value
562a502
fix: aria-label fix for swatch in screen reader
d835675
Merge branch 'main' into bug/aria-mixed-value
5646c0c
fix: aria-label fix for swatch in screen reader
e1d0c2c
chore: added tests
1848f63
chore: updated readme and removed comments
91a85d1
Merge branch 'main' into bug/aria-mixed-value
257e22b
fix: tests
8a281fe
Merge branch 'main' into bug/aria-mixed-value
e851fd9
Merge branch 'main' into bug/aria-mixed-value
najikahalsema File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
Hey Rajdeep! Just following up on our conversation earlier today.
To add a label to the
Swatch
that matches thecolor
attribute, you can add the following in the Swatch code's willUpdate function:This obviously doesn't handle situations where our value would be 'mixed' or 'nothing' (since
color=''
in that situation), but it's better than no label at all. Hopefully, we can get some guidance on @dineshy87 's side as to what kind of aria-label would be best for those situations, too. 😄 Depending on how many different types of labels we need, we may want to abstract this out ofwillUpdate()
.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.
@najikahalsema Thanks!!
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.
Just one thing--I'd remove the comments from the code!