frend / frend.co

Frend — A collection of accessible, modern front-end components.
http://frend.co
MIT License
635 stars 25 forks source link

Remove ability to use down and up arrow keys for tabs #106

Open cmegown opened 7 years ago

cmegown commented 7 years ago

According to the relevant authoring practices documentation:

If the tab list is horizontal, it does not listen for Down Arrow or Up Arrow so those keys can provide their normal browser scrolling functions even when focus is inside the tab list.

At first glance it made perfect sense to map those keys to allow tab navigation, but after reading the bit above it seems that interfering with default browser behavior is unwise.

Instead, the they should be conditionally applied if the tablist is vertically oriented. This component does not appear to provide support for vertical orientation right now, so perhaps simply removing the ability to use them is the best immediate course of action?

adamduncan commented 7 years ago

Hey @cmegown, thanks for pointing that out. The work done on the authoring practices recently has been great!

The horizontal/vertical orientation is essentially down to a users' styling. We do make a recommendation that they render inline, but changing this to block and aligning them alongside the tabpanels is doable.

Will put some thought into how to best offer both options. Cheers

adamduncan commented 7 years ago

Do you think having up/down arrow keys disabled by default, with an enableVerticalKeys boolean option would be the way? There's a v2 branch that a feature like that could make its way into.

thomasdigby commented 7 years ago

I like that option. 👍

adamduncan commented 7 years ago

Reminder: Good notes here http://w3c.github.io/aria-practices/#h-note20