fortana-co / react-dropzone-uploader

React file dropzone and uploader
https://react-dropzone-uploader.js.org/
MIT License
447 stars 183 forks source link

Keyboard-only accessibility #10

Open zdubash opened 5 years ago

zdubash commented 5 years ago

Hi Kyle, noticed that Dropzone is not easily usable to those that browse the web without a mouse. In your examples, I am unable to tab into the drop zone in order to open the upload window.

Would it be possible to add this functionality?

kylebebak commented 5 years ago

Will look into this. It may be difficult.

The issue is that the input has a style of display: none, and this means it can't be given a tabIndex attribute. The input label is what's actually displayed. I can't remember exactly why this is the case.

Related discussion for react-dropzone, where this was apparently solved a few months ago.

RDU supports component injection -- it would be fairly easy to override InputComponent with one that doesn't have display: none, but I agree it would be better to make the default input keyboard-accessible.

The way forward is probably to see how react-dropzone handles this.