Skip to content
Andrew Hick edited this page Jun 6, 2023 · 8 revisions

1.3.5 Identify Input Purpose

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.

When this is applicable

If there are form elements asking anything about the user.

Check the source code

Use the Autocomplete Attribute Favlet to make the autocomplete field visible.

Check:

  • the autocomplete value 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.

Exceptions

  • 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=off might make more sense than having an input purpose

Best practice

It makes sense to use the correct input type (for example, type=email for email) but this is not required for WCAG.

Other ways to test

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.

Mobile app testing

If it is supported on your device, check that auto-fill works for relevant input fields asking about the user.

Auto-fill settings

iOS and Android behave differently regarding auto-fill. Where available, it should be activated.

On iOS:

  • There is no global auto-fill setting for apps (only Safari).
  • However, apps can request access to your contact details.

On Android:

  • Auto-fill can be enabled in settings.
  • To check whether auto-fill is enabled or not, go to Settings > Passwords and accounts > Auto-fill service. (The location of the setting might vary across different phone models and Android versions.)

Clone this wiki locally