negomi / react-burger-menu

:hamburger: An off-canvas sidebar component with a collection of effects and styles using CSS transitions and SVG path animations
http://negomi.github.io/react-burger-menu/
MIT License
5.04k stars 582 forks source link

Burger Menu Items - tabIndex - 1 #413

Closed Lulololu closed 3 years ago

Lulololu commented 3 years ago

Hello,

I've realized that, whether the side menu is OPEN or NOT OPEN, the tabIndex of the Menu Items still stay the same : -1.

Is there a way to change it to 0 when the menu is open, for accessibility purpose ?

Thanks a lot.

negomi commented 3 years ago

Hey @Lulololu,

The menu handles keyboard navigation internally with JavaScript, so it's still accessible without needing tabindex="0".

It does only use the up/down arrow keys for navigating through the items though, and I can see why it might be useful to tab through them as well.

I'll try to add this soon if I get some time 🙂

Lulololu commented 3 years ago

Thank you, Negomi :-)

negomi commented 3 years ago

Fixed in 3.0.1