patternfly / patternfly/patternfly-react
Menu/Select/Dropdown - considering refactoring focus logic
まだ誰も着手していません。
- 主要言語
- 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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、prop shouldfocusFirstItemOnOpen に関連する Menu、Select、Dropdown のフォーカスロジックを見つけます。これらのコンポーネントが開いたときに、aria-selected と checked の項目がどのように表現されるかを追跡します。選択された項目、または一致する最初の選択済み項目にフォーカスが移り、そうでなければ最初の有効な項目にフォーカスが移ることが完了条件です。既存の動作は関連するテストでカバーします。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- react, typescript
- 領域
- accessibility, frontend
- issue の種類
- リファクタリング
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100