Closed lkopacz closed 5 years ago
Hi @lkopacz,
Thanks for this! I ended up simplifying your approach a bit and not re-focusing the burger icon on every close of the menu (because the user can just press tab again to re-focus it if they want), but this was a super helpful start.
Fantastic! I'm so glad :)
What I've done here:
opacity: 0
span within the button, so that way when we focus the on the button itself the outline doesn't disappear and fixed the styling along with that.tabIndex
of the hidden menu links to -1 oncomponentDidMount
. Then on thetoggleMenu
method, I toggled the tabIndex so it's reachable by the keyboard.Currently, # 2 is creating issues with the testing. I'm a bit newer to this testing framework, so feedback on how to fix that would be helpful. I've fixed the styling/descriptive text tests as best as I can.