Login forms that block paste and password managers: fix them
Short answer: If your customer or staff login blocks pasting, stops password managers filling in details, splits codes into boxes that reject paste, or asks people to solve puzzles, you're making it harder for everyone and locking out some people completely. WCAG 2.2's Accessible Authentication criterion says a cognitive test such as remembering a password or solving a puzzle shouldn't be required unless there's an alternative or a mechanism to help, and it names password managers and copy and paste as examples. Allow paste, mark fields with the right autocomplete values, accept pasted one-time codes, and offer a puzzle-free path.
What the guideline says
The W3C's Understanding document for WCAG success criterion 3.3.8, Accessible Authentication (Minimum), states that a cognitive function test, such as remembering a password or solving a puzzle, is not required for any step in an authentication process unless that step provides an alternative method, a mechanism to assist the user, or the test is to recognise objects or identify content the user provided.
The examples it gives of mechanisms that satisfy the criterion are support for password entry by password managers, to reduce memory need, and copy and paste, to reduce the burden of re-typing. It adds that if fields are prevented from being automatically populated, or users are prevented from copying and pasting, the page fails unless an alternative is provided.
This affects people with memory, reading or learning difficulties, and anyone using a password manager, which is good security practice.
Common ways login forms get this wrong
- Paste blocked on the password or email field with JavaScript, often in the belief it improves security.
autocomplete="off"on login fields, which can stop password managers saving or filling credentials.- Unlabelled or oddly structured fields that password managers can't recognise.
- One-time code boxes split into six separate inputs that each accept one digit and reject a pasted code.
- Puzzle CAPTCHAs on every login, such as typing distorted text or solving a sum.
- "Re-type the 3rd, 5th and 8th characters of your password" style challenges without assistance.
- Short timeouts that expire while someone is switching to their password manager or email.
How to fix your login
1. Allow paste everywhere in authentication. Remove any script blocking paste on email, username, password and code fields. Blocking paste pushes people towards short, memorable passwords, the opposite of what you want.
2. Use the right autocomplete values. MDN's reference for the autocomplete attribute lists username for the account name, current-password for the user's existing password, new-password for creating or changing a password, and one-time-code for a one-time code used as an additional factor, most commonly received by SMS, email or an authenticator app. The W3C document notes that login forms with correct input purpose and accessible names generally let browsers and password managers fill them in.
3. Make code entry paste-friendly. Prefer a single input for one-time codes, with autocomplete="one-time-code" and a numeric keyboard on phones. If you keep separate boxes for design reasons, make pasting a full code fill them all.
4. Avoid puzzles, or provide an alternative. For bot protection, prefer invisible or low-friction checks and rate limiting on login attempts. If a challenge is needed, offer another way through that doesn't require solving a puzzle.
5. Offer password-free options where it suits. Magic links by email, passkeys and sign-in with an existing account all reduce memory demands. Keep a fallback that works for people without those options.
6. Be generous with time. Allow enough time to fetch a code from email or an app, and let people request a new one easily.
Security worries, answered
| Worry | Reality |
|---|---|
| "Blocking paste stops attacks" | Attackers use scripts, not the paste function; blocking paste mainly hurts real users |
"autocomplete=off protects shared computers" |
Browsers may ignore it for login fields, and it discourages password managers |
| "Puzzles stop bots" | Rate limiting, lockouts with recovery and risk-based checks work without punishing every user |
Testing checklist
- Log in using a password manager on desktop and phone. Does it offer to save and fill?
- Copy a password from a note and paste it into the field. Does it work?
- Paste a six-digit code into the code entry. Do all digits land?
- Use the login with keyboard only and with a screen reader.
- Try the "forgot password" and sign-up flows, which often have the same problems.
Check third-party login screens too
Many small businesses don't build their own login. Booking systems, client portals, e-commerce platforms and learning tools each have their own sign-in pages. Test them with the checklist above. If a supplier blocks paste or forces puzzles, raise it with them and ask for a timeline; accessibility requirements increasingly appear in procurement checklists, and suppliers often fix such issues quickly when several customers ask.
Write it down
Add a short rule to your development or website standards: authentication fields allow paste and password managers, codes can be pasted, and no puzzle is required without an alternative. A rule written down survives redesigns and new developers; an undocumented decision tends to be reversed.
An illustrative example
A hypothetical Manchester accountancy practice's client portal blocked paste on its password field and used six separate boxes for emailed codes. Several older clients phoned every month because they couldn't log in. The developer removed the paste block, added autocomplete="username" and "current-password", replaced the six boxes with one code field that accepts paste, and added a "send me a sign-in link" option. Login support calls fell sharply.
FAQ
Is this only for big organisations?
No. Any site with logins benefits, and it reduces support requests.
Do I have to remove all CAPTCHAs?
Not necessarily, but provide an alternative that doesn't depend on solving a puzzle.
Does autocomplete="off" matter on non-login fields?
That's a separate question. For authentication fields, let browsers and password managers help.
Are passkeys accessible?
They remove the need to remember a password, which helps many users. Keep a fallback.
If your customer or staff login frustrates people and you'd like it made easier and safer, send us a link to the login page.