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(a11y): indicate required form controls using an asterisk #1723
Conversation
✅ Deploy Preview for stacks ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Great work @giamir. I think this PR shows an elegant and uncomplicated way to handle denoting required inputs. I have a few minor suggestions but nothing too intense.
Co-authored-by: Dan Cormier <dcormier@stackoverflow.com>
@dancormier I have added the visual/a11y tests and took the occasion to refactor a bit. You can find the diff here. I have tested the example I put together in the inputs page in NVDA and this is what the narrator announces when I move from section to section with the arrow keys:
As you can see by default NVDA doesn't read the |
I'm less familiar with screen reader norms but I trust you both and if this passes WCAG I think we can proceed. No red flags from me. |
@dancormier when you have a second give me the green flag here and I will merge. Thank you. 😊 |
STACKS-582
@CGuindon @dancormier Shall we have a section where we document the new class a bit more formally like we do for validations classes?
@dancormier I would like to get your feedback on the class naming
s-required-symbol
and locationlabel.less
.I did not prefix it with
s-label
since the class could be used elsewhere (e.g. in the legend explaining the abbreviation)TODOs:
s-required-symbol
)