eui icon indicating copy to clipboard operation
eui copied to clipboard

[EuiDatePicker][COGNITION]: Consider moving the `aria-invalid` attribute from a label to input for screen reader usability

Open 1Copenut opened this issue 3 years ago • 0 comments

Description

Our EuiDatePicker component ( https://eui.elastic.co/#/forms/date-picker ) adds an aria-invalid="true" to a form row label when errors are present. I'd like to move this attribute to the input on the screen instead of the label. This way screen readers will read out the label name, announce the type of input, and then say "Invalid" or something similar.

Screenshot and guidance below.

Guidance

  • https://www.w3.org/WAI/WCAG21/Understanding/error-identification.html

Screen Shot 2022-05-23 at 4 52 11 PM

1Copenut avatar May 23 '22 21:05 1Copenut