Accessible Form Error Message Builder (aria-describedby and Error Summary)
Generates accessible form error markup, an error summary and a focus script.
Use the tool
Why this tool exists
Errors must be found, announced and explained, not just coloured red.
The markup ties each message to its field with aria-describedby, sets aria-invalid, adds a hidden "Error:" prefix, an error summary with links, and CSS that does not rely on colour alone. Remember to remove the error state once the user fixes the value.
How to use it
- Enter id, label and message per line.
- Choose summary and script.
- Copy the markup and CSS.
- Test with a screen reader.
Frequently asked questions
role=alert on the summary?
It makes the failure announced; move focus to it as well.
Why not title for errors?
Title is not reliably exposed and not for touch users.
Which criteria?
3.3.1, 3.3.3 and 4.1.3.
Is anything uploaded?
No.