Skip to main content
Version: v6

A form field or input field without an aria invalid state was detected

A form field or input field without an aria invalid state was detected — rule summary
FieldValue
Rule codeManual_FormField_State_Missing
WCAG conformance levelA
WCAG success criterion4.1.2 Name, Role, Value
Must be fixed at sourceNo

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.