Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Restore Tab/Shift+Tab focus-exit test coverage

Aperta
#3,122 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
playwright, typescript

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
TypeScript
Stelle
394
Fork
107
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di patternfly/patternfly-elements

Tutte le issue di patternfly/patternfly-elements

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.