Skip to secondary navigation Skip to main content

Accessibility Bytes No. 23: Write Clear Instructions and Error Messages

Did you know that accessible forms should help people avoid mistakes and understand how to fix them?

Forms are everywhere. We use them to register for events, request services, search for information, submit applications, and complete everyday tasks.

When a form requires information in a particular format or a user makes a mistake, clear instructions and error messages can help prevent incorrect information from being entered, reduce frustration, and help users successfully complete the form.

Person using a laptop with overlaid code and warning icons.
Figure 1. Code snippets and warning icons illustrate potential coding errors and system alerts.

Provide Instructions Before They’re Needed

If a form field has special requirements, use form labels or instructions to tell users what they need to know before they enter the information.

For example, if a date must be entered in a particular format, don’t make users guess.

  • Instead of:
    Date of birth

    Provide helpful instructions:
    Date of birth (MM/DD/YYYY)

Instructions are especially important when information must follow a particular format, meet specific requirements, or be entered in an unexpected way.

Don’t wait until someone makes a mistake to explain what you wanted them to do.

Make Error Messages Helpful

We all make mistakes when completing forms. A good error message should help users understand what went wrong and how to fix it.

  • Avoid vague messages at the top of the form such as:
    Error
    Invalid entry
    There was a problem with your submission.

    Instead, identify the problem and explain how to correct it:
    Enter the date using MM/DD/YYYY, for example, 08/10/2026.
    Enter an email address in the format name@example.gov.
    Select at least one contact method before continuing.

The goal isn’t simply to tell users that something went wrong. Give them the information they need to fix it.

Make Errors Easy to Find

When a form contains an error, users should be able to determine where the error occurred.

Clearly indicate the field or fields that need attention. If several errors occur, consider providing a summary that helps users find each problem.

Don’t rely only on color to identify errors.

For example, changing a field’s border to red may not be enough. Include text that identifies the problem so users don’t have to recognize the use of color or color contrast to know something went wrong (Figure 2).

Form labeled “Not effective” with the explanation “Relies on color alone.” The Email address field contains “jane.smith@” and the Phone number field contains “123.” Both fields have red borders, but no error messages explain what needs to be corrected.
Figure 2. Color alone does not clearly identify errors or explain how to correct them.
Form labeled “Effective” with the explanation “Uses text and formatting to clearly identify errors.” The First name field displays “Enter your first name.” The Email address field contains “jane.smith@” and displays “Enter a valid email address,” with the example “jane.smith@example.com.” The Phone number field contains “123” and displays “Enter a 10-digit phone number,” with the example “202-555-0123.” Error icons and red borders identify the fields needing attention.
Figure 3. Use text messages and visual cues to identify errors and explain how to correct them.

Use Plain Language

Error messages and instructions should be written for the people completing the form — not for the system processing it.

Avoid technical language, error codes, or internal terminology that users may not understand.

  • Instead of:
    Validation error: Required parameter missing.

    Try:
    Enter your last name before continuing.

Clear instructions and error messages benefit everyone, including people with cognitive disabilities, people using assistive technology, and people who are unfamiliar with the information being requested.

Try It Yourself

The next time you create or review a form, look at its instructions and intentionally make a few mistakes.

Ask yourself:

  • Are important instructions provided before I need them?
  • Does the error message tell me what went wrong?
  • Does the error message tell me how to fix the problem?
  • Can I easily find the field that contains the error?
  • Does the form communicate errors without relying only on color?
  • Are the instructions and error messages written in plain language?

If you answer no to any of these questions, you may have identified an accessibility issue.

Key Takeaways

Help users get it right the first time by providing clear instructions before they’re needed.

When mistakes happen, don’t just tell users that something went wrong. Tell them what happened, where it happened, and how to fix it.

Good instructions prevent errors. Good error messages help people recover from them.

For more information on creating accessible web-based forms, visit WebAIM: Usable and Accessible Form Validation and Error Recovery.

*Disclaimer: Reference in this site to any specific commercial product, process, or service, or the use of any trade, firm or corporation name is for the information and convenience of the public, and does not constitute endorsement, recommendation, or favoring by GSA. GSA does not guarantee that outside websites or products comply with Section 508 (accessibility requirements) of the Rehabilitation Act.
Reviewed/Updated: October 2026

Section508.gov

An official website of the General Services Administration

Looking for U.S. government information and services?
Visit USA.gov