Repository navigation
Description
Observed locally
On commit ac2b7a574d06823687593a80064dedefa3861cdc, opening a task from a project's board leaves keyboard focus on the background task card although the visible dialog has role="dialog" and aria-modal="true". Pressing Tab then focuses that background card's Priority button; its tooltip is rendered over the modal. A keyboard user does not enter the task they opened.
Environment: isolated localhost app, Chromium, seeded test workspace. No production testing. This violates manual box TASK-A2 and the intended keyboard path in TASK-A1.
Reproduce
- Open a project task board with at least one task.
- Focus the task title button and press Enter.
- Observe the dialog, then press Tab without clicking inside it.
- Inspect
document.activeElement: it is the background card'saria-label="Priority"button, outside the dialog. Background cards remain exposed in the accessibility tree.
The same initial outside focus occurs on pointer opening. Clicking Edit inside the dialog transfers focus inside and recovers the trap, so there is a pointer workaround. Escape after the background Priority tooltip is shown dismisses the tooltip first; a second Escape closes the task.
Expected
Opening a task transfers focus into the modal, Tab/Shift+Tab stay inside, and Escape closes it and restores the originating card. Keep the requested quiet loading appearance without leaving focus behind the overlay.
Root cause and scope
services/platform/app/features/tasks/components/task-modal.tsx cancels edit-mode onOpenAutoFocus without actually focusing the dialog. Reuse the shared dialog/focus contract; sweep board and list entry, loading/deep-link entry, create mode, and the responsive sheet. Avoid a second custom focus-trap implementation.
Acceptance
- Reproduce with a real browser on localhost, then add a regression for Enter → Tab/Shift+Tab → Escape.
- Cover loaded and loading task openings and focus restoration to the correct card.
- Verify create-dialog autofocus and mobile details are preserved.
- Follow AGENTS.md, design/, the normal branch/PR workflow, and affected checks. No production QA.
Evidence captured during the local run: tale-fleet-task-modal-focus.png (modal plus background Priority tooltip) and the active-element/AX observations. No console errors were recorded for these task flows.
Activity
yannickmonney commentedon Sep 27, 2026
Implementation is in progress on branch fix/task-dialog-keyboard-focus in an isolated checkout. Local browser acceptance will cover entry focus, Tab/Shift+Tab containment, Escape restoration, and desktop/mobile behavior. No production testing.