User Tools

Site Tools


accessibility:forms:errors

Error Messages and Validation

Validation errors should come with specific messages that tell the user exactly what to fix. "This field is required" is not a good message for an email input field; "Enter your email address" is more specific.

Provide a summary of the validation errors at the top of the form. Each error message should be connected to an input field using aria-describedby, and should include a link to skip directly to that field. Error messages should not appear below the inputs or submit button, as screen reader users will hear them late in the sequence, and autocomplete dropdowns often obscure the message.

Required <select> dropdowns must not include an empty value, or the browser will fail to report the validation error.

Further reading on error messages

accessibility/forms/errors.txt · Last modified: 2023/08/07 18:07 by scl

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.