--- title: "Accessible form errors" category: accessibility status: required url: https://webspecification.com/spec/accessibility/form-errors/ updated: "2026-05-29T09:13:20.000Z" sources: - title: "WCAG 3.3.1 — Error Identification (Level A)" url: "https://www.w3.org/WAI/WCAG22/Understanding/error-identification.html" publisher: "W3C" - title: "WCAG 3.3.3 — Error Suggestion (Level AA)" url: "https://www.w3.org/WAI/WCAG22/Understanding/error-suggestion.html" publisher: "W3C" - title: "WCAG 1.4.1 — Use of Color (Level A)" url: "https://www.w3.org/WAI/WCAG22/Understanding/use-of-color.html" publisher: "W3C" - title: "MDN — ARIA live regions" url: "https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions" publisher: "MDN" source_repo: undefined licence: CC-BY-4.0 --- # Accessible form errors > When a form submission fails, errors must be identified in text, associated with the input that caused them, and announced to assistive technology. ## What it is An accessible form error tells the user three things, in text and in the accessibility tree: which field is wrong, what is wrong with it, and how to fix it. WCAG 3.3.1 (Level A) requires the field and the problem to be identified. 3.3.3 (Level AA) requires a fix to be suggested when known. 1.4.1 (Level A) forbids using colour as the only indicator. ## Why it matters A red border alone is invisible to a screen-reader user, to a user with colour vision deficiency, and to a user reading on a sunlit phone. An error summary above the form helps everyone, but only if each error is also wired to its input — otherwise a screen-reader user reading the field on its own hears nothing wrong. ## How to implement Associate each error message with its input using `aria-describedby` and mark the field invalid: ```html
Enter an email address in the format name@example.com.
``` For an error summary at the top of the form after submission, render it server-side or move focus to it with JavaScript: ```html