RFC: Accessible Native Dropdowns
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.
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!
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...
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 💪