-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
ToggleGroupControl: Allow custom aria-label #35423
Conversation
Size Change: +19 B (0%) Total Size: 1.07 MB
ℹ️ View Unchanged
|
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.
Thank you for working on this, @mirka ! Always love a11y improvements.
I left a few minor comments, but changes look good overall.
packages/components/src/toggle-group-control/toggle-group-control-button.tsx
Show resolved
Hide resolved
packages/components/src/toggle-group-control/toggle-group-control-button.tsx
Show resolved
Hide resolved
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.
Looks like this PR needs a rebase, but otherwise changes LGTM 🚀
Thank you again for improving a11y of components!
7d41113
to
2399d96
Compare
Fixes #35381
Description
Allows a consumer to set a custom
aria-label
on aToggleGroupControlOption
.The previous implementation explicitly set the
aria-label
to the value of the visiblelabel
, which I believe is redundant due to the label string always being present as a child node in the accessibility tree.How has this been tested?
I added a story in the Storybook with an example use case.
Types of changes
New feature (non-breaking change which adds functionality)
Checklist:
*.native.js
files for terms that need renaming or removal).