-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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(radiobuttongroup): accessibility #17885
Conversation
✅ Deploy Preview for v11-carbon-web-components ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for v11-carbon-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #17885 +/- ##
==========================================
+ Coverage 80.19% 80.41% +0.22%
==========================================
Files 406 406
Lines 14041 14043 +2
Branches 4399 4348 -51
==========================================
+ Hits 11260 11293 +33
+ Misses 2614 2584 -30
+ Partials 167 166 -1 ☔ View full report in Codecov by Sentry. |
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.
Hey I'm curious why visually hide the legend vs. having the user put aria-label
or aria-labelledby
on the fieldset (via ...rest
) when they don't want to use the legend?
The codebase has hideLabel
all over the place, but it looks like all usages of legend are a hard binary of in the dom or not. When not in the DOM the user is expected to provide their own label by other means.
Is the legend itself still required or valuable in some way even when hidden?
Ohh, you are right. |
Closes #17753
Added a new prop called
hideLegendText
to hide thelegendText
visually, the<legend>
still on the DOM to meet accessibility standards.Testing / Reviewing
Playground