mozilla / protocol

A design system for Mozilla websites.
https://protocol.mozilla.org/
Mozilla Public License 2.0
259 stars 77 forks source link

`mzp-c-sidemenu` collapsed summary mouse affordance & keyboard controls #947

Open janbrasna opened 4 months ago

janbrasna commented 4 months ago

Description

When mzp-c-sidemenu is collapsed on narrow viewports, the mzp-c-sidemenu-summary section acts as a toggle to expand/collapse the local navigation. It doesn't however signal the affordance when hovered over, and doesn't respond to keyboard controls.

Steps to reproduce

Open https://protocol.mozilla.org/components/preview/sidebar-menu in a smaller viewport and try interacting with the collapsed sidemenu (either on top or bottom of the page, depending what page it is, e.g. https://www.mozilla.org/mission/ has it on top) both with mouse and with keyboard.

Expected result

Pointer on hover signaling the UI is interactive. Ideally keyboard being able to interact with the nav toggle.

Actual result

Pointer is passive for text selection, only upon clicking the element it's shown it could be interacted with. When "spacebar" is hit to open the element when focused with keyboard, a default scroll is triggered instead.

https://github.com/mozilla/protocol/assets/1784648/6a33ce3e-845a-4bbf-9e4e-20a4dba11309

Environment

macOS Catalina FXDX 128b8, Chromium 127r1313161