Skip to content
easeweb
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, email, postcode or phone.

WCAG 2.2
SC 1.3.5AA· new in 2.1
Required by
EN 301 549 (EU)
Broken autocomplete="off"
The accessibility problem illustrated: Reach, strength:Why won't my browser fill this in?
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?

BrokenAutofill turned off and made-up values
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

Give each field its standard autocomplete token

Before
BrokenAutofill 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>
What is wrong3 points

Every field is labelled, but none declares its purpose.

  • Full name is never offered the saved name. autocomplete="off" switches autofill off on the form, and again on Full name.
  • Phone is never offered the saved number either. It has no autocomplete, so it inherits off from the form.
  • Email and Postcode don't tell the browser their purpose. They use e-mail and postcode, values that aren't in the HTML list.
After
FixStandard 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>
How it is fixed3 steps
  1. Remove the off from the form.
  2. Name each field's purpose with a token from the HTML list: name, email, postal-code and tel. The browser, a password manager or a phone keyboard can then offer the right saved detail for each one, and fill the whole form in one step.
  3. Give the email and phone fields the matching type, which also brings up the right on-screen keyboard.

This fixes the Before and passes 1.3.5.

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.

EaseWeb service

Fixed it? Keep it from coming back.

I turn guides like this one into rules your coding agents follow and checks your CI runs. Then I retest by hand with a keyboard and screen readers, periodically.

See the service