fix(a11y): improve non-text (border) colour contrast#1625
Draft
fix(a11y): improve non-text (border) colour contrast#1625
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Doesn’t completely resolve #1510, but it does have a wide effect on a lot of components (e.g. search boxes, buttons, etc.) that would be failing (and causes them to pass).
As stated in #1510, we are currently failing WCAG 2.2 SC 1.4.11 (Level AA) which requires a minimum non-text colour ratio of 3:1 for user interface components and graphical objects. This was most notable for the search field and buttons.
This PR increases the lightness channels of the
--borderand--border-hovervalues for the light and dark colour schemes which in effect causes their contrast on the main background to just pass 3:1. The original issue did include the ratios of the borders and the inner surface (i.e. the background colour of the component itself). For buttons, I don’t think this is necessary. For text fields, this maybe necessary unless there are other visual elements within the border (e.g. our main search field has the leading./).Admittedly, just increasing the border contrast alone isn’t a great design decision. Adding other visual effects could help, but it would be a bit of a departure from the current design paradigm. There’s also the issue of pairing these border colours with different background colours—there could be failures.
#262626/#101010)#636363/#101010)#CECECE/#FFFFFF)#949494/#FFFFFF)Full page comparison of home and package views
Ignore other non-border-contrast visual differences. I’ve got screenshots of different builds. This is tedious work.