WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.52k stars 4.21k forks source link

react-datepicker is not accessible #1311

Closed afercia closed 6 years ago

afercia commented 7 years ago

Looks like react-datepicker, currently used for the "publish" date, has several accessibility issues.

screen shot 2017-06-20 at 17 24 25

Just to mention a few:

I was also able to break it completely just editing the hour/mins fields using a keyboard:

screen shot 2017-06-15 at 14 51 02

I'd strongly recommend that every external component/library included in Gutenberg should be picked up taking into consideration also its accessibility support.

Not sure react-datepicker can be easily patched and made decently accessible. It would likely require a lot of work. Not sure if other, more accessible, react date-pickers exist. Not sure if using a date-picker is a good idea in the first place 🙁 Date pickers are always tricky.

One option could be considering a completely different UI, without a date-picker. Happy to evaluate other, more accessible, tools if any, but I'm afraid react-datepicker in its current state doesn't meet the quality standards we'd like to see in WordPress and it's a blocker for accessibility.

/cc @jasmussen and @joedolson (as he's an expert about calendars)

tofumatt commented 6 years ago

Oh, the new date-picker is much more accessible. I'm closing this as we aren't using react-datepicker. Closed by #7621, which I thought closed this in the text but just referenced it. 🤷‍♂️