An accessible form lets people identify fields, enter information, correct mistakes, and complete submission using their preferred input method or assistive technology. It uses clear labels, predictable controls, and feedback users can find and understand.
What makes a form accessible?
- Give every control a clear name. Use a visible label and associate it with the field, for example with an HTML
labelwhoseformatches the input’sid. Use afieldsetandlegendfor related controls when the group needs a shared label. - Give instructions before people need them. Identify required fields in text and expose the required state programmatically. Put format guidance beside the field and associate it with that field. A placeholder can show an example. Keep the label visible when the user types.
- Make errors easy to find and fix. Identify the field and describe the error in text. Give a useful correction when you know it. Associate inline errors with their fields, for example with
aria-describedby. On a longer form, an error summary with links to invalid fields can help users recover. - Make the result perceivable. If a success message appears on the same page without moving focus, expose it as a status message so assistive technology can announce it. If submission opens a confirmation page, give that page a clear heading and title.
Example: An email error in a quote request
A traveler enters alex@ and submits the form. The form keeps the traveler’s other entries and identifies the problem beside the Email address field: “Enter an email address in the format name@example.com.” A keyboard user can reach the field, and a screen reader can access the associated error.
If a later step in the same process needs the email again, prefill it or let the traveler select the email they already provided. WCAG 2.2’s Redundant Entry criterion (3.3.7, Level A) covers information users previously entered or received in the same process. It includes exceptions for essential re-entry, security, and information that is no longer valid.
How do you test an accessible form?
Complete a successful submission and an error-and-recovery scenario with a keyboard and a screen reader. Check that labels are announced, errors can be located, user input is available after validation, and the final outcome is clear. Use the whole flow, including any external payment or verification step that is in scope.