-
Notifications
You must be signed in to change notification settings - Fork 13
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
va-checkbox and va-radio-option: Improved a11y #1442
base: main
Are you sure you want to change the base?
Conversation
@Andrew565 Could we fix the box size and radius to align with the USWDS? Attached shows the USWDS with a 20x20 square size and border radius of 2px. The focus state in the Figma design has a gap between the focus state and the gold outline, USWDS is showing the same thing. Could we follow that design for the focus state. The USWDS also shows a gap. |
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.
@Andrew565 This looked good to me. I was able to confirm that this resolves the Axe issues. I also gave it a quick test in VoiceOver and everything sounded as expected.
One minor thing I saw was when initially tabbing to the radio group, there's an additional outline next to the first item. My guess is that a stray pseudo or hidden element might be getting styled.
@rsmithadhoc Fixed the ghost outline, thanks for pointing that out. @babsdenney I fixed the outline gaps and made sure the sizing was consistent for both radios and checkboxes. If you inspect a non-checked checkbox or radio, it will appear in the sizing model as though it's 16x16, but this isn't including the 2px border on all sides, which raises the 'total size' to 20x20. Screenshots attached. |
Chromatic
https://3363-redo-radios-and-checks--65a6e2ed2314f7b8f98609d8.chromatic.com
Description
Closes #3363
Reworks some of the HTML for the va-checkbox and va-radio-option components to be more accessible.
QA Checklist
Screenshots
Before:
After:
Acceptance criteria
Definition of done