Closed CalEPA-Jansson closed 8 months ago
Locally, we fixed the issue by removing the above lines and adding a "blur" event to the last navigation link that forces the user's focus back to the nav button.
// Open
var navLinks = getAllNavLinks();
navLinks[navLinks.length-1]?.addEventListener('blur', function () {
navButton.focus();
});
// Close
var navLinks = getAllNavLinks();
navLinks[navLinks.length - 1]?.removeEventListener('blur', null);
We also considered adding an element with a "lastOverlayFocus" class to the template and adding a "blur" listener to it to allow for the ability to focus beyond the nav elements, if needed.
@CalEPA-Jansson, we just released v6.3.1 which updates the way the menu deals with tabIndex and should resolve this issue. Please try again.
...and thank you for reporting this!
Reproduce the bug:
The following lines remove the ability to tab to the navButton after closing the menu (mobile). Additionally, it requires any sites utilizing a custom tab order to reapply the tabindex values after the menu is closed.