-
Notifications
You must be signed in to change notification settings - Fork 22
1.3.5
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.
If there are form elements asking anything about the user.
Use the Autocomplete Attribute Favlet to make the autocomplete field visible.
Check:
- the
autocompletevalue is valid and a recognised input purpose on every appropriate field - if an input field accepts two different types of input (for example, username or email to log in), both of the acceptable values are in the autocomplete attribute
Currently, autocomplete is the only way of adding input purpose in HTML, but this might change in future.
- Form fields about other users or that are non-user related should not have any of those autocomplete values
- Where there are security concerns - security always trumps accessibility, so having an
autocomplete=offmight make more sense than having an input purpose
It makes sense to use the correct input type (for example, type=email for email) but this is not required for WCAG.
Generally to test this you will need to inspect the code. However, if you are short on time, testing whether browser autofill works is likely to indicate whether the code has been written correctly. There are some exceptions to this. For example, Chrome identifies email fields even if the autocomplete attribute is not set.