Error Messages
Status: This is not ready for detailed review. It is an in-progress, unapproved editor’s draft.
- 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:Permalink
- 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 messagesPermalink
The links here don’t go anywhere, but should reference the id attribute value of each related error field:
- The First name field is empty, it is a required field and must be filled in.
- The Date field is in the wrong format, it should be similar to 17/09/2013, (using a / to separate day , month and year).
Related WCAG2.0 TechniquePermalink
The following WCAG 2.0 technique was used in the example above: