A form field or input field without an aria invalid state was detected
| Field | Value |
|---|---|
| Rule code | Manual_FormField_State_Missing |
| WCAG conformance level | A |
| WCAG success criterion | 4.1.2 Name, Role, Value |
| Must be fixed at source | No |
Description
Elements that act as form fields or input fields should receive an aria-invalid attribute that reflects their valid state. When the form field or input field is submitted, it should notify users if any errors were found. By providing the aria-invalid attribute and setting it to true when errors occur on that specific input field, the user and Screen Readers are able to pinpoint errors in a form more accurately.
How to fix
Ensure that form fields and input fields have an accurate depiction of their valid state through the use of aria-invalid. When the form fields load, an attribute of aria-invalid=false can be set. When the form is submitted, if errors are found on the form, the erroneous form fields and input fields should have aria-invalid set to true.