Page MenuHomePhabricator

Consider changing handling of space key for menu components
Open, Needs TriagePublic

Description

The Codex Menu component handles space keydowns in the following manner:

  1. If the menu is expanded and a menu item is highlighted, select the menu item and close the menu.
  2. If the menu is not expanded, open it.

The first behavior is likely necessary as much as we can support it, while the second is non-standard and possibly not needed.

We decided to remove all special handling of the space key for menu components with a text input, because the logic that attempts to determine if the user is trying to type a space character vs. something else is complex and has already caused bugs (see T324397 for a recent example). This task covers evaluating this behavior for other menu components, in order to provide a consistent experience across all menu components.


Acceptance criteria

  • Gather feedback about the keyboard navigation support needed for menu components
  • Based on that, decide what updates are needed and open tasks for them

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@AnneT - can you please put an initial/proposed priority level on this task and move it to the Backlog column?
DST prioritization guidance

@AnneT I was testing on the latest Codex docs and I actually don't see the behavior described in the task description. Is this a stale task that can be closed?

Oh, I interpreted the task description as current state. Should I be reading it as acceptance criteria?

@CCiufo-WMF I think this still stands - basically, the space key does different things in different components with menus. We should evaluate which behaviors are necessary to support, and how consistent across components those behaviors must be.

@CCiufo-WMF I think this still stands - basically, the space key does different things in different components with menus. We should evaluate which behaviors are necessary to support, and how consistent across components those behaviors must be.

Right! but the task description says:

The Codex Menu component handles space keydowns in the following manner:

  1. If the menu is expanded and a menu item is highlighted, select the menu item and close the menu.
  2. If the menu is not expanded, open it.

which is not currently the case as far as I'm aware?

APG Select does feature 2. expand menu when not expanded.
Should this be merged with T347662: Select: Space opens dropdown, but also scrolls the page?