patternfly / patternfly/patternfly-react

Menu/Select/Dropdown - considering refactoring focus logic

オープン
#11,025 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

PF Team Stale
主要言語
TypeScript
スター
862
フォーク
392
平均マージ
4日 8時間
マージ済み PR(30日)
9

説明

Describe the enhancement or change
Following the update that added arrow key handling on menus, we should refactor the logic for when an item is autofocused upon opening via the shouldfocusFirstItemOnOpen prop. Currently it will focus only the first valid item in the menu, but we should tweak it so that:

  • If an item is selected (aria-selected, possibly also if an item with a checkbox is checked), focus should be set on that item (or the first item that matches if multiple are selected).

  • Otherwise focus the first valid item in the menu.

Is this request originating from a Red Hat product team? If so, which ones and is there any sort of deadline for this enhancement?

Any other information?


Jira Issue: PF-11

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

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

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、prop shouldfocusFirstItemOnOpen に関連する Menu、Select、Dropdown のフォーカスロジックを見つけます。これらのコンポーネントが開いたときに、aria-selected と checked の項目がどのように表現されるかを追跡します。選択された項目、または一致する最初の選択済み項目にフォーカスが移り、そうでなければ最初の有効な項目にフォーカスが移ることが完了条件です。既存の動作は関連するテストでカバーします。

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

評価

技術スタック
react, typescript
領域
accessibility, frontend
issue の種類
リファクタリング
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

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

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