Restore Tab/Shift+Tab focus-exit test coverage

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
playwright, typescript

調査の方向性

Start with elements/pf-v5-accordion/test/pf-accordion.spec.ts and elements/pf-v5-search-input/test/pf-search-input.spec.ts, reviewing the existing keyboard-navigation tests and the four removed or weakened assertions. Run the relevant test files, then restore coverage for focus leaving each component through Tab or Shift+Tab using one of the listed approaches. Done means all four focus-exit cases are asserted again.

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

説明

Context

PR #3121 migrated unit tests from Playwright to Puppeteer. Puppeteer cannot move focus outside the browser viewport via Tab/Shift+Tab, so four assertions that verified focus leaving a component were removed or weakened.

Removed/weakened assertions

  1. Accordion: Shift+Tab from first header exits accordion - removed entirely (no prior focusable element to land on)
  2. Accordion: Shift+Tab from last header exits accordion - removed entirely
  3. Accordion: Tab out then Shift+Tab back returns to panel link - removed the Shift+Tab return portion
  4. Search-input: Tab from expanded listbox defocuses combobox - changed from asserting nothing is focused to asserting listbox is closed

What to restore

All four cases test that focus leaves the component entirely via Tab/Shift+Tab. Options:

  • Add Playwright e2e tests (*.e2e.ts) for these keyboard navigation flows, since e2e tests still run on Playwright
  • Investigate whether Puppeteer's page.bringToFront() or CDP Input.dispatchKeyEvent with proper target can simulate Tab-out behavior
  • Use a sentinel focusable element before/after the component in the test fixture to catch focus without needing to leave the page

Files affected

  • elements/pf-v5-accordion/test/pf-accordion.spec.ts
  • elements/pf-v5-search-input/test/pf-search-input.spec.ts
主要言語
TypeScript
スター
394
フォーク
107
PR マージ指標
30日以内にマージされた PR はありません

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

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

はじめの一歩

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

patternfly/patternfly-elements のほかの issue

patternfly/patternfly-elements の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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