Errors and Constraints
Any instructions the user needs to follow in order to successfully complete the form should be placed at the beginning of the form so that all the requirements can be found in one location. Instructions placed after forms are often missed by assistive technology users. Required formats and types of data expected in fields should be included in the instructions.
Color, text and symbols are often used to indicate constraints for a particular field. Constraints need to be placed in the tooltip (in addition to the field name) and beside the field. All date, phone number, abbreviation formatting, required field indicator or other constraints need to be textually provided and obvious to users. Using properties available in Acrobat, some form elements can be set as required fields so that data entered must be verified in order for the form to be submitted. To set a field as required:
- Navigate to Tools > Forms > Edit.
- Confirm a Tasks pane appears on the right and the fields become editable.
- Activate the Context menu of the desired field.
- Navigate to and activate Properties…
- Confirm the Field Properties dialog opens and the General tab is the active tab.
- Locate the Common Properties section.
- Navigate to and activate the Required checkbox.
- Navigate to and activate the Close button.
- Confirm the field is now required by noting a red shaded background in Form Editing mode and a red colored outline around the required field in viewing mode. Fields not required have a black shaded background in editing mode and a black outline in viewing mode. NOTE: Since color is being used to indicate whether the field is required or not, remember to add a textual indicator such as an asterisk to tell users the field is required.
- Repeat steps for all required fields.
If a character limit is placed on a field, a non-visual method needs to be provided to allow users, especially the blind and visually impaired, to know when the limit has been reached. An audio tone can be played to indicate the text limit has been exceeded. Additionally, the number of characters currently typed can be displayed to the user so they can determine how to refine their answer..
It is good practice to include a means to allow users to review the content before final submission of the form occurs. Users should be given the ability to confirm the data entered to verify its accuracy. This user verification is especially important for forms dealing with health care, legal and financial matters.
Forms that have required fields will traditionally use validation code to ensure mandatory constraints are met after the user submits a form to be processed. It is common to see any requirements not met displayed on the form, but how the information is displayed tends to vary. Sometimes the fields are highlighted using color, text is placed alongside the delinquent field, error information is listed at the top of the page or error descriptions are placed in an alert dialog.
The most effective way to convey error information if it is going to be placed directly on the page, as opposed to an alert dialog, is to place the error information at the top of the form once the user explicitly initiates submitting the form. The top of the form is defined as somewhere above the first input field. When error information is placed after a field or whole form, AT users are likely to be confused and miss the information. Error messages need to be prefaced by the word Error or with an error icon with Error as the alternate text. Additionally, error messages need to include an appropriate description of the problem and indicate how the user can determine where the error exists (i.e., field name, special character, etc.).