Skip to content

Pasting into password fields is blocked

A password field on the page cancels pasting, so people can’t paste a password or have a password manager fill it.

Why it matters

Password managers and pasting are how many people, including those with memory or motor disabilities, sign in. Blocking paste forces them to retype long passwords.

WCAG 2.2 counts it under accessible sign-in: people shouldn’t have to remember or retype a password.

How to fix it

  1. Remove the code that cancels pasting into password fields: an onpaste handler, or a script calling preventDefault on paste.
  2. Add autocomplete values so password managers know what to fill:
    <input type="password" autocomplete="current-password">

Common mistakes

  • Blocking paste for “security”: the UK’s National Cyber Security Centre advises letting people paste passwords.

Check your fix

Once the change is live, check the page again.