W3C home Web Accessibility Initiative (WAI) home

WAI: Strategies, guidelines, resources to make the Web accessible to people with disabilities

[DRAFT] Error messages

  • What to do: When a form is in error, provide error messages that users can find easily and that accurately describe in text which fields are in error and why;
  • Why: When users have made errors, clearly they need more help. Some users, such as blind people, may not even be aware that an error has occurred. Other users may not have understood the initial instructions, and further help, such as a format example, may be needed so that they understand what is to do;
  • How: If an error is detected, provide error messages that are easy to locate and understand;
  • Conformance: Required to meet SC 3.3.1 Error Identification and SC 3.3.3 Error Suggestion

Error messages should be text descriptions that identify:

  • Each field in error: it's best to use the same wording as used for the label, (the error message can also be an in-page link to the error field).
  • The cause of the error: Whether it's a required field that's been left empty or a required format that hasn't been used for instance.
  • How to fix it: by using example, description or a corrected sample of the user's data (and information on how to use the sample).

Example error messages

The links here don't go anywhere, but should reference the id attribute value of each related error field: