github / github/hotkey

Hotkey does not update radio button focus

オープン
#128 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
3.3k
フォーク
99
平均マージ
14時間 22分
マージ済み PR(30日)
6

説明

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)

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

test/test.js の417行目付近にあるラジオボタンのテストから始め、ラジオボタンとホットキーを使って Safari または Chromium で報告された動作を再現します。ホットキーによるアクティベーションと、矢印キーによるネイティブなナビゲーションを比較します。期待されるフォーカス動作が決定され、関連するテストカバレッジで表現されていれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。