How do I write accessible form error messages?
An accessible error message says, in text, which field has the problem and how to fix it, and it is connected to that field so screen readers announce it. "Enter your postcode, for example SW1A 1AA" next to the postcode field passes; a red border alone does not. WCAG 3.3.1 Error Identification (level A) asks that when an input error is detected automatically, the item in error is identified and the error is described to the user in text.1 WCAG 3.3.3 Error Suggestion (level AA) goes a step further: if you know how the visitor could correct it, tell them, unless that would put security at risk.2
Why error messages matter so much
Errors happen at the worst moments: at checkout, at sign-up, on the contact form. W3C points out that people may abandon a form after a failed submission because they cannot tell how to fix the error.2 For a store, that is a lost order. The people most affected include screen reader users who never hear that something went wrong, people with low vision who cannot see a red outline far down the page, and people with cognitive disabilities who are told there is an error but not what to do about it.2
What the two criteria ask
| Criterion | Level | Requires | Example |
|---|---|---|---|
| 3.3.1 Error Identification | A | Identify the field in error and describe the error in text | "Email address: this field is required" |
| 3.3.3 Error Suggestion | AA | Suggest a correction when one is known, unless it would compromise security or purpose | "Enter an email address in the format name@example.com" |
| 3.3.2 Labels or Instructions | A | Labels or instructions where input is needed, including data formats | "Date of birth (DD/MM/YYYY)" |
W3C defines an input error as information the visitor gave that is not accepted: required information left out, or information outside the required format or allowed values.1 3.3.1 does not prescribe how errors are displayed, but it is clear that colour or highlighting can only be added alongside a text description, and that re-showing the form without any hint that it failed is not enough.1
The exception in 3.3.3 covers suggestions that would jeopardise the security or purpose of the content.2 A login form is the obvious case: it should say the details were not recognised, not hint at the right password.
Writing messages people can act on
- Name the field. "Postcode is required", not "This field is required" in a list at the top.
- Say what is wrong and what to do. "Card expiry date must be in the future" is better than "Invalid date".
- Give an example of the right format where formats matter, such as phone numbers and dates. W3C's own 3.3.3 example offers the list of valid months, or asks "Do you mean 'December'?".2
- Avoid blame and jargon. "Error 422" or "Invalid input" helps no one.
- Prevent errors where you can. Tell people formats and requirements before they type, as 3.3.2 asks, and accept common variations, such as spaces in a card number.4
- Keep what they typed. Do not clear the form after an error.
Making screen readers announce errors
Errors shown after submitting
W3C's forms tutorial recommends a pattern that works well for checkout and long forms:3
- List the errors at the top of the form, under a distinctive heading such as "There are 2 problems with your details".
- Make each item a link that takes the visitor to the field.
- Move focus to the error list, or to the first field with an error.
- Put the error count in the page title too, such as "2 errors: Delivery address", because screen reader users hear the title as soon as the page loads.
In multi-step checkouts, W3C's multi-page forms tutorial suggests putting progress at the start of the title, such as "Step 2 of 4: Shipping Address", and notes the title can carry an error notice as well.7
Errors next to each field
Show the message beside the field and connect it in the code. The tutorial says fields can be associated with their error messages using aria-describedby, so a screen reader reads the message when the field gets focus.3 W3C also lists aria-invalid on the field in error as a technique for 3.3.1 (ARIA21).1 Mark required fields in the label, in text or with an asterisk explained at the top of the form; W3C's examples for 1.3.1 show required-field indicators that are programmatically associated with the field.5
Errors that appear as people type
If a message appears without a page load and without moving focus, it is a status message under WCAG 4.1.3 and needs to be announced.6 W3C's technique for errors is ARIA19: using role="alert" or a live region.6 Use it sparingly. The tutorial explains that an assertive live region interrupts whatever the screen reader is saying, while a polite one waits for a pause.3 Announcing "invalid email" after the first letter is typed is noise; checking when the visitor leaves the field is usually better for formats like dates.3
Browser validation
Adding required or type="email" to a field lets the browser show its own messages. W3C says this can meet 3.3.1, but warns that these messages may disappear, may not scroll with the page or enlarge with zoom, are often generic, and show only one error at a time.1 Test them on your site before relying on them.
Shopify and WordPress
On Shopify, test checkout and also the forms your theme and apps add: contact, newsletter, account sign-up, product options such as engraving text, and any custom forms from apps. On WordPress and WooCommerce, error messages come from WooCommerce, your theme and form plugins. In both, submit each form empty, then with deliberately wrong values, and check what you see and what a screen reader says.
How to test your error messages
- Submit each form with everything empty. Is every problem described in text, next to the right field?
- Enter wrong formats: a short phone number, a past expiry date, an email without "@". Do the messages tell you how to fix it?
- Repeat with a screen reader. After submitting, do you hear that there are errors? When you move to a field, do you hear its message?
- Zoom to 200%. Are the messages still visible and next to their fields?
- Run an automated check for missing labels and broken references. Jralo's free check tests your homepage and up to five linked pages against WCAG 2.2 A and AA, and helps you understand which countries' accessibility laws may be relevant, with a link to a guide for each (general information, not legal advice).
Automated tools find many problems, not all, and error handling is mostly invisible to them: a tool loads the page but rarely submits your forms with bad data. The manual steps above are where error messages get tested. For the keyboard and screen reader basics, see how to check your website in 15 minutes.
What else do people ask?
Is a red outline on the field enough?
No. W3C's guidance for 3.3.1 says the error must be indicated in text. Colour, icons and highlighting can be added, but only alongside a text description. Re-showing the form with no hint that submission failed is not enough either.
Should I validate as people type?
It depends on the field. W3C's forms tutorial says instant feedback can be very helpful but does not suit every situation. For formats like dates, checking when the visitor leaves the field avoids showing errors before they have finished typing. Always check again on submit.
Can I rely on the browser's built-in validation messages?
With care. W3C notes that native validation can meet 3.3.1, but its messages may disappear, may not enlarge with zoom, are often generic and show one error at a time. Many sites switch it off and show their own messages next to each field.
Check your site now
Jralo's free check tests your homepage and up to five pages for accessibility (WCAG 2.2 A and AA) and website QA problems, and tells you which countries' accessibility laws are likely relevant to you. No sign-up.
Run the free checkWhere do these facts come from?
Every number and legal statement in this post links to one of these sources, read on 13 October 2026.
- W3C WAI: Understanding Success Criterion 3.3.1 Error Identification
- W3C WAI: Understanding Success Criterion 3.3.3 Error Suggestion
- W3C WAI: Forms tutorial, User Notifications
- W3C WAI: Understanding Success Criterion 3.3.2 Labels or Instructions
- W3C WAI: Understanding Success Criterion 1.3.1 Info and Relationships
- W3C WAI: Understanding Success Criterion 4.1.3 Status Messages
- W3C WAI: Forms tutorial, Multi-page Forms
More questions
- EN 301 549 explained: the European accessibility standard and WCAG
- Jralo MCP real-time alerts: website monitoring for your agent
- Why are so many website accessibility lawsuits filed in New York?
- Shopify accessibility statement: free feedback wording
- California's Unruh Act and websites: what store owners should know
- PHP2Shell: is your website affected, and what to do
- Black Friday checkout accessibility: a one-week checklist
- Israel's website accessibility regulations explained
- WCAG 1.4.13 Content on Hover or Focus: a Shopify test
- India's RPwD Act 2016 and websites: what businesses need to know
- France: accessibility rules for online shops (EAA and RGAA)
- Germany's BFSG: what it means for online shops
- WCAG 1.4.12 Text Spacing: how to test a Shopify store
- Does Australia's Disability Discrimination Act apply to websites?
- AODA website requirements checklist for Ontario businesses
- Skip links on a Shopify theme: what WCAG 2.4.1 requires
- Does the UK Equality Act 2010 apply to my website?
- What makes a good page title for product, collection and checkout pages?
- Why do I need to set the page language for screen readers?
- How do I make log-in and CAPTCHA accessible under WCAG 3.3.8?
- How do I make animation and motion on my website accessible?
- How do I make data tables and size charts accessible?
- How do I make product search, filters and sorting accessible?
- PDFs on your website: when to use HTML instead, and how to make PDFs accessible
- Does my website still work when visitors zoom in? Resize and reflow explained
- How big do buttons and links need to be under WCAG 2.5.8?
- How do I make a cookie consent banner accessible?
- How do I make pop-ups and modal dialogs accessible?
- How do I write link text that makes sense out of context?
- Why does heading structure matter for screen reader users?
- Visible focus: why removing outlines hurts, and what WCAG 2.2 asks
- Accessible navigation and mega menus
- Accessible product image galleries, sliders and carousels
- How to make a Shopify cart drawer accessible
- Accessible Shopify variant pickers and colour swatches
- The European Accessibility Act: a step-by-step plan for small online sellers
- ADA Title III and websites in plain English
- What to put in an accessibility statement
- How to make a WooCommerce store accessible
- How to fix accessibility issues without breaking your theme
- How to make a Shopify theme accessible: settings, apps and what to check
- Captions, transcripts and audio description for product and marketing video
- What a screen reader user hears on your product page, and how to fix it
- Accessible forms and checkout: labels, errors and autocomplete
- How to test your website with only a keyboard in 10 minutes
- Colour contrast explained: what WCAG asks and how to fix brand colours
- Why automated accessibility testing finds some problems but not all
- How do I write alt text that actually helps?
- What did WCAG 2.2 add to WCAG 2.1?
- How can I prove my website is monitored for accessibility?
- Does the European Accessibility Act apply to my online store?
- Do accessibility widgets make a website ADA compliant?
- Got an ADA website demand letter? What to do first
- How do I check if my website is accessible? A 15-minute method
- Website accessibility laws by country (2026)