cms icon indicating copy to clipboard operation
cms copied to clipboard

Date and time formatting labels

Open gcamacho079 opened this issue 3 years ago • 1 comments

Description

Adds visually-hidden formatting helper text to date and time fields.

Related issues

Resolves DEV-216, DEV-254

gcamacho079 avatar Feb 11 '22 21:02 gcamacho079

@gcamacho079 I’ve added dynamic human-friendly labels to those hidden spans, but only for desktop browsers at the moment. So long as mobile gets the native inputs, it seems like the formatting labels aren’t going to really be necessary?

(If we decide to switch to non-native date/time inputs for mobile, we can easily add the formatting labels at that point, but that should be done in a separate PR.)

brandonkelly avatar Aug 15 '22 18:08 brandonkelly

Whoops, didn’t mean to close.

brandonkelly avatar Aug 15 '22 18:08 brandonkelly

@brandonkelly just tested this and setting aria-labelledby on these inputs ended up causing some problems, as it's overriding the aria-label attribute. We should definitely move the formatting reference ID to the front of describedBy

gcamacho079 avatar Aug 16 '22 16:08 gcamacho079

@gcamacho079 Alright, made that change.

brandonkelly avatar Aug 16 '22 23:08 brandonkelly

Looks great, @brandonkelly!

gcamacho079 avatar Aug 17 '22 14:08 gcamacho079