R

RatedWithAI

WCAG guidance

Scan your site

WCAG 2.1

3.3.1 Error Identification

Level A success criterion

When an input error is detected, the error must be identified and described to the user in text.

Why it matters

Users need clear text descriptions of errors to understand what went wrong and how to fix it, not just color changes or icons.

Common violations

  • Errors indicated only by red borders
  • Generic error messages like 'Invalid input'
  • Error icons without text descriptions
  • Errors not associated with their fields

Code examples

Bad

<input class="border-red-500" aria-invalid="true">

Good

<input aria-invalid="true" aria-describedby="email-error">
<p id="email-error" class="text-red-500">Please enter a valid email address</p>

How to fix

Provide specific text descriptions for each error, associate them with form fields using aria-describedby, and ensure errors are announced to screen readers.

Related criteria

Related resources

Scan your site

Check your WCAG coverage in minutes

Start a free scan