aria-errormessage
ID referencePoints to the element containing the error message for a field that has failed validation. It's only meaningful when the element is also marked aria-invalid='true'; otherwise assistive technologies ignore it. The referenced message should be visible and explain how to correct the problem.
Value
The id of another element in the same document.
Used on
Any HTML element —
aria-errormessage is a global property.Associated roles
Every ARIA role. As a global property,
aria-errormessage is supported on all roles.Example
aria-errormessage="…"
<input aria-invalid="true" aria-errormessage="err" />
<p id="err">Enter a valid email.</p>References