somewebmedia / hc-offcanvas-nav

JavaScript library for creating toggled off-canvas multi-level navigations, allowing endless nesting of submenu elements, supporting swipe gestures, keyboard interactions and ARIA attributes.
https://somewebmedia.github.io/hc-offcanvas-nav/
MIT License
336 stars 82 forks source link

BACK menu item not accessible with TAB key #77

Closed 5ulo closed 2 years ago

5ulo commented 2 years ago

When I open hc-offcanvas-nav with the keyboard and I navigate with keyboard to the second level of navigation (panel 2), I am unable to focus on back item to go -1 level up. Sure I can hit ESC, but this item should be focusable though.

And now the strange part. The back nav item is focusable ONLY when option insertBack != true, false or 0. So for example insertBack: -1 is working. This bug is also here: https://somewebmedia.github.io/hc-offcanvas-nav/

somewebmedia commented 2 years ago

Fixed in the latest version.