qodesmith / datepicker

Get a date with JavaScript! A datepicker with no dependencies.
344 stars 101 forks source link

WCAG 2.0 Accessibility coverage. #55

Closed aharris closed 5 years ago

aharris commented 5 years ago

The following issues presented themselves when running this through an accessibility tool:

image

Is it possible to get aria-labels applied to these elements?

cebindani commented 5 years ago

@aharris A person with disability it's not capable to using a datepicker. Most recommended in this case is to able manual input in datepicker field. In my project, we put aria-hidden in both datepicker container and input.qs-overlay-year to avoid accessibility issues.

qodesmith commented 5 years ago

This library doesn't create the <input /> element, so it's up to you to add the attributes. You're free to apply whatever attributes you want.

aharris commented 5 years ago

@qodesmith. If you look at the screenshot above that element is coming from your library not the parent element. After closer review of this library I also discovered it is not keyboard accessible which makes any other accessibility fairly null and void. This seems like a nice library but without accessibility for all users I had to go a different route.

qodesmith commented 5 years ago

Ooooo, I see. You're not talking about the input that the calendar attaches to, rather, the input for the year. Sorry about that. It would be pretty easy to expose an option that lets you put whatever attributes you want on the year overlay input.