When a form rejects an entry, aria-invalid communicates the field’s error state to assistive technologies. Set aria-invalid="true" on each invalid field, and provide a visible message explaining the problem and how to fix it. Do not rely on color alone to identify errors. section 6.1.10 section 6.1.6
Associate the field with its error message using aria-describedby. When the user corrects an error, update aria-invalid and the associated message. For multiple errors, provide a summary linking to the affected fields and move focus to the summary or first invalid field. section 6.1.6 section 6.1.10
<label for="email">Owner’s Email</label> <p id="email-error">Error: Enter the email address in the format name@example.com.</p> #A <input id="email" name="email" type="email" aria-invalid="true" #B aria-describedby="email-error"> #C
An email field marked invalid and associated with a specific format-error message. section 6.1.6
