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-describeby is used.

This test case uses a combination of aria-invalid + aria-errormessage, which references to multiple elements with the same ID. Please note that, when referenced correctly, a combination of aria-invalid + aria-describedby is also a proper method for referencing error messages.

Duplicate IDs referenced:

This input field has an aria-errormessage attribute with a value (aria-errormessage="email-error") that references to multiple elements with the same ID:



Note: Possible to automatically test. An automated test can programmatically verify that every ID referenced by aria-errormessage exists in the DOM and is unique, flagging any duplicate IDs.

axe detected: none  |  QualWeb detected: 4.1.1