Autocomplete attribute must be used correctly
Go to the latest version (3.3)
How to Fix the Problem
- Identify any form elements that accept an individual's personal data.
- For each form element that accepts an individual's personal data:
- Check to see if the personal data is one of the 53 types identified in WCAG 2.1 Section 7 Input Purposes for User Interface Components opens in a new window.
- Confirm that the autocomplete attribute is set with the appropriate value to identify the purpose of that UI component.
Why this is Important
Failure to provide autocomplete values in form fields results in inaccessible content. Screen readers do not read identified autocomplete form fields if the appropriate autocomplete attribute values are missing. Users cannot correctly navigate forms when screen readers cannot provide adequate information to the user regarding form field interaction requirements.
The purpose for each common input field that collects an individual's personal data is programmatically defined based on the list of 53 Input Purposes for User Interface Components. The autocomplete attribute values must be valid and correctly applied for screen readers to function correctly.
The Algorithm (in simple terms)
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.