github / github/hotkey

Hotkey does not update radio button focus

Aperta
#128 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
3.3k
Fork
99
Merge medio
14h 22m
PR unite (30g)
6

Descrizione

I have a simple Likert scale displayed using radio buttons, with autofocus on the middle button:

![Screenshot 2024-07-01 at 3 34 05 PM](https://github.com/github/hotkey/assets/19525237/a30813ba-7c99-430d-8d3b-41975b7c525d)

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

![Screenshot 2024-07-01 at 3 34 12 PM](https://github.com/github/hotkey/assets/19525237/0aa3fb55-26fd-401c-a69a-c6be415a72fb)

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

![Screenshot 2024-07-01 at 3 34 24 PM](https://github.com/github/hotkey/assets/19525237/c26aaa64-03eb-440e-97cb-7d966426b97b)

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)

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia con il test dei pulsanti radio in test/test.js intorno alla riga 417 e riproduci il comportamento segnalato in Safari o Chromium usando pulsanti radio e un hotkey. Confronta l’attivazione tramite hotkey con la navigazione nativa tramite i tasti freccia; il lavoro è completato quando il comportamento di focus previsto è deciso e rappresentato dalla copertura dei test pertinente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript
Ambito
frontend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.