Rule
Form control contrast
Text inside form controls must have sufficient contrast.
- Rule
control-contrast- WCAG 2.2
- 1.4.3 Contrast (Minimum) (opens in a new tab) (Level AA)
- Severity
- Serious
What it checks
Measures the text inside <input> fields and input buttons, text areas and select menus against the control's own background. Checkboxes, radio buttons, sliders, colour pickers and file inputs are left out. Both the typed value and placeholder text are checked; a placeholder counts only while it is showing. Normal text needs 4.5:1 and large text 3:1, the same thresholds the main text contrast rule uses.
Disabled fields are exempt, including those inside a disabled <fieldset>. Opacity on the field, and opacity set on ::placeholder, both count towards the colour that is actually shown.
When a person decides
A field whose background is an image or a changing gradient, a see-through field over an image, or a field under a filter or blend mode is sent for review, because the colour behind the text cannot be read from the styles alone.
Example
Fails
<style>input::placeholder { color: #aaa; }</style>
<label for="email">Email</label>
<input id="email" type="email" placeholder="name@example.com">
Passes
<style>input::placeholder { color: #6b6b6b; }</style>
<label for="email">Email</label>
<input id="email" type="email" placeholder="name@example.com">
The engine is tested against both examples.
How to fix it
Darken the placeholder colour, set with ::placeholder, or the field's text colour until it reaches 4.5:1 against the field background.
Check your own pages
This rule runs in every pour audit: the browser extension, the bookmarklet, the command line and the editor. Get pour, free.