Error Identification
Guideline
If an input error is automatically detected, the item that is in error is identified and the error is described to the user in text. Also, if suggestions for correction are known, then the suggestions are provided to the user, unless it would jeopardize the security or purpose of the content.
Intent
The intent of this regulation is to ensure that users are aware that an error has occurred and can determine what is wrong. The error message should be as specific as possible. In the case of an unsuccessful form submission, re-displaying the form and indicating the fields in error is insufficient for some users to perceive that an error has occurred. Screen reader users, for example, will not know there was an error until they encounter one of the indicators. They may abandon the form altogether before encountering the error indicator, thinking that the page simply is not functional. Per the definition in WCAG 2.0, an "input error" is information provided by the user that is not accepted. This includes:
- Information that is required by the web page but omitted by the user, or
- Information that is provided by the user but that falls outside the required data format or allowed values.
For example:
- the user fails to enter the proper abbreviation in to state, province, region, etc. field;
- the user enters a state abbreviation that is not a valid state;
- the user enters a non existent zip or postal code;
- the user enters a birth date 2 years in the future;
- the user enters alphabetic characters or parentheses into their phone number field that only accepts numbers;
- the user enters a bid that is below the previous bid or the minimum bid increment.
If a user enters a value that is too high or too low, and the coding on the page automatically changes that value to fall within the allowed range, the user's error would still need to be described to them as required by the success criterion. Such an error description telling the person of the changed value would meet both this regulation (Error Identification) and Error Suggestion.
The identification and description of an error can be combined with programmatic information that user agents or assistive technologies can use to identify an error and provide error information to the user. For example, certain technologies can specify that the user's input must not fall outside a specific range, or that a form field is required. Currently, few technologies support this kind of programmatic information, but the Success Criterion does not require, nor prevent it.
Persons with cognitive limitations may find it difficult to understand how to correct the errors. People with visual disabilities may not be able to figure out exactly how to correct the error. In the case of an unsuccessful form submission, users may abandon the form because they may be unsure of how to correct the error even though they are aware that it has occurred.
Finding Applicable Components
Identify all forms or instances where visual errors are indicated to users.
Inspecting and Using Components
- Deliberately cause an error to be displayed on the page, whether by omitting a required field, entering an invalid value, or by any other means.
- Check that a text description is provided identifying the correct error.
- Ensure the error is properly identified to AT using appropriate ARIA techniques.
- Appropriate ARIA techniques consist of using ARIA-Live regions for client-side validation and/or,
- Providing an ARIA-describedby attribute on the form or originating component that conducted the error validation, that corresponds to the ID attribute of the presented error text.
- Check that other data previously entered by the user is re-displayed, unless the data is in a security related field where it would be inappropriate to retain the data for re-display (e.g. password).
- Where suggestions to the error are known, those suggestions or additional help is provided upon receiving the error.
Section 508/WCAG 2.0 Failure Conditions
- An error occurs but a text description is not provided
- Fails 3.3.1 Error Identification.
- Error text does not receive focus or is not properly identified to AT.
- Fails 3.3.1 Error Identification.
- Data previously entered by the user is not re-displayed.
- Fails 3.3.1 Error Identification.
- Known suggestions are not provided in or with the error text.
- Fails 3.3.3 Error Suggestion.
Reporting Test Results
There are no applicable baseline test results for this requirement.
See Also |