When tabster moves focus programatically to a radio group, it should move focus to the selected item.
In this case, a radio group is defined as a collection of <input type="radio"> that have the same name attribute. It's not necessarily inside a <div role="radiogroup">, or inside a <RadioGroup> component.
Observed Behavior
Tabster moves focus to the first radio item, even if another one is selected.
Expected Behavior
When tabster moves focus programatically to a radio group, it should move focus to the selected item.
In this case, a radio group is defined as a collection of
<input type="radio">
that have the samename
attribute. It's not necessarily inside a<div role="radiogroup">
, or inside a<RadioGroup>
component.Observed Behavior
Tabster moves focus to the first radio item, even if another one is selected.
Repro
https://codesandbox.io/s/86p2ck?file=/example.tsx
Tip: use the keyboard to open the dialog so the focus outline is visible.
Related
This is similar to #144, but this issue is not specifically related to
useFocusableGroup
.Fixing this issue in tabster will fix part 2 of https://github.com/microsoft/fluentui/issues/28438 affecting FluentUI's
RadioGroup
.