-
Notifications
You must be signed in to change notification settings - Fork 89
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
Improve readonly input APCA Lc values for a11y #1799
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.
Tested in the PR env
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 looks good! The tests pass and the text contrast looks good while keeping it differentiated from the writable input. Thanks for making this fix @qheaden-stack!
The only thing I'm curious about is if we should increase the contrast on that lock icon:
I'm not sure we have any requirements specifically for supplementary icons (WCAG requires a 3:1 ratio for icons I believe, but we don't base our contrast targets on WCAG), but the icon is Lc 27 by APCA's measurement which seems real low.
@CGuindon any thoughts on bumping the lock icon from 300
to 400
? Here's the input with the lock at 400
(Lc 69):
The 350
stop is also an option if we wanna split the difference (Lc 36):
@CGuindon isn't available today so I'm gonna go ahead and merge this PR, but we can always tweak later if we decide to change the icon color. |
Illustration minimums are 350 — bumping to 400 is fine. |
Summary
This PR modifies the font color for readonly inputs to improve their contrast, matching the recommendations by APCA for accessibility friendly contrast values.
Here are before and after screenshots of the readonly input in various color modes:
Before & After for Light Mode:
Before & After for Dark Mode:
Before & After For Light Mode High Contrast:
Before & After For Dark Mode High Contrast:
After for Dark Mode High Contrast: