Aria-errormessage link for input fields (aria-errormessage)

Input fields with invalid inputs and corresponding aria-invalid attributes are linked to their corresponding error messages using aria-errormessage, or a combination of aria-invalid and aria-describedby is used.

This test case misuses aria-errormessage on a non-widget element. Only form widgets (e.g., native <input>, <textarea>, <select>) or elements with appropriate ARIA widget roles should use aria-errormessage.


Aria-errormessage used on a non-widget element:

The following static container is not a form widget, yet it uses aria-invalid and aria-errormessage:

Please enter your details below.

Note: Possible to automatically test. An auto-test can verify that any element using aria-errormessage is a valid form widget (native input/textarea/select) or has an appropriate ARIA widget role.

axe detected: none  |  QualWeb detected: none