Input placeholder text must have a sufficient color contrast ratio #9502
Labels
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Type] Bug
An existing feature does not function as intended
[Type] Regression
Related to a regression in the latest release
In 44c9c20 (see #1302 / #1439) the placeholder text color was changed to have a sufficient color contrast ratio to meet the WCAG level AA requirement.
It used the color
$dark-gray-300: #6c7781
which is the lightest gray in the colors palette that can be used against a white background to meet the WCAG requirement.Following changes, see for example af65418 in #6406 and 0addd84 in #6937 have modified the placeholder color; it now uses also some alpha transparency and it's
rgba(34, 52, 67, 0.5)
.The resulting color contrast ratio against a white background is a very low 2.86:1. It must be at least 4.5:1. See https://jdlsn.com/color/?type=rgb&color=34,52,67&color2=255,255,255&alpha=0.5
I'm a bit surprised these changes have been made without any mention to accessibility or without properly labelling the related issues and PRs, as the first color change to
#6c7781
was specifically made, and agreed, to address an accessibility issue.Regardless, these colors must be changed to whatever color is desired, as long as the resulting contrast ratio is 4.5:1.
Worth also noting this is what core does, and Gutenberg shouldn't deviate from accessibility best practices that have been established in core. See https://core.trac.wordpress.org/browser/trunk/src/wp-admin/css/forms.css?rev=43309&marks=226-237#L225
/Cc @jasmussen
The text was updated successfully, but these errors were encountered: