Move focus to the task title when the task details page opens

Aperta Adatta ai principianti
#464 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp

Direzione di ricerca

Individua il componente web TaskDetailPage e i relativi test Vitest esistenti; l’issue non indica i percorsi dei file. Leggi come la pagina carica le attività e visualizza il titolo h1, poi esegui i test pertinenti. Il lavoro è completato quando l’intestazione riceve il focus una volta dopo un caricamento iniziale riuscito, rimane senza focus durante gli aggiornamenti successivi e non riceve il focus se il caricamento non riesce.

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

Descrizione

Follow-up to #404 (merged in #462). Found during that run (deferred question Q5 in the implementation notes). Not groomed. Web only.

Problem

TaskDetailPage (/tasks/:id) does not move focus on mount. Arriving from a journal row, the Tasks page or the back link, the keyboard and screen reader user starts at the top of the document, or wherever the previous page left focus, and must tab past the back link and the page header to reach the task title. With #404 the detail page is now reached from every journal row, so this happens more often.

Change

On first load of a task (not on refetch or edit), move focus to the page heading (the task title h1), so it is announced and keyboard users start at the content. Give the heading tabIndex={-1}. Do not steal focus back after edits, status changes or note actions. Do not scroll the page beyond what focus does.

Acceptance criteria

  1. Opening /tasks/:id focuses the task title heading once the task has loaded.
  2. Focus stays where it is during refetches, edits and note actions.
  3. A task that fails to load or is not found does not focus a missing element.
  4. The back link, and the focus return to the journal row from #404, are unchanged.
  5. Vitest tests for 1 to 3.

Out of scope

  • Other pages.
  • Changes to the back-link rule.
Lingua principale
C#
Stelle
1
Fork
0
Merge medio
2h 2m
PR unite (30g)
98

Preparare l'ambiente

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 nevridge/TaskFlow

Tutte le issue di nevridge/TaskFlow

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.