autocomplete attribute cheat sheet
The right autocomplete token lets a phone fill a field in one tap. It is also a WCAG 2.1 level AA requirement.
Last updated November 30, 2026 · Keyboards checked on real phones: iPhone (iOS 17 and 18), Galaxy S24 and S25, Pixel 9, Motorola Edge 50 Fusion
Why it matters
WCAG success criterion 1.3.5, Identify Input Purpose (level AA), asks that fields collecting information about the user identify their purpose in code. In HTML that means the standard autocomplete tokens. Browsers and password managers use the same tokens to autofill. On a phone, that is the difference between typing a full address and tapping it once.
The tokens you will use most
| Field | Token |
|---|---|
| Full name | name |
| First / last name | given-name / family-name |
email | |
| Phone | tel |
| Street address (one line) | street-address, or address-line1 and address-line2 |
| City / state | address-level2 / address-level1 |
| ZIP or postcode | postal-code |
| Country | country-name (or country for a code) |
| Username | username |
| Password on a sign-in form | current-password |
| Password on a sign-up or change form | new-password |
| Code sent by text message | one-time-code |
| Card number / expiry / security code / name on card | cc-number / cc-exp / cc-csc / cc-name |
| Birthday | bday |
| Company | organization |
Common mistakes
- autocomplete="off" on personal details. Many browsers ignore it for some fields anyway. Where they obey it, people type their own address by hand.
- Made-up values such as
autocomplete="zip". Unknown tokens are ignored; the correct one ispostal-code. - current-password on a sign-up form. Password managers then offer the old password instead of generating a new one.
- Two addresses with the same tokens. Prefix them:
shipping postal-codeandbilling postal-code.
Check it
The checker guesses each field's purpose from its name, id and label. It flags missing or unknown tokens and puts the right one in the suggested tag.
A complete shipping form
<label for="n">Full name</label>
<input id="n" autocomplete="shipping name">
<label for="a1">Address</label>
<input id="a1" autocomplete="shipping address-line1">
<label for="a2">Apartment, suite (optional)</label>
<input id="a2" autocomplete="shipping address-line2">
<label for="c">City</label>
<input id="c" autocomplete="shipping address-level2">
<label for="s">State</label>
<select id="s" autocomplete="shipping address-level1">…</select>
<label for="z">ZIP code</label>
<input id="z" inputmode="numeric" autocomplete="shipping postal-code">
<label for="t">Phone</label>
<input id="t" type="tel" autocomplete="shipping tel">
With these tokens, an iPhone offers the saved contact card above the keyboard as soon as the first field is tapped, and one tap fills every field. Chrome on Android shows its saved addresses the same way. Without them, the phone has to guess from labels, and it often fills the city into the street field or skips the form entirely.
Order of tokens
A token can have up to three parts, in this order: an optional section (section-gift), an optional shipping or billing, and the field name. For a phone field you can also add home, work or mobile before tel. For example: autocomplete="billing postal-code" or autocomplete="section-2 shipping mobile tel".
How to test autofill on a phone
- Save your own contact card with an address on the phone.
- Open the form and tap the first field.
- Check that the suggestion bar shows your details, then tap it and see which fields fill.
- Any field left empty or filled wrongly has a missing or incorrect token.
Frequently asked questions
Does autocomplete apply to search boxes?
No. 1.3.5 covers information about the user. A search box or a comment field does not need a token.
Is autocomplete="on" enough?
No. "on" lets the browser guess. A specific token such as email or postal-code is what identifies the purpose.
Can I use autocomplete on a select?
Yes. Country and state selects should have country-name (or country) and address-level1 so autofill can choose the option.
Found a mistake or want a check added? Write to contact (at) mobileformcheck.com.