learn.web Back to the curriculum ↗

WCAG 2.2 / Inclusive Design / 05

Forms, errors, and authentication

Make instructions, validation, recovery, target sizes, and sign-in flows understandable.

Time
75 min
Mode
Learn → Make → Check
Path
Accessibility

By the end, you can…

A form is a conversation about recovery

Labels explain what to provide; instructions explain format or constraints before failure; errors identify what went wrong and how to fix it. Placeholder text is not a replacement for a persistent label.

Validate at a helpful moment. Premature errors punish unfinished input; validation only after submission may create a long recovery loop. Preserve valid values and move focus or provide a summary when submission fails.

Authentication should work with tools people rely on

Allow paste, password managers, and autocomplete. Avoid cognitive-function tests unless an accessible alternative exists. Use the correct autocomplete tokens so browsers can assist.

Touch targets need enough size and spacing. Required state, errors, and success must be available to screen readers without unexpected focus theft.

Working example
<input id="password" type="password"
  autocomplete="current-password"
  aria-describedby="password-help">
<p id="password-help">At least 12 characters.</p>

Your studio task

Make — Build a form that survives a mistake and supports password managers and paste.

  1. Complete the form with intentional mistakes.
  2. Rewrite instructions and errors as specific recovery steps.
  3. Add labels, autocomplete, error relationships, and a summary.
  4. Test paste, password manager behavior, zoom, keyboard, and touch targets.
Definition of done

Errors identify the field, explain recovery, preserve valid work, and never demand memory puzzles.

Open the interactive lesson with its workspace ↗

Knowledge check

Why should a sign-in form allow password paste?
  1. It makes the page faster to animate
  2. It supports password managers and reduces memory burden
  3. It prevents browser autofill
Reveal answer (B)

Paste and password managers support stronger credentials and accessible authentication.

The autocomplete attribute helps because…
  1. It lets password managers and assistive tools fill fields correctly
  2. It makes forms prettier
  3. It disables paste
Reveal answer (A)

Correct autocomplete tokens support password managers, paste, and assistive technology.