Error messages and forms

Tell the user exactly what went wrong and provide specific instructions on how to fix it.

The rule

Tell the user exactly what went wrong and provide specific instructions on how to fix it.

Why it matters

Clear error messages prevent people from getting stuck or abandoning a task. Users with cognitive impairments or those using screen readers need explicit guidance to navigate validation issues and complete forms successfully.

How to apply it

  • Place labels and instructions directly above the input field.
  • Use a non-blaming tone (e.g., "The password is too short" rather than "You entered an invalid password").
  • Identify errors with more than just color; use icons or text to ensure visibility for all users.
  • Allow users to review and correct sensitive data before final submission.

Example

Before and after

Avoid

"Invalid input."

Better

"Enter a valid email address, like name@example.com."

Tensions and exceptions

Real-time feedback can be helpful, but if it is not coded correctly as an "alert" or "status" role, it may interrupt a screen reader user'92s concentration.