microsoft / microsoft/tabster

`RadioGroup` tab behavior incorrect when using `useFocusableGroup`

Open
#144 2 comments 0 reactions 1 assignee View on GitHub

@ling1726 is already working on this.

Since Jun 2, 2022.

bug
Dominant language
TypeScript
Stars
165
Forks
42
Avg merge
1d 11h
Merged PRs (30d)
9

Description

Expected Behavior

When using Fluent UI v9 RadioGroup with react-tabster's useFocusableGroup RadioGroup native tabbing and keyboard behavior should be preserved.

Observed Behavior

When using useFocusableGroup with RadioGroup the native tabbing and keyboard behavior is overridden in unexpected ways.

In particular, with Tabster:

  1. Each option in RadioGroup is a tab stop (i.e., tab presses move between the options) when the RadioGroup should be a single tab stop.
    1. Options are only supposed to be navigable with the arrow keys when using the keyboard. Arrow keys still work with Tabster.
  2. When RadioGroup has a selected option tabbing or shift-tabbing to the RadioGroup from a different focusable element focuses the first or last option in the RadioGroup respectively. It should focus the selected option.

Example

Codesandbox Example

Related Issues

Fluent UI v8's ChoiceGroup had a similar issue with FocusTrapZone.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.