angular / angular/components

Focus trap focuses the wrong radio button if native radio button group is the first element in modal

オープン
#22,878 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
area: cdk/a11y P4
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

If the first focus-able element in a modal is a group of (native element, **not** Material) radio buttons, and one tabs off the end of the modal (triggering the focus trap and returning the focus to the top of the modal), the first radio button is always focused, even if the selected radio button is one of the later ones.

The expected behavior—found when tabbing to a group of radio buttons in other cases—is for focus to go to the selected radio button.

For now, our workaround is just to ensure there is always some other focus-able element at the top of the modal. A close button works well for this.

I could not find any issues relating to this.

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

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

調査の方向性

最初にフォーカス可能なコンテンツがネイティブのラジオボタングループであるモーダルで問題を再現し、次に Tab キーでモーダルの外へ移動してフォーカストラップを発動させます。モーダルのフォーカストラップの挙動とラジオグループのフォーカス処理を追跡します。選択されているラジオボタンではなく最初のボタンに戻るのではなく、フォーカスが選択されているラジオボタンに戻れば完了です。

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

評価

技術スタック
angular, typescript
領域
accessibility, frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

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

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