SiteLint documentation and guidelines

Verify accessible authentication

Description

WCAG Success Criterion 3.3.8 (Level AA) requires that authentication processes do not rely on cognitive function tests such as remembering a password, solving a CAPTCHA, transcribing a code, or identifying objects in an image. Users must be able to complete authentication using methods that do not depend on memory, problem-solving, or pattern recognition. Acceptable alternatives include password manager support, copy-and-paste of credentials, biometric authentication (e.g., fingerprint or face recognition), hardware security keys, or single sign-on via a trusted provider.

This rule scans for login forms and password fields (form[action*="login"], #login, .login-form, [type="password"]) and flags them for manual review. Because automated tools cannot determine whether a CAPTCHA is cognitively demanding or whether a password field supports paste, a human auditor must verify that the authentication flow offers at least one non-cognitive pathway. For more details, see Understanding SC 3.3.8 – Accessible Authentication.

Disabilities impacted

  • Cognitive disabilities – Users with memory impairments, dyslexia, or intellectual disabilities may struggle to remember complex passwords, transcribe CAPTCHA codes, or solve puzzles. Authentication that relies on rote memorization or abstract problem-solving creates an insurmountable barrier without an alternative such as a passkey or biometric scan.
  • Motor control disabilities – Users with limited dexterity, tremors, or paralysis may find it difficult to type long passwords accurately or manipulate CAPTCHA widgets (e.g., dragging a slider or clicking distorted images). Alternatives like copy-and-paste from a password manager or single-tap biometric authentication remove this physical burden.
  • Visual disabilities – Screen reader and magnification users often encounter visual CAPTCHAs (distorted text, image identification) that are inaccessible by design. Even audio CAPTCHAs can be difficult to parse in noisy environments or for users who are both deaf and blind. A non-cognitive alternative such as a hardware security key or email magic link ensures equitable access.

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. Inclusive authentication not only satisfies legal requirements (e.g., ADA, EAA, 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

  • CAPTCHA as sole barrier – Requiring users to solve a visual or audio puzzle with no fallback (e.g., a magic link or checkbox).
  • Password input blocks paste – Using JavaScript to disable right-click or paste events, forcing users to manually type credentials.
  • No support for credential managers – Omitting autocomplete attributes (username, current-password, new-password), preventing browsers and password managers from filling fields.
  • Multi-step cognitive gauntlet – Requiring users to recall a username, a password, a PIN, and answer a security question before gaining access, with no single sign-on or biometric shortcut.
  • 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

Allow paste into password fields

Never block paste, copy, or drag-and-drop on password inputs. Password managers rely on these gestures to fill credentials.

Correct example
<label for="pass">Password</label>
<input type="password" id="pass" name="password"
       autocomplete="current-password"
       autocorrect="off" spellcheck="false">
Incorrect example
<label for="pass">Password</label>
<input type="password" id="pass" name="password"
       onpaste="return false"
       oncopy="return false"
       autocomplete="off">

Provide non-cognitive CAPTCHA alternatives

Offer at least one alternative that does not require object recognition, transcription, or puzzle-solving. Common patterns include email magic links, SMS one-time codes (when combined with copy-paste), or checkbox-based verification that is invisible to assistive technology.

Correct example – CAPTCHA with accessible fallback
<form action="/login" method="post">
  <label for="email">Email address</label>
  <input type="email" id="email" name="email" autocomplete="email">

  <!-- Invisible anti-bot check (no user interaction) -->
  <div aria-hidden="true" style="position:absolute;left:-9999px;">
    <label for="hp">Leave empty</label>
    <input type="text" id="hp" name="hp" tabindex="-1" autocomplete="off">
  </div>

  <button type="submit">Send magic link</button>
</form>
<p>Or <a href="/login-password">sign in with a password</a>.</p>
Incorrect example – visual CAPTCHA without alternative
<form action="/login" method="post">
  <label for="pass">Password</label>
  <input type="password" id="pass" name="pass">

  <img src="/captcha.jpg" alt="CAPTCHA: type the letters you see">
  <label for="captcha">Enter the text shown above</label>
  <input type="text" id="captcha" name="captcha" required>

  <button type="submit">Log in</button>
</form>
<!-- No audio CAPTCHA, no magic link, no biometric fallback -->

Use autocomplete attributes for credential fields

Correct autocomplete tokens allow password managers and browsers to fill forms automatically, removing the cognitive load of memorising credentials.

Correct example – sign-up form
<form action="/register" method="post">
  <label for="username">Username</label>
  <input type="text" id="username" name="username"
         autocomplete="username">

  <label for="new-pass">New password</label>
  <input type="password" id="new-pass" name="new-pass"
         autocomplete="new-password">

  <button type="submit">Create account</button>
</form>
Incorrect example – no autocomplete support
<form action="/register" method="post">
  <label for="u">User</label>
  <input type="text" id="u" name="u">

  <label for="p">Pass</label>
  <input type="password" id="p" name="p" >

  <button type="submit">Sign up</button>
</form>
<!-- Missing autocomplete attributes and non-semantic ids -->

Offer biometric or passkey authentication

WebAuthn and passkeys let users authenticate with a fingerprint, face scan, or device PIN – no memory required.

Correct example – WebAuthn button alongside password form
<form action="/login" method="post">
  <label for="email">Email</label>
  <input type="email" id="email" name="email" autocomplete="email">

  <label for="pass">Password</label>
  <input type="password" id="pass" name="pass"
         autocomplete="current-password">

  <button type="submit">Sign in with password</button>
</form>
<button id="webauthn-btn" type="button">
  Sign in with fingerprint or face (WebAuthn)
</button>
Incorrect example – password-only flow
<form action="/login" method="post">
  <label>Password
    <input type="password" name="password">
  </label>
  <button type="submit">Log in</button>
</form>
<!-- No WebAuthn, no magic link, no SSO, no paste support -->

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.

Correct example – timeout warning with extension
const SESSION_WARNING_MS = 120_000; // 2 minutes

globalThis.setTimeout(() => {
  // Show a non-modal warning
  const banner = document.getElementById('timeout-banner');
  if (banner) {
    banner.hidden = false;
    banner.textContent =
      'Your session will expire in 60 seconds. ' +
      'Click anywhere on the page to stay signed in.';
  }
}, SESSION_WARNING_MS);
Incorrect example – silent timeout
// User is logged out with no warning after 30 seconds
globalThis.setTimeout(() => {
  globalThis.location.href = '/login?timeout=1';
}, 30_000);

Note 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-related elements for review but cannot automatically determine whether an alternative authentication method exists. 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) served in cross-origin iframes cannot be inspected or selected by this rule and require independent verification.
  • JavaScript-heavy CAPTCHAs – Some CAPTCHA providers dynamically render puzzles via JavaScript after a delay or after user interaction. The initial DOM snapshot may not contain the form[action*="login"] or [type="password"] elements if they are created asynchronously.
  • Confusable with enhanced variant – SC 3.3.9 (Enhanced) requires non-cognitive alternatives even for object recognition and personal content; this rule (SC 3.3.8) permits cognitive tasks if an alternative exists. Auditors must distinguish which level applies.

Resources

Rule

  • Audit: accessibility
  • Standard: WCAG
  • Level: AA
  • Success Criteria: 3.3.8
  • Rule ID: accessible-authentication