Verify accessible authentication (enhanced)
Description
WCAG Success Criterion 3.3.9 (Level AAA) is the enhanced successor to SC 3.3.8. It requires that authentication processes do not rely on any cognitive function test – including remembering a password, solving a CAPTCHA, transcribing a code, identifying objects in an image, or recognising personal content such as a user-uploaded photo – without providing a non-cognitive alternative. The only exception is when the cognitive test involves the user’s own personal content (e.g., Select the photo you uploaded
) and a mechanism such as copy-and-paste or assistive technology support is available to help complete it.
This rule scans for login containers (form[action*="login"], #login, .login-container) and flags them for manual review. Because an automated tool cannot determine whether an authentication step requires object recognition or whether a non-cognitive fallback (such as a passkey or magic link) exists, a human auditor must verify the entire login flow. For more details, see Understanding SC 3.3.9 – Accessible Authentication (Enhanced).
Disabilities impacted
- Cognitive disabilities – Users with memory impairments, dyslexia, or intellectual disabilities face barriers when authentication requires memorising passwords, solving puzzles, or recognising objects in images. SC 3.3.9 is the first criterion to explicitly ban object-recognition and personal-content challenges, removing an entire class of inaccessible CAPTCHAs.
- Visual disabilities – Screen reader and magnification users often encounter visual CAPTCHAs that require identifying objects (e.g.,
select all images with crosswalks
), which are impossible to complete non-visually. Even audio CAPTCHAs can be difficult to parse for users who are deaf-blind. A non-cognitive alternative such as a hardware security key or email magic link removes this barrier. - Language and learning disabilities – Users who are non-native speakers or have language-related learning difficulties may struggle with transcribed text challenges, puzzle instructions, or object-label mismatches. Eliminating all cognitive function tests from authentication ensures equitable access regardless of language proficiency or educational background.
Why it matters
Authentication is the gateway to nearly every online service – banking, healthcare, e-commerce, and social platforms. When the only available method depends on cognitive functions, large segments of the population are effectively locked out. SC 3.3.9 raises the bar by prohibiting commonly deployed barriers such as select all images with a car
or identify the photo you took
– challenges that require object recognition or personal content memory. Inclusive authentication not only satisfies legal requirements (e.g., ADA, European Accessibility Act, Section 508) but also reduces abandonment rates, support costs, and the risk of account lockouts. By decoupling security from cognitive ability, organisations build trust and reach a wider audience without compromising safety.
Coding problems and solutions
Common coding problems
- Object-recognition CAPTCHA as sole barrier – Requiring users to identify objects (e.g., traffic lights, crosswalks, storefronts) in images with no fallback such as a magic link or passkey.
- Personal-image identification – Asking users to select which of several images they personally uploaded or tagged, a method still permitted as an exception under SC 3.3.9 only when a mechanism to assist completion is provided.
- Password input blocks paste – Using JavaScript to disable
pasteorcopyevents, forcing users to manually type credentials and preventing password-manager assistance. - No support for credential managers – Omitting
autocompleteattributes (username,current-password,new-password), preventing browsers and password managers from filling fields. - Multi-factor cognitive chain – Requiring a password, a CAPTCHA and a security question or image identification before granting access, with no single-pass alternative like a passkey or biometric scan.
- Session timeout without warning – Silently logging users out during extended input (common for cognitive assistive technology users) and discarding all entered data with no extension option.
How to fix it
Replace object-recognition CAPTCHAs with non-cognitive alternatives
Under SC 3.3.9, asking users to identify objects in images (e.g., select all squares with crosswalks
) is not permitted unless no cognitive challenge is involved. Replace such CAPTCHAs with email magic links, WebAuthn passkeys, or OTP codes that can be copy-pasted by a password manager.
<form action="/login" method="post">
<label for="email">Email address</label>
<input type="email" id="email" name="email"
autocomplete="email">
<button type="submit">Send magic link</button>
</form>
<hr>
<button id="passkey-btn" type="button">
Sign in with passkey (fingerprint or PIN)
</button><form action="/login" method="post">
<label for="email">Email</label>
<input type="email" id="email" name="email">
<label for="pass">Password</label>
<input type="password" id="pass" name="pass">
<div id="captcha-widget">
<p>Select all images with a storefront:</p>
<div class="g-recaptcha"></div>
</div>
<button type="submit">Log in</button>
</form>
<!-- No magic link, no passkey, no non-cognitive fallback -->Handle personal-content challenges with a completion mechanism
The enhanced criterion allows one exception: when the cognitive function test relies on the user’s own personal content (e.g., Select the photo you uploaded
), it is permitted only if a mechanism is available to help the user complete the task – typically copy-and-paste or direct assistive-technology support.
<form action="/login" method="post">
<label for="pass">Password</label>
<input type="password" id="pass" name="pass"
autocomplete="current-password"
autocorrect="off" spellcheck="false">
<p>Select the photo you uploaded:</p>
<div role="group" aria-label="Your photos">
<button type="button" class="photo-option"
data-id="img-A">
<img src="/thumbs/photo-A.jpg" alt="">
</button>
<button type="button" class="photo-option"
data-id="img-B">
<img src="/thumbs/photo-B.jpg" alt="">
</button>
</div>
<!-- Assistive mechanism: copyable token -->
<details>
<summary>Need help identifying your photo?</summary>
<p>Open the email we sent earlier and paste
the verification code here:</p>
<input type="text" name="personal-token"
autocomplete="off">
</details>
<button type="submit">Sign in</button>
</form><form action="/login" method="post">
<label for="pass">Password</label>
<input type="password" id="pass" name="pass">
<p>Which of these photos did you take?</p>
<div>
<img src="/photos/a.jpg" alt="">
<img src="/photos/b.jpg" alt="">
<img src="/photos/c.jpg" alt="">
</div>
<label for="answer">Type the letter of your photo</label>
<input type="text" id="answer" name="answer">
<button type="submit">Log in</button>
</form>
<!-- No copy-paste token, no assistive mechanism -->Allow paste and autocomplete for credential fields
Never block paste, copy, or drag-and-drop on password inputs. Use correct autocomplete tokens so password managers can fill forms automatically, removing the cognitive load of memorising credentials.
<form action="/login" method="post">
<label for="username">Username</label>
<input type="text" id="username" name="username"
autocomplete="username">
<label for="pass">Password</label>
<input type="password" id="pass" name="password"
autocomplete="current-password"
autocorrect="off" spellcheck="false">
<button type="submit">Sign in</button>
</form><form action="/login" method="post">
<label for="u">User</label>
<input type="text" id="u" name="u"
onpaste="return false"
oncopy="return false">
<label for="p">Password</label>
<input type="password" id="p" name="p"
onpaste="return false"
autocomplete="off">
<button type="submit">Log in</button>
</form>
<!-- autocomplete="off" disables password managers -->Offer WebAuthn / passkey as the primary method
WebAuthn passkeys let users authenticate with a fingerprint, face scan, or device PIN – no memory, transcription, or object recognition required. This is the strongest approach to meet SC 3.3.9 because it eliminates all cognitive function tests from the authentication flow.
<form id="passkey-login">
<p>Sign in quickly and securely:</p>
<button id="passkey-btn" type="button"
class="btn btn-primary">
Sign in with passkey
</button>
<p>Or <a href="/login-password">use a password</a>.</p>
</form>
<script>
const passkeyBtn = document.getElementById('passkey-btn');
if (passkeyBtn &&
typeof globalThis.PublicKeyCredential !== 'undefined') {
passkeyBtn.addEventListener('click', async () => {
try {
const credential = await navigator.credentials.get({
publicKey: {
challenge: new Uint8Array(32),
allowCredentials: [],
userVerification: 'required'
}
});
// ... send credential.id to server for verification
} catch (err) {
console.error('Passkey authentication failed:', err);
}
});
}
</script><form action="/login" method="post">
<label>Email
<input type="email" name="email">
</label>
<label>Password
<input type="password" name="password"
autocomplete="off">
</label>
<div class="g-recaptcha"
data-sitekey="abc123"></div>
<button type="submit">Log in</button>
</form>
<!-- No passkey, no magic link, object-recognition CAPTCHA -->Preserve session state during extended input
Users who rely on assistive technology may need extra time to complete authentication forms. Do not discard their progress on timeout without warning.
const idleTimer = globalThis.setTimeout(() => {
const banner = document.getElementById('timeout-banner');
if (banner) {
banner.hidden = false;
banner.textContent =
'Your session will expire in 60 seconds. ' +
'Click anywhere to stay signed in.';
}
}, 120000);
// Allow user to extend session
document.addEventListener('click', () => {
globalThis.clearTimeout(idleTimer);
const banner = document.getElementById('timeout-banner');
if (banner) {
banner.hidden = true;
}
}, { once: true });const timeoutId = globalThis.setTimeout(() => {
globalThis.location.href = '/login?timeout=1';
}, 30000);
// No warning, no extension mechanism, no cleanup on successNote that support for the title attribute varies across screen readers. For instance, VoiceOver by default has Hints set to Never
or Speak after delay
, which may prevent the title from being announced. Do not rely solely on title for critical information.
Known Limitations
- Manual verification required – This rule flags login containers for review but cannot automatically determine whether an alternative authentication method exists or whether a CAPTCHA relies on object recognition. A human auditor must inspect the full login flow.
- Single-page applications (SPAs) – SPAs that dynamically inject login forms after initial page load may not be captured if the selector runs before the SPA framework renders the DOM. An additional audit pass after the SPA has settled may be needed.
- Shadow DOM encapsulation – Login components nested inside closed shadow roots are invisible to the DOM selector. The auditor must manually check all shadow roots where authentication fields may live.
- Cross-origin iframes – Third-party authentication widgets (e.g., social login buttons, embedded CAPTCHAs or passkey prompts) served in cross-origin iframes cannot be inspected or selected by this rule and require independent verification.
- JavaScript-heavy authentication flows – Some authentication providers dynamically render challenge widgets via JavaScript after a delay or after user interaction. The initial DOM snapshot may not contain the login container if it is created asynchronously.
- Exception for personal content ambiguity – The criterion permits cognitive tests that involve the user’s own personal content when a completion mechanism is provided. Auditors must determine whether the escape mechanism (e.g., a copy-paste token) is genuinely usable by all users, including those relying on screen readers or switch devices.
Resources
- Understanding WCAG SC 3.3.9 – Accessible Authentication (Enhanced)
- WCAG 2.2 Success Criterion 3.3.9
- MDN – The autocomplete attribute
- MDN – Web Authentication API (WebAuthn)
- W3C WebAuthn Level 3 Specification
Rule
- Audit: accessibility
- Standard: WCAG
- Level: AAA
- Success Criteria: 3.3.9
- Rule ID:
accessible-authentication-enhanced