-
Notifications
You must be signed in to change notification settings - Fork 585
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: radio accessiblity #25
Conversation
🎉 Thanks for another contribution @jsomsanith ! This is great. I see a slight difference in the alignment of the description (the old subLabel): https://www.chromaticqa.com/snapshot?appId=5ccbc373887ca40020446347&id=5d0fee6c77b75e0020f10492 Looks left aligned now vs offset from the left. Is that something you can take a look at before we merge this? |
padding: 0px !important; | ||
position: absolute !important; | ||
white-space: nowrap !important; | ||
width: 1px !important; |
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.
Were these !important
tags necessary to make the styles apply correctly? Or are they more for being explicit about the behavior? Does look to me like they should work without !important
, but maybe I am missing something.
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 extra safety to make sure no inherited styles collide. 👍
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.
@kylesuss Just for extra info, this part has !important
which is usually veeeeery bad, but this is a standard trick to make it rendered out of the viewport, but still visible by screen readers.
Every css framework has a class with this type of css, for example bootstrap has sr-only
.
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.
Nice. Thanks for the explanation @jsomsanith . Makes sense!
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.
💯
🚀 PR was released in v0.0.26 🚀 |
What is the problem this PR is trying to solve?
Radio component is not accessible
visibility: hidden
What is the chosen solution to this problem?
hideLabel
props. Be careful to give a clear context when you hide the label in the designsaria-describedby
aria-invalid
on input when there is an error