Build accessible web forms and error messages
8 steps · about 3 h 20 min · Intermediate
- Start with native form structure (guide, MDN Web Docs, 30 min)
Build the controls and submission flow with semantic HTML.
- Give every control a label (guide, MDN Web Docs, 20 min)
Create a programmatic name and a larger click target.
- Group related questions (guide, MDN Web Docs, 20 min)
Use fieldset and legend for understandable groups.
- Validate without blocking understanding (guide, MDN Web Docs, 35 min)
Combine browser validation with clear recovery instructions.
- Connect hints and errors (guide, MDN Web Docs, 20 min)
Associate supporting text with the correct input.
- Announce urgent validation errors (guide, MDN Web Docs, 20 min)
Use alert semantics only when immediate attention is required.
- Preserve keyboard operation (guide, MDN Web Docs, 30 min)
Keep focus order and interaction predictable.
- Check the keyboard requirement (guide, MDN Web Docs, 25 min)
Test every form action without a pointing device.