Level
AA
Since
WCAG 2.1
Entries
12 / 193
/ WCAG criterion

1.3.5 Identify Input Purpose

A form field that asks for the visitor's own details has to say in the code what kind of detail it wants, so the browser can fill it in.

/ What it requires

When a form asks for the visitor's own name, email, phone number, address or card details, the code has to state what each field is for. In HTML that is the autocomplete attribute with a value from a fixed list, such as email or postal-code. The browser can then fill the field from a saved profile, which spares people with motor or memory difficulties the typing, and other tools can show a familiar icon next to it.

Only fields that collect information about the person filling in the form are covered, and only the purposes on the list in WCAG 2.1, which is taken from the HTML autofill tokens. A search box, a message field or the address of a gift recipient is outside it. A field for the user's own email without autocomplete fails, and so does the same field set to off or to a made-up value such as phone. It applies wherever the technology can state the purpose, as HTML can.

/ How pages fail it

  • A name, email, phone or address field has no autocomplete attribute.
  • The attribute is set to off on a field that collects the user's own data, usually to silence the browser's suggestions.
  • The value is not a valid token, for example phone where the token is tel, or zip where it is postal-code.
  • The token does not match the field, such as autocomplete="name" on an email input.
  • A custom widget built from div elements collects personal data and cannot carry an autocomplete attribute at all.

/ How to check it yourself

  1. List every field that asks for the visitor's own details: in sign-up, login, checkout, contact and account forms.
  2. Inspect each one in the developer tools and read its autocomplete attribute. Compare the value with the Input Purposes list in WCAG 2.1 or with the autofill tokens in the HTML standard.
  3. Save a test address and a test card in the browser's autofill settings, reload the form and see which fields the browser offers to fill and whether the right value lands in each.
  4. Check the password fields: a login field should carry current-password and a registration field new-password.

/ How to fix it

  • Add the matching token to each input, select and textarea: given-name, family-name, email, tel, street-address, postal-code, country, bday.
  • On payment forms use cc-name, cc-number, cc-exp and cc-csc.
  • Remove autocomplete="off" from fields that collect the user's own data.
  • When a page holds two addresses, prefix the tokens with shipping or billing, for example autocomplete="shipping postal-code".
  • Build these fields from native input elements and set a fitting type, such as type="email" or type="tel".

/ What our scanner checks

The rendered pass looks at visible text-type inputs, selects and textareas without an autocomplete attribute and reports those whose name or id contains a word for personal data, such as name, email, phone, address, city, postal, country, card or birth. It never reads the label, so a field with a neutral name is missed. Nor does it check the value: any autocomplete, even off or a wrong token, passes.

/ Who fails it, in our own measurements

Measured bodies failing this criterion, most instances first
BodySectorInstancesScore
Bostoncity · US26
Chicago Transit Authoritytransport · US24
Szczecincity · PL23
Bundesnetzagenturgovernment · DE19
Bundeszentrale für politische Bildunggovernment · DE110
Elblągcity · PL120
Gliwicecity · PL113
Komisja Nadzoru Finansowegogovernment · PL18
Münchencity · DE122
Polski Instytut Sztuki Filmowejculture · PL17
Prezydent RPgovernment · PL112
Wrocławcity · PL12

One page per body, measured by automated checks on a weekly schedule. Any body that has fixed something since the last sweep will show it at the next one, and every entity page carries a right of reply.

/ Questions about this criterion

Which form fields need the autocomplete attribute?

Fields that collect information about the person filling in the form, where the purpose appears on the Input Purposes list in WCAG 2.1: names, email, telephone, the parts of a postal address, birthday, username, passwords, payment card details and a few more. Fields for anything else, such as a search term, a message, or data about another person, are outside 1.3.5.

Does autocomplete="off" fail WCAG?

On a field that collects the user's own data for a listed purpose, yes: the purpose can no longer be determined from the code, and that is exactly what 1.3.5 asks for. On other fields it is not a WCAG matter. Browsers often ignore off on login fields anyway, so it rarely achieves what it was added for. A specific token is the safer choice.

What are the correct autocomplete values for name, email and phone?

For a full name use name; for separate fields use given-name and family-name. An email address is email and a telephone number is tel, not phone. A postal code is postal-code, a street is street-address or address-line1, the city is address-level2 and the country is country or country-name. The full list is in the HTML standard, in the section on autofill.