error-suggestion
Rule Severity : Serious
Description
When an error occurs in a form, users must be provided with clear and accurate suggestions on how to resolve the issue. This ensures that users, including those with disabilities, can understand and correct errors efficiently.
The error-suggestion rule aligns with WCAG Success Criterion 3.3.3 (Error Suggestion), which requires that if an input error is detected and suggestions for correction are known, they are provided to the user.
Examples
In the following example, an error message is displayed when a user submits a form with an invalid email address. However, the error message does not provide any guidance on how to correct the mistake, which violates the error-suggestion
rule.
In the following corrected example, the error message includes a suggestion on how to correct the invalid email address, ensuring compliance with the error-suggestion
rule.
How to fix?
To fix violations of the error-suggestion
rule, follow these steps:
- Identify all error messages in your application.
- Ensure that each error message provides clear and actionable suggestions for resolving the error.
- Use plain language to describe the error and the steps needed to correct it.
- Test your error messages with users to ensure they are understandable and helpful.
- Ensure that each error message goes away when the error is corrected by the user.
Reference
WCAG Success Criterion 3.3.3: Error Suggestion
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!