Lesson 7 of 9
Form Accessibility Essentials
Forms are one of the most critical areas for accessibility - users need to understand what information to enter, receive error feedback, and navigate efficiently. Every input needs a label, errors need ARIA announcements, and the form must work with keyboard alone.
Accessible Form Checklist
- Every <input> needs a <label> - Either explicit (for/id) or implicit (wrapped). Placeholder is NOT a substitute.
- Error messages: Use aria-describedby to link error text to its input. Use aria-invalid='true' on the invalid field.
- Required fields: Use both required attribute AND visual indicator (*). Add aria-required='true' for older screen readers.
- Group related fields with <fieldset> + <legend> - Essential for radio buttons and checkbox groups.
- Error summary: Show all errors at top of form with links to each invalid field. Focus this summary on submit.
- aria-live='polite' on error container - Screen readers announce new errors without interrupting the user.
- Don't clear the form on error - Users lose all their input. Just highlight the invalid fields.
- Multi-step forms: Announce step progress (e.g., 'Step 2 of 4'). Don't lose data when navigating between steps.
Diagram
Loading diagramâŚ
Accessible forms boost completion rates and ensure assistive tech compatibility
Key Takeaways
- Forms are one of the most critical areas for accessibility - users need to understand what information to enter, receive error feedback, and navigate efficiently.
- Every <input> needs a <label> - Either explicit (for/id) or implicit (wrapped). Placeholder is NOT a substitute.
- Error messages: Use aria-describedby to link error text to its input. Use aria-invalid='true' on the invalid field.
- Required fields: Use both required attribute AND visual indicator (*). Add aria-required='true' for older screen readers.
Finished this lesson?
0 of 9 in Module 9