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

FieldToken
Full namename
First / last namegiven-name / family-name
Emailemail
Phonetel
Street address (one line)street-address, or address-line1 and address-line2
City / stateaddress-level2 / address-level1
ZIP or postcodepostal-code
Countrycountry-name (or country for a code)
Usernameusername
Password on a sign-in formcurrent-password
Password on a sign-up or change formnew-password
Code sent by text messageone-time-code
Card number / expiry / security code / name on cardcc-number / cc-exp / cc-csc / cc-name
Birthdaybday
Companyorganization

Common mistakes

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

  1. Save your own contact card with an address on the phone.
  2. Open the form and tap the first field.
  3. Check that the suggestion bar shows your details, then tap it and see which fields fill.
  4. 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.