Write out an error message in text

Example of using a red border, an error icon and text as indicators of a form field that is not filled out.”

Always write out the error message in text. Don’t just add a border around the field or add an icon, but always write out the message in clear, plain language.

You can certainly use color and icons as decoration, and they will be helpful to many users, but they should not be the only indication of an error.

Make the message clear for all users

By adding text you make sure all visitors understand the error message. Color blind or visually impaired users may miss borders. Your choice of color may not be understood as a warning in every culture, and not all people understand what icons mean.

Connecting the error message text to an input field works the same as connecting description texts: Connect the description to the form field.

Describing form errors in text is required to meet the WCAG success criteria:

Resources