From 5ac946a9eace3fe51d3800518e77c51439b4380c Mon Sep 17 00:00:00 2001
From: "Patrick H. Lauke" The intent of this Success Criterion 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
+ has occurred and can determine what is wrong. In the case of an unsuccessful form submission,
+ it is not sufficient to only re-display the form without providing any hint that the submission
+ failed. It also won't be sufficient to merely indicate that fields are in error, but not providing
+ users with sufficient information about the specific nature of the error. The error messages should
+ be as specific as possible. And, to ensure that the information is available to all users (whether
+ they are using assistive technologies or not), the error messages must be provided as visible text.
+ Per the definition in WCAG 2.0, an "input error" is information provided by the user
that is not accepted. This includes:
Intent of Error Identification
Intent of Error Identification
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
+ Currently, few technologies support this kind of programmatic information, but this
Success Criterion does not require, nor prevent it.
-
It is perfectly acceptable to indicate the error in other ways such as image, color - etc, in addition to the text description. - + etc, in addition to the text description. +
+There may also be situations in which it is clear from the context what the specific error + is - for instance, in a simple login form with a username and password field, if a user + leaves one of the fields completely blank, simply indicating that the empty field is in + error using an image or icon (with appropriate alternative text) would be sufficient. + However, if the user did enter data in both of those fields, and login was unsuccessful, further + information and an actual specific error message will be required (e.g. "no account found with this + username", or "the username or password are incorrect"). Likewise, in a form that explicitly indicates + that all fields are mandatory/required, it will be sufficient to indicate empty fields as being in error, + without the need to reiterate that the user must fill in the field.
See also @@ -94,16 +103,14 @@
This Success Criterion does not mean that color or text styles cannot be used to indicate - errors. It simply requires that errors also be identified using text. In this example, - two asterisks are used in addition to color. + errors. It simply requires that errors also be identified using text.