You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two separate but related improvements can be made to the overlay menu (the one that opens when activating the Contents button on a narrow viewport).
Close menu on Escape press. It is expected (and it's an accessibility requirement) that popups can be dismissed by keyboard, and there's currently no way to do this.
Contain focus within the menu. If you keep tabbing through the menu, focus eventually goes to the main content, and users generally don't expect invisible or obscured content to be focusable. There are open-source libraries that can take care of this (for example, focus-trap and focus-lock), however for a simple UI such as this one, implementing the focus locking functionality should take no more than a few lines of code.
Why is this important?
It's probably assumed that a narrow viewport equals to a no-keyboard device, but that is not always true:
it may be a narrow browser window on a regular desktop / laptop;
it may be a wide desktop browser with a high zoom factor which effectively narrows the viewport in terms of CSS pixels;
it may be a narrow-screen mobile device with a keyboard attached.
The text was updated successfully, but these errors were encountered:
Two separate but related improvements can be made to the overlay menu (the one that opens when activating the Contents button on a narrow viewport).
Why is this important?
It's probably assumed that a narrow viewport equals to a no-keyboard device, but that is not always true:
The text was updated successfully, but these errors were encountered: