← Back to home

Why linking color to status is not enough

Updated

Last week I wrote about form errors that screen readers never announce, which violates WCAG 4.1.3 Status Messages. There's another layer to the problem that most developers overlook, even when they do add a visible error message: color alone is not enough.

Turning a border red or writing "Invalid" in red text fails users with color blindness, and it violates WCAG 1.4.1 Use of Color.

An accessible error message needs three things working together:

  • A non-color indicator, like an icon
  • A clear message that says what's wrong, not just "invalid"
  • A format suggestion to guide the correction

These are small changes, and real users notice them.

Side-by-side comparison of two email input error implementations. Left card labeled Not accessible shows an input with only the word Invalid in red — no icon, no description, violating WCAG 1.4.1, 3.3.1, and 3.3.3. Right card labeled Accessible shows the same input with a red alert icon followed by the message Please enter a valid email address. E.g: example@email.com, meeting all three criteria.

The image above shows the wrong way and the right way side by side.

WCAG 2.1 criteria referenced:

  • 1.4.1 Use of Color: color must not be the only visual means of conveying information
  • 3.3.1 Error Identification: errors must be described in text
  • 3.3.3 Error Suggestion: suggestions for correction must be provided
  • 1.4.3 Contrast (Minimum): text contrast must meet 4.5:1 (AA)
LinkedInX