New Tool Radar

AI Design Workflows

How to Check Placeholder Text Contrast in a Form

Check that placeholder text meets the 4.5 to 1 contrast ratio, because faint placeholder text is still text that people must read.

Schematic with three steps: list the placeholders, measure each ratio, darken the ones that fail.

Placeholder text is often set in pale grey, on the theory that it is only a hint. But readers must still read it to know what to type, and WCAG treats placeholder text as text that needs the full 4.5 to 1 ratio. This check measures every placeholder in a form.

Why this needs its own check

WebAIM’s contrast guide states the WCAG minimum of 4.5 to 1 for normal text, and the practical guidance that placeholder text needs a contrast ratio of 4.5 to 1 at Level AA. A placeholder is text the user must read, so the faint-grey convention does not exempt it.

What you need before you start

  • A form with placeholder text
  • A contrast checker such as the WebAIM Contrast Checker
  • The exact placeholder and background colours

Step 1 – List every placeholder

Go through the form and write down each placeholder, exactly as shown, with the field it belongs to. Include placeholders in search boxes and newsletter fields, not just the main form.

Step 2 – Measure each ratio

Measure each placeholder colour against its field background. The bar is 4.5 to 1 for normal-size placeholder text. Record the ratio for each field.

Step 3 – Darken the ones that fail

Where a placeholder fails, darken its colour until it clears 4.5 to 1, and re-measure. Do not fix it by making the placeholder larger, since size does not change the normal-text bar unless the text is genuinely large.

Worked example

Practice check: a fictional Foxglove Pharmacy registration form

The example below is fictional. Foxglove Pharmacy is an invented business used only as a practice case. No real customer, page, or product is shown. Treat it as a practice case, not as evidence about any real business.

Part What it should be As shown Result
Name placeholder 4.5 to 1 or better #595959 on white, 7.0 to 1 Pass
Email placeholder 4.5 to 1 or better #9E9E9E on white, 2.7 to 1 Fail – 2.7 to 1
Phone placeholder 4.5 to 1 or better #6B6B6B on white, 5.3 to 1 Pass
Postcode placeholder 4.5 to 1 or better #8A8A8A on white, 3.5 to 1 Fail – 3.5 to 1

Only 2 of the 4 checks pass: the name and phone placeholders. The two failures are the email placeholder at 2.7 to 1 and the postcode placeholder at 3.5 to 1.

What to do when something is wrong

Darken the email placeholder to #595959 and the postcode placeholder to #6B6B6B, then re-measure both. Keep the placeholder visible as a hint and put the real instruction in the label, not only in the placeholder.

Expected result. We checked the WebAIM contrast guide listed in Sources. We did not measure a live Foxglove Pharmacy form. UNTESTED: no contrast checker was run on a real form; the ratios shown are computed with the WCAG relative luminance formula for the practice colours: #595959 on white is 7.0 to 1, #9E9E9E on white is 2.7 to 1, #6B6B6B on white is 5.3 to 1, and #8A8A8A on white is 3.5 to 1.

Limits

  • This check covers placeholder contrast only. It does not cover whether placeholders should be used at all, since labels are the reliable way to name a field.

Sources

See all