github / hotkey

Trigger an action on an element with a keyboard shortcut.
https://github.github.com/hotkey/
MIT License
3.22k stars 97 forks source link

Hotkey does not update radio button focus #128

Open matt17r opened 4 months ago

matt17r commented 4 months ago

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

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

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

Is this the desired behaviour? The radio button test 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)