Rule
CAPTCHA in a login step
A picture-puzzle CAPTCHA in an authentication step needs an alternative (AAA)
- Rule
captcha-alternative- WCAG 2.2
- 3.3.9 Accessible Authentication (Enhanced) (opens in a new tab) (Level AAA)
- Severity
- Serious
What it checks
The rule looks for CAPTCHA widgets, recognised by the address of their frame, the class names common services use, or a data-sitekey attribute. It asks about one only when it sits inside a form that also takes a credential: a password field, or a field marked current-password or one-time-code. A CAPTCHA on a contact form or a comment box is outside the criterion and passes.
When a person decides
The rule never fails. Many CAPTCHA widgets judge risk in the background and show a puzzle only sometimes, and a page may offer another way to sign in beside it. Neither shows in the markup. If the widget can show a picture puzzle, such as picking out every image with a bus in it, that is object recognition, which WCAG 3.3.9 does not allow in a login step unless there is an alternative or a mechanism that helps the user through it.
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">
<div data-sitekey="site-key"></div>
<button>Sign in</button>
</form>
Passes
<form action="/contact">
<label for="message">Message</label>
<textarea id="message" name="message"></textarea>
<div data-sitekey="site-key"></div>
<button>Send</button>
</form>
The engine is tested against both examples.
How to fix it
Offer another way to sign in that needs no puzzle, such as a passkey or an emailed link, or use a check that never shows one.
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.