pattern-lab / styleguidekit-assets-default

The static assets for the default StyleguideKit for Pattern Lab. Contains styles and mark-up for Pattern Lab's front-end.
http://patternlab.io/
MIT License
35 stars 67 forks source link

Fix tabindex for PL header dropdown #107

Open bradfrost opened 6 years ago

bradfrost commented 6 years ago

Right now, the tabindex for all pattern navigation is weird and incomplete. Users have to tab through all of the links in a dropdown menu, even if the dropdown is hidden.

We need to create a more accessible dropdown, a la this Codepen.

The user should be able to focus on "atoms" (or whatever the topmost category is) and use the left and right keys to traverse between top-level categories. When the top-level category is focused, the dropdown for that category becomes exposed. Using the up/down and/or tab keys should allow users to traverse between categories within each top-level category.

Also, we'll want to put in place all proper aria- attributes for the menu.