Skip to content
Search topics

Form fields that block or break autofill

A delivery form turns autofill off and uses made-up autocomplete values, so the browser can't tell which field wants a name, an email, a postcode or a phone number.

Broken
Typed by hand, again.
The accessibility problem illustrated.
01

The problem

People who rely on autofill have to type their name, email, postcode and phone by hand, letter by letter.

02

Try it

Choose Simulate autofill, as if you picked your saved details from the browser.

Autofill can only fill a field that declares its purpose with a standard token. Under each field, see what the browser is told.

Broken Can you fix this?

autocomplete="off" Not a standard token: typed by hand
autocomplete="e-mail" Not a standard token: typed by hand
autocomplete="postcode" Not a standard token: typed by hand
autocomplete="off" from the form Not a standard token: typed by hand

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Tell the browser what each field is for, with the standard autocomplete token.

  1. 1Every field that asks for the user's own details has an autocomplete token for its purpose.
  2. 2Use only tokens from the HTML autofill list: tel, not phone; postal-code, not postcode.
  3. 3Don't turn autofill off for the user's own details, on the field or on the form.
Before Autofill turned off and made-up values
<form autocomplete="off">  <label for="name">Full name</label>  <input id="name" name="name" type="text" autocomplete="off">   <label for="email">Email</label>  <input id="email" name="email" type="text" autocomplete="e-mail">   <label for="postcode">Postcode</label>  <input id="postcode" name="postcode" type="text" autocomplete="postcode">   <label for="phone">Phone</label>  <input id="phone" name="phone" type="text"></form>
After Standard autocomplete tokens
<form>  <label for="name">Full name</label>  <input id="name" name="name" type="text" autocomplete="name">   <label for="email">Email</label>  <input id="email" name="email" type="email" autocomplete="email">   <label for="postcode">Postcode</label>  <input id="postcode" name="postcode" type="text" autocomplete="postal-code">   <label for="phone">Phone</label>  <input id="phone" name="phone" type="tel" autocomplete="tel"></form>

04

Verify the fix

4 checks, no mouse.

Test with: Autofill, Password manager, Touch

0 of 4 checked

Record the OS, browser, password manager and assistive-technology versions, the build, the date, and the actual result of each step. Repeat after the shared field component changes.

Limits

This is a starting pattern, not a guarantee for every application. How each browser and password manager uses the tokens differs, and some ignore off on their own. 1.3.5 needs the purpose to be declared, not autofill to succeed everywhere. Fields inside payment iframes and third-party widgets need the same check by whoever controls them. Test the complete journey with the browsers and tools your users rely on.

This is a recreated teaching example, not a finding about a named client. The code is a starting pattern: test it in your own product. No completed assistive-technology test is claimed here.

Keep this fixed as your code changes.

Turn guides like this into rules your coding agents and CI follow, then have the result retested with a keyboard and screen readers.

How retests work