Hotkey does not update radio button focus
- Vorherrschende Sprache
- JavaScript
- Sterne
- 3.3k
- Forks
- 99
- Ø Merge
- 14 Std. 22 Min.
- Gemergte PRs (30 T.)
- 6
Beschreibung
I have a simple Likert scale displayed using radio buttons, with autofocus on the middle button:

If I use the arrow keys to select a different radio button, the focus moves with the selection:

However, if I use a hotkey, the selection changes but the focus remains on the original button:

Is this the desired behaviour? The [radio button test](https://github.com/github/hotkey/blob/cce9678ba673cf856dc967dce1c867edf6c6d4cd/test/test.js#L417) only mentions activating radio buttons, not focusing them, but I expected that a hotkey would behave the same as using the built-in keyboard navigation (tab, arrows).
OS: macOS Sonoma 14.5
Browsers: Safari 17.5 and Brave 1.67.123 (Chromium 126.0.6478.126)
Beitragsleitfaden
Rechercherichtung
Beginne mit dem Radio-Button-Test in test/test.js ungefähr in Zeile 417 und reproduziere das berichtete Verhalten in Safari oder Chromium mit Radio-Buttons und einem Hotkey. Vergleiche die Aktivierung per Hotkey mit der nativen Navigation per Pfeiltasten; abgeschlossen ist die Aufgabe, wenn das erwartete Fokusverhalten entschieden und durch die relevanten Tests abgedeckt ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100