ui-components icon indicating copy to clipboard operation
ui-components copied to clipboard

RFC: Accessible Native Dropdowns

Open foot opened this issue 7 years ago • 3 comments

Playing w/ the dropdown in WC the other day I thought it would be nice to jump down to the selection I wanted by hitting a letter on my Keyboard. Moving to native dropdowns would give it to us for free.

There would be other benefits like other keyboard shortcuts and native "barrel selector" on mobile.

  • We could retain the styling of the base element.
  • Once clicked we lose the nice styling. Here is a nice example: https://catalin.red/dist/uploads/2013/06/custom-html-dropdown.html
  • It would fix some issues magically like the time travel dropdown going off the screen.

WDYT? @bowenli @bia @fbarl @guyfedwards

If we think its a bit ugly we could implement keyboard support in our own dropdown.

screenshot 2018-11-14 at 14 19 48 screenshot 2018-11-14 at 14 20 21

foot avatar Nov 14 '18 14:11 foot

If we think its a bit ugly we could implement keyboard support in our own dropdown.

It's not only ugly, it's mostly jarring to context switch to a native dropdown so abruptly. +1 for implementing our own keyboard support!

bia avatar Nov 14 '18 14:11 bia

I feel very sad thinking that in 2018 we have to make a choice between compatibility and styling :(

Have we ever considered this library https://github.com/JedWatson/react-select? Maybe @bowenli would know more about the history...

fbarl avatar Nov 14 '18 14:11 fbarl

Adding keyboard controls wouldn't be too hard, and serving the scroll wheel on mobile is an option but I think we might have bigger fish to fry when worrying about mobile experience 😄

react-select looks solid 💪

guyfedwards avatar Nov 14 '18 16:11 guyfedwards