Intent
The intent of this success criterion is to have content authors place instructions or labels that identify the controls in a form so that users know what input data is expected. Instructions or labels may also specify data formats for fields especially if they are out of the customary formats or if there are specific rules for correct input. Content authors may also choose to make such instructions available to users only when the individual control has focus especially when instructions are long and verbose.
The intent of this Success Criterion is not to clutter the page with unnecessary information but to provide important cues and instructions that will benefit people with disabilities. Too much information or instruction can be just as much of a hindrance as too little. The goal is to make certain that enough information is provided for the user to accomplish the task without undue confusion or navigation.
When labels are provided for input objects, the input object's relationship to the label (or to redundant text serving as the label) must be programmatically determinable or available in text per 1.3.1: Info and Relationships.
Benefits
- When label elements are associated with input elements the label is spoken by screen readers when the field receives focus and users with impaired motor control are helped by a larger clickable area for the control, since clicking on the label or the control will activate the control.
- Field labels located in close proximity to the associated field assist users of screen magnifiers because the field and label are more likely to visible within the magnified area of the page.
- Providing examples of expected data formats help users with cognitive, language and learning disabilities to enter information correctly.
- Clearly identifying required fields prevents a keyboard only user from submitting an incomplete form and having to navigate the redisplayed form to find the uncompleted field and provide the missing information.
Examples
- A field which requires the user to enter the two character abbreviation for a US state has a link next to it which will popup an alphabetized list of state names and the correct abbreviation.
- A field for entering a date contains initial text which indicates the correct format for the date.
- A field for entering a given name is clearly labeled with "Given Name" and the field for family name is labeled "Family Name" to avoid confusion over which name is requested.
- A U.S. phone number separates the area code, exchange, and number into three fields. Parentheses surround the area code field, and a dash separates the exchange and number fields. While the punctuation provides visual clues to those familiar with the U.S. telephone number format, the punctuation is not sufficient to label the fields. The single "Phone number" label also cannot label all three fields. To address this, the three fields are grouped in a fieldset with the legend "Phone number". Visual labels for the fields (beyond the punctuation) cannot be provided in the design, so invisible labels are provided with the "title" attribute to each of the three fields. The value of this attribute for the three fields are, respectively, "Area Code", "Exchange", and "Number".
Related Resources
Resources are for information purposes only, no endorsement implied.
Techniques
Each numbered item in this section represents a technique or combination of techniques that the WCAG Working Group deems sufficient for meeting this Success Criterion. However, it is not necessary to use these particular techniques. For information on using other techniques, see Understanding Techniques for WCAG Success Criteria, particularly the "Other Techniques" section.
Sufficient Techniques
-
Providing descriptive labels AND one of the following:
- ARIA1: Using Accessible Rich Internet Application describedby property to provide a descriptive, programmatically determined label
- ARIA9
- ARIA17
- G89: Providing expected data format and example
- Providing text instructions at the beginning of a form or set of fields that describes the necessary input
- Positioning labels to maximize predictability of relationships
- G83: Providing text descriptions to identify required fields
- Indicating required form controls
- Indicating required form controls in Flash
- PDF5
- H44: Using label elements to associate text labels with form controls
- Using auto labeling to associate text labels with form controls
- Setting the label property for form components
- Labeling a form control by setting its accessible name
- PDF10
- SL26
- H71: Providing a description for groups of form controls using fieldset and legend elements
- Adding a group name to the accessible name of a form control
- H65: Using the title attribute to identify form controls when the label element cannot be used
- SL8
- Using adjacent button to label the purpose of a field
The techniques at the end of the above list should be considered "last resort" and only used when the other techniques cannot be applied to the page. The earlier techniques are preferred because they increase accessibility to a wider user group.
Advisory Techniques
Although not required for conformance, the following additional techniques should be considered in order to make content more accessible. Not all techniques can be used or would be effective in all situations.
- G13: Describing what will happen before a change to a form control is made
- SL19
- Providing linear form design and grouping similar items (future link)
Failures
The following are common mistakes that are considered failures of this Success Criterion by the WCAG Working Group.