fluid-lab / gamepad-navigator

GSoC 2020 project
Other
7 stars 10 forks source link

Modal bodies should (optionally) support "arrow only" navigation. #138

Closed duhrer closed 7 months ago

duhrer commented 9 months ago

I've been bothered by the current behaviour of the modals (onscreen keyboard (#84), action launcher (#112), et cetera). Since the modal contents are tab navigable, you have to tab through every item to get to the modal controls. This is especially awkward with the onscreen keyboard, where there are dozens of keys between the initial focus and the "close" button.

Although this will require some upstream work in the fluid-osk project, it seems better to default to having the modal bodies use arrow navigation, and reserving the tabs for navigating between the modal body and the controls. This should be user configurable and controlled by a preference in the settings panel.

In addition to the onscreen keyboard and search keyboard (which depend on the upstream issue), we need to update:

  1. The action launcher
  2. The "select operator"

When the new behaviour is enabled:

  1. Only the focused element should be reachable using tab navigation.
  2. All other elements should have tabindex=1 or be otherwise unreachable.
  3. The "live" tabindex should follow focus.

As the controls will need to respond if the preference changes:

  1. When the preference is turned on, all non-focused elements should be made unreachable.
  2. When the preference is turned off, all non-focused elements should be made reachable.
duhrer commented 9 months ago

In addition to the modal body work, we should also add a preference aware component that displays different wording depending on the preference, such as:

  1. (When it's on) Use arrow keys (the d-pad) to move between keys. Use tabs to move between the keyboard and the modal controls.
  2. (When it's off) Use arrow keys (the d-pad) or tabs (the bumpers) to move between keys. Tab from the last key to reach the modal controls.

This may need to be written up as a separate effort, as it implies "binding aware" instructions, like telling the user which keys they should use regardless of how they have their setup configured.