Setting the HTML
attribute on form fields simplifies the comprehension and
completion of these fields for users with cognitive and physical disabilities.
- Add the
autocompleteattribute to form fields that match any of the preset values. [[WCAG-1.3.5]]
Frequently Asked Questions
- Why isn't the input label sufficient?
Input labels for the same information differ site-to-site and language-to-language making them unreliable for machine processing. The controlled keywords for the
autocompleteallow user agents and assistive technologies to determine the purpose without having to parse language and spelling peculiarities.
Although not as common in reading systems as in web browsers, saving personal information allows user agent to automatically fill it in the next time the user encounters the same field. A publication may ask for this type of information in the context of an educational program or to sign up to receive updates from the publisher.
To provide this functionality, the user agent needs to understand the information the user inputs as
well as when it is relevant to use again. The
attribute is the key to this machine understanding. It allows authors to assign a precise
machine-readable semantic to form fields so that the user agent understands where what information
goes in what field.
The HTML definition of the attribute includes the list of semantics that are available. The semantics cover such information as names, addresses, birth dates, and telephone numbers. The WCAG documentation also provides a condensed list of the values.
autocomplete attribute makes forms simpler to complete for users with
cognitive and physical disabilities as they do not have to re-enter the same information again and
again each time they are asked for personal information.
Using these semantics also allows user agents to augment comprehension in other ways. For example, they could add a standard visual cue (an icon such as a telephone or birthday cake) to further help users understand each field's purpose.