Alert Users to Errors that Prevent Form Validation

One of the simplest ways to enhance forms accessibility is to help users avoid errors before the errors even occur. We can prevent errors from happening by ensuring form instructions and labels are clear and informative, making sure users are aware of requirements for form fields, and clearly identifying required form fields.

Mistakes happen, though, even when clear instructions are provided. So, it is critical that users know when form errors have occurred. To help users easily identify and correct errors, consider the following:

  • Alert users to any and all errors that prevent form validation.
  • Shift focus to the error message so users do not have to search for the error.
  • Make sure error message is distinguishable from the form elements.
  • Provide correction cues within the error message to eliminate guesswork.
  • Check that messages are accessible. Note: Ways to make a screen reader announce information include loading a new page, moving the focus, or using an ARIA live region.
  • Ensure forms retain information that was entered correctly.
  • Allow users to review and correct information before submitting the form.
  • Make sure error messages appear the same way if the same form components are on multiple web pages.