Techniques for WCAG 2.0

Skip to Content (Press Enter)

-

G85: Providing a text description when user input falls outside the required format or values

Applicability

Content that accepts user data input, with restrictions on the format, value, and/or type of the input.

This technique relates to:

Description

The objective of this technique is to provide assistance in correcting input errors where the information supplied by the user is not accepted. When users enter data input that is validated, and input errors are detected, information about the nature and location of the input error is provided in text to enable the users to identify the problem. One approach is to use client-side validation and provide an alert dialog box that describes the error immediately when users enter invalid data in field. Another approach, using server-side validation, is to re-display the form (including any previously entered data), and a text description at the top of the page that indicates the fact that there was an error, describes the nature of the problem, and provides ways to easily locate the field(s) with a problem.

However the text description is provided, it should do one of the following things to assist the user:

Examples

Tests

Procedure

  1. Fill out a form, deliberately enter user input that falls outside the required format or values

  2. Check that a text description is provided that identifies the field in error and provides some information about the nature of the invalid entry and how to fix it.

  3. 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).

Expected Results

If this is a sufficient technique for a success criterion, failing this test procedure does not necessarily mean that the success criterion has not been satisfied in some other way, only that this technique has not been successfully implemented and can not be used to claim conformance.