Skip to content
easeweb
Search topics

Password fields that won't take a pasted password

An energy supplier's sign-in cancels paste on its password field, so a password copied from a password manager can't go in and has to be typed from memory.

WCAG 2.2
SC 3.3.8AA· new in 2.2
EN 301 549
Clause 5.3
Broken <input type="password" onpaste="return false">
The accessibility problem illustrated: Cognitive:Why won't my password go in?
01

The problem

People who keep their password in a password manager, or can't remember it exactly, can't paste it in, so they have to recall it or copy it out character by character.

02

Try it

Choose Copy password in the password manager, then paste it into the Password field with Ctrl+V or the context menu.

The panel under the page shows how much of the password went in. If copying is blocked here, select the dots in the manager and copy them yourself.

Broken Can you fix this?

BrokenA password field that cancels paste

Password manager

Northbeam Energy [email protected] plum7-Kettle-orbit-48

Sign in to your account

What went in: 0 of 21 characters

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Let the password be pasted or filled in, or offer a way in that needs no password.

  1. 1Never cancel paste or drop on a sign-in field.
  2. 2Mark the username and password up so password managers can fill them.
  3. 3Where the password step can't change, offer a way in that needs no password.
Before A password field that cancels paste
<form action="/sign-in" method="post">  <label for="email">Email</label>  <input id="email" name="email" type="email">  <label for="password">Password</label>  <input id="password" name="password" type="password" onpaste="return false">  <button type="submit">Sign in</button></form>
After

A password field that takes a paste and can be filled in

<form action="/sign-in" method="post">  <label for="email">Email</label>  <input id="email" name="email" type="email" autocomplete="username">  <label for="password">Password</label>  <input id="password" name="password" type="password" autocomplete="current-password">  <button type="submit">Sign in</button></form>

Fixing this with an AI coding assistant? Get this guide as Markdown, or get every guide in your coding agent.

04

Verify the fix

4 checks, no mouse.

Test with: Keyboard, Screen reader, Password manager, Autofill

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 sign-in form or the component library it is built with changes.

Limits

This is a starting pattern, not a guarantee for every sign-in. It covers the password step; every other step of signing in, such as a code, a security question or a puzzle, needs the same test. The criterion covers signing in to an account that exists, not creating one, though setting a password should take a paste for the same reasons. Whether an emailed link reaches people in time depends on their email, which the page can't test. Test the whole sign-in with the password managers 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