Guideline 2.5 Level 2, SC 1
This technique applies to interactive environments where the user is required to provide information.
Providing error notification as then user enters information
When this task is completed, the user would be notified of errors immediately after providing a piece information and before moving to the next field.
One of the difficulties in providing error notification after the form is completed is that it is sometimes difficult for people with disabilities to find which error applies to which field. This technique would overcome this problem by notifying the user of error immediately after they leave the field. The user would be notified of the error and then given the choice correct the field that they had just completed or to continue.
Example 1: An error during a credit card number entry
"you have entered too many digits in the credit card field - press OK to re-enter, press CANCEL to move to the next field"
When the user presses OK they are returned to the field they were in and can correct the error. If they cannot give the correct information but want to continue on the form they would press CANCEL and would be dropped into the next field.
Link to a JavaScript (client side) technique that works as follows:
As soon as the user leaves a field the program looks at what was entered. The program compares what was entered to a set of prescribed criteria. It the information provided by the user, the program does nothing and the user carries on. If the there is an error, a notification pops up and says something like:
Editor's Note: Although several accessibility experts recommended this technique, if sloppily implemented, there is a danger that the user could get caught in a loop from which they could not escape. For instance, if they do not have their credit card with them, then they will be unable to fill in the field properly. If they had already started filling in the field, the Javascript would not let them leave until it was correctly completed. Then they would not be allowed to leave the field until the information is provided. The only way out would be to close the browser and abandon the form. That is why the CANCEL button to continue would be necessary.