Skip to main content
All For Web For All

forms

GUIDELINES 1.3.5, 3.3

Overview

Forms refers to the inputs, and how authors can help users to avoid and correct mistakes on said forms. Ensuring users can read and see content on the form and how to complete it.

Who is impacted

Users with visual, cognitive, or motor disabilities who may struggle with poorly labeled or complex forms.

How to test

Submit forms with empty or invalid data and verify error messages are clear, specific, and associated with the correct fields.

Resources

Visit W3C Understanding Input Assistance and WebAIM Creating Accessible Forms for detailed guidance.

Form Labels

Every form input should have a visible, descriptive label that is programmatically associated with the input using the for/id attribute pairing or by wrapping the input within the label element. Placeholder text is not a substitute for labels, as it disappears when users start typing and is often displayed with insufficient contrast.

Labels should clearly describe what information is expected. For example, use "Email address" rather than just "Email" and indicate required fields with both visual indicators and programmatic attributes (aria-required or required).

Error Handling

When form validation errors occur, identify the specific field with the error and provide a clear text description of the problem. Error messages should suggest how to fix the issue. For example, instead of "Invalid input," say "Please enter a valid email address (e.g., name@example.com)." Errors should be announced to screen readers using aria-live regions or by moving focus to the error summary.