Write an autocomplete token per box, ask the browser which ones it recognizes, then see which box autofill lands in. An interactive autocomplete Tokens for…
Checkout and login forms are where people give up most often. The right tokens cut the typing: one tap fills the address, the OTP code comes from the SMS, the password manager makes and saves a strong password. For people with motor or cognitive limits, that is the difference between a form finished and a form abandoned (WCAG 1.3.5 Identify Input Purpose).
Tokens are a fixed vocabulary, and a typo is dropped without a word
autocomplete="off" makes things safer No. off only asks the browser not to offer saved entries, and password managers in most browsers ignore it on login forms (MDN). People end up retyping or using weak passwords. Secret boxes need the right token: one-time-code, new-password, current-password.autocomplete="email" on the Nama box fills the email there. Match every token to what the box holds, use the fixed list (MDN “autocomplete”), and do not make up names.input.autocomplete. When it gives "", the whole attribute was dropped: a misspelling (e-mail), a word that is not a token (phone, zip, fullname), or a reversed order (tel mobile). Once it is recognized, make sure the box has a clear <label> and name, since the browser guesses from those too.autocomplete="tel mobile" on the phone box The browser answers "": the order is reversed (mobile tel), so the whole attribute is dropped.autocomplete="one-time-code" Phones (iOS, Android) offer the SMS code above the keyboard.