Forms
Guideline
Labels or instructions are provided when content requires user input and any information, structure, or relationships conveyed through presentation can be programmatically determined or are available in text. 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.
In addition, WCAG 2.1 added that the purpose of each input field collecting information about the user can be programmatically determined when:
- The input field serves a purpose identified in the Input Purposes for User Interface Components section; and
- The content is implemented using technologies with support for identifying the expected meaning for form input data.
Intent
The intent of this regulation 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.
This regulation is not meant 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.
In addition, it is important to ensure that the purpose of a form input collecting information about the user can be programmatically determined, so that user agents can extract and present this purpose to users using different modalities. The ability to programmatically declare the specific kind of data expected in a particular field makes filling out forms easier, especially for people with cognitive disabilities.
Appropriate visible labels and instruction can help users understand the purpose of form input fields, but users may benefit from having fields that collect specific types of information be rendered in an unambiguous, consistent, and possibly customized way for different modalities - either through defaults in their user agent, or through the aid of assistive technologies.
For some input fields, the type attribute already offers a way to specify the purpose, for example, input type="tel", input type="email", or input type="password". However, these are only very broad categories, describing the type of input, but not necessarily its purpose, especially as it relates to user-specific input fields. As an example, type="email" indicates that the field is for an e-mail address but does not clarify if the purpose is for entering the user's e-mail address or some other person's e-mail.
Finding Applicable Components
- Find all form input components. Examples include buttons, text fields, radio buttons, checkboxes, multi-select lists (combo boxes).
- Find all instructions and cues (textual and graphical ) that are related to form components/controls, including groupings, order of completion, special conditions or qualifiers, etc.
Inspecting and Using Components
- Analyze the page using DeQue's Attest extension and document any form elements that do not have associated labels.
- If present, all instructions and cues are related to the components.
- If required fields are present, validate that an associated instruction or cue is present before the form fields in the document reading order.
- Analyze each form input that serves a purpose as identified in the Input Purposes for User Interface Components section and ensure that the purpose can be programmatically determined, either through the
type
orautocomplete
attribute.
Section 508/WCAG 2.0 Failure Conditions
- Form fields do not have associated or correct labels
- 1194.22(n): Labels for forms.
- Fails 3.3.2 Labels or instructions
- Instructions and cues are not related to their components
- 1194.22(n): Labels for forms.
- Fails 3.3.2 Labels or instructions
- The purpose of inputs requesting user data cannot be programmatically determined.
- Fails 1.3.5 Identify Input Purpose
Reporting Test Results
Any failure in Section 508 Failure Conditions results in: Fails Baseline Requirement #11.
- Any instance where content flashes less than 3 times each second or does not flash at all then: Passes Baseline Requirement #11.
See Also |