Perceivable · 1.3 Adaptable

Identify Input Purpose WCAG 1.3.5 · Level AA

Fields that collect information about the user, such as name, email, phone or address, must have their purpose identified in code where the technology supports it, which in HTML means the matching autocomplete value.

Level
AA
Since
WCAG 2.1
Principle
Perceivable
Guideline
1.3 Adaptable

Live demo

Let the browser fill in the form

The same task, done two ways: switch between the version that passes and the one that fails, or put them side by side. Everything in the box is live, so try it with a keyboard, a pointer or a screen reader.

Press Autofill like a browser in each version. Check which fields get filled and whether the right details land in them.

Live example

Passes

Delivery details

What happened

    Why it passes

    Each field states its purpose with a valid autocomplete value, so the browser fills in the person's name, email, phone and address correctly in one step.

    Why it fails

    Most fields have no autocomplete value, one uses a made-up value and one names the wrong detail. The person has to type almost everything, and their last name lands in the First name box.

    Examples

    Code that fails, and the fix

    Four examples, each one running: the usual ways this criterion fails, and code that passes. Listen to them, measure them, or copy the code.

    01What changes + autocomplete="…" ×2

    Fails

    Personal fields without autocomplete

    Live preview

    HTML
    <label for="email">Email</label><input id="email" name="email" type="email"><label for="phone">Mobile number</label><input id="phone" name="phone" type="tel">

    Nothing in the code says these fields ask for the user's own email and phone number, so browsers and assistive tools cannot reliably fill them in or mark them with familiar icons.

    Passes

    Valid autocomplete values

    Live preview

    HTML
    <label for="email">Email</label><input id="email" name="email" type="email" autocomplete="email"><label for="phone">Mobile number</label><input id="phone" name="phone" type="tel" autocomplete="tel">

    email and tel are values from the WCAG list of input purposes, so each field's purpose is machine-readable and the browser can fill it in (technique H98).

    02What changes 6 lines

    Fails

    Wrong and made-up autocomplete values

    Live preview

    HTML
    <label for="first">First name</label><input id="first" name="first" autocomplete="family-name"><label for="mail">Email</label><input id="mail" name="mail" type="email" autocomplete="useremail">

    family-name says this field wants a surname, so autofill puts the wrong name in it, and useremail is not a valid value, so it does not identify the field at all.

    Passes

    Delivery address with section hints

    Live preview

    HTML
    <label for="addr">Street address</label><input id="addr" name="addr" autocomplete="shipping address-line1"><label for="zip">ZIP code</label><input id="zip" name="zip" autocomplete="shipping postal-code"><label for="country">Country</label><input id="country" name="country" autocomplete="shipping country-name">

    The shipping hint followed by a field name identifies each part of the user's own delivery address, so it can be filled from their saved details.

    Why it matters

    Who it helps

    People with cognitive, memory or motor disabilities can have the browser fill in their details and can use tools that add familiar icons to fields, reducing typing and errors.

    W3C: Understanding 1.3.5
    • Level AA

      Level AA is the level most laws and policies require.

    • In WCAG versions

      Added in WCAG 2.1 in June 2018, and kept in 2.2.

      No WCAG 1.0 checkpoint maps to it.

    • Where it is required

      Required where the law names WCAG 2.1 or later at this level: the United States, Canada, the European Union, the United Kingdom, France, Germany, Italy, Spain, the Netherlands, Ireland, Norway, Switzerland, India, Australia and New Zealand.

    How to test

    Checking it

    A few concrete steps. Automated tools find some failures; most need a person.

    1. List every field that asks for the user's own details, such as name, email, phone, address or card number.
    2. Check that each one has the correct, valid autocomplete value, such as email, tel or postal-code.
    3. Leave out fields about other people, such as a gift recipient's address, which the criterion does not cover.

    Common failures

    Where it breaks

    • A sign-up form's name, email and address fields have no autocomplete attribute.
    • An autocomplete value does not match the field, such as family-name on a first-name field.
    • A made-up token such as useremail is used instead of a valid value such as email.

    On the Accessibility Checklist