Confirmed Date field accessible name is overridden by the help text

Affected version
v2.2.4

36degrees

Member
Form controls that ask for dates (with data-xf-init="date-input") generally seem to be associated with their labels correctly, but the use of aria-label on the form controls (to provide the 'Use the arrow keys to pick a date' help text) overrides the label – the accessible name for these controls ends up as just 'Use the arrow keys to pick a date' and the context of what the field is for is lost.

It would be more appropriate to make this help text part of the accessible description (for example using aria-describedby)
 

Mike

XenForo developer
Staff member
So this is actually coming directly from Pikaday, which is the library we use for the date picker. You can see it on their demo: https://pikaday.com/

There does appear to be an open issue about some regressions in their accessibilty:


Though interestingly I haven't seen anything mentioned about this particular issue. I agree that using aria-label for this doesn't seem ideal, though it doesn't look like there's a way to prevent it (short of changes to the library directly). Given the potential other issues presented by the linked issue, that may really be a comparatively minor issue.
 

36degrees

Member
Given the potential other issues presented by the linked issue, that may really be a comparatively minor issue.
I broadly agree, but (thankfully!) users can still input a date into the text box directly, ignoring the date picker entirely. So, even if other accessibility issues prevent them being able to use the date picker they could still fill it in, except for the fact that the overwritten label means they may not know what the field is for.
 
Top