-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Form validation state colors aren't colorblind-friendly #19004
Comments
I think advising the usage of additional validity indications besides color alone would be more robust, since that's best-practice anyway and it's not certain whether such colors exist (particularly since we also have WCAG's color contrast requirements to contend with), but certainly we should attempt a search for such colors. |
CC: @patrickhlauke because accessibility |
just to be clear, the current colors for v4 http://v4-alpha.getbootstrap.com/components/forms/#validation are now markedly different from those that #14744 wanted to address in v3 http://getbootstrap.com/css/#forms-control-validation - so i'd say it's not really relevant to reopen that particular bug. however, these new validation colors (as well as the contextual colors/background http://v4-alpha.getbootstrap.com/components/utilities/#contextual-colors-and-backgrounds with exception of |
To respect the contrast recommandation from the W3C in WCAG 2.0 (AA level) the contrast should be at least 4.5 : 1 for normal text and 3 : 1 for large text. So for the red, orange and green, the 3 colors of validation form, to get a compliant contrast we can use:
But the orange is more brown... With a contrast of 3 : 1 we can have:
But the contrast is not all, there is different sort of colorblindness. The most common (8% of the population) is Deuteranopia. They tend to see reds as brownish-yellow and greens as beige. So icons are important and colors must be harmonized to have a beautiful library. But the W3C recommandation are just recommandation. We can adjust some color to be darker but I think the W3C values are hard to reach. |
@bastienmoulia I appreciate your work here. I think your proposal is good and I agree the W3C values are hard to reach but any improvement is useful here. And I can confirm as someone with deuteranopia that the left and right images above my comment are, in fact, identical to me. |
Issue #14744 was closed a year and a half ago to postpone an accessibility issue until v4. Due to the ongoing problem I propose reopening it and attempting to create colors that don't ruin the experience for the 96% of people with color vision but allow the 4% without to still use bootstrap-constructed forms.
The text was updated successfully, but these errors were encountered: