Rule

Accessible login fields

Login fields must not block paste or password managers.

Rule
auth-field-obstruction
WCAG 2.2
3.3.8 Accessible Authentication (Minimum) (opens in a new tab) (Level AA)
3.3.9 Accessible Authentication (Enhanced) (opens in a new tab) (Level AAA)
Severity
Serious

What it checks

The rule looks at password fields, apart from those marked autocomplete="new-password", and at fields marked current-password or one-time-code. It reads two things from the markup: an inline onpaste handler that cancels the paste with return false or preventDefault, and autocomplete="off", which discourages password managers. A field with neither passes.

Paste handlers a script adds with event listeners cannot be read from the page, so the rule sees only the inline kind.

When a person decides

The rule never fails. WCAG names password managers and copy and paste as two separate ways through a login, and a page may also offer another way in, such as a passkey or an emailed link. Blocking paste leaves the password manager, and most browsers fill a field despite autocomplete="off", so a person needs to check what still works. Where nothing shows the field takes an existing password, as in a form with two password fields, the review also asks whether it is part of signing in at all.

Example

Sent to review

<form action="/sign-in">
  <label for="user">Email</label>
  <input id="user" type="email" autocomplete="username">
  <label for="pass">Password</label>
  <input id="pass" type="password" autocomplete="current-password" onpaste="return false">
  <button>Sign in</button>
</form>

Passes

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

The engine is tested against both examples.

How to fix it

Remove the paste blocking and let a password manager fill the field. Do not set autocomplete="off" on a login field.

Check your own pages

This rule runs in every pour audit: the browser extension, the bookmarklet, the command line and the editor. Get pour, free.