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.05k stars 586 forks source link

Tab key closes menu #422

Closed sacummings91 closed 3 years ago

sacummings91 commented 3 years ago

Version 2.9.0 introduced some code that now always closes the menu if you press the tab key. Here: https://github.com/negomi/react-burger-menu/blob/main/src/menuFactory.js#L287

If this is intentional, can we please at least get an opt out for this behavior since using tab is a very common way people navigate with keys. We have at least 3 projects that have broken because of this change.

PR where change was introduced: https://github.com/negomi/react-burger-menu/pull/409

negomi commented 3 years ago

Hi @sacummings91,

This was added intentionally to follow accessibility standards, but I agree the tab behavior specifically feels a bit jarring and unexpected. I'm happy to remove it.

I just pushed 2.9.1 which includes the fix.

Thanks for reporting!

sacummings91 commented 3 years ago

@negomi I totally understand. Appreciate the quick resolution!