feat: crisis overlay full Tab cycle + Escape dismiss (closes #95) #105

Closed
Rockachopa wants to merge 1 commits from fix/95-overlay-keyboard-nav into main
Owner

Three fixes for the crisis overlay keyboard navigation:

  1. Focus on open: Focus lands on the Call 988 link (first focusable element) instead of the disabled dismiss button, preventing focus from escaping behind the overlay.

  2. Escaped focus recovery: If Tab focus somehow escapes outside the overlay (e.g. lands on body), the trap redirects it back to the first focusable element.

  3. Escape key dismiss: Pressing Escape closes the overlay and restores focus to the chat input (only after the dismiss countdown completes).

Acceptance criteria met:

  • Tab cycles through all focusable elements in overlay
  • Shift+Tab reverses direction
  • Escape closes overlay and returns focus to chat input

Closes #95

Three fixes for the crisis overlay keyboard navigation: 1. **Focus on open**: Focus lands on the Call 988 link (first focusable element) instead of the disabled dismiss button, preventing focus from escaping behind the overlay. 2. **Escaped focus recovery**: If Tab focus somehow escapes outside the overlay (e.g. lands on body), the trap redirects it back to the first focusable element. 3. **Escape key dismiss**: Pressing Escape closes the overlay and restores focus to the chat input (only after the dismiss countdown completes). Acceptance criteria met: - [x] Tab cycles through all focusable elements in overlay - [x] Shift+Tab reverses direction - [x] Escape closes overlay and returns focus to chat input Closes #95
Rockachopa added 1 commit 2026-04-15 03:22:38 +00:00
feat: crisis overlay full Tab cycle + Escape dismiss (#95)
All checks were successful
Sanity Checks / sanity-test (pull_request) Successful in 8s
Smoke Test / smoke (pull_request) Successful in 18s
cb8554e904
Three fixes:
1. Focus lands on Call 988 link on open (not disabled dismiss button)
2. Focus trap catches escaped focus outside overlay
3. Escape key closes overlay, returns focus to chat input

Closes #95
Timmy approved these changes 2026-04-15 04:13:45 +00:00
Timmy left a comment
Owner

Feature implementation reviewed - looks solid.

Scope: 1 file(s) changed (46+ / 22-)

Feature implementation reviewed - looks solid. **Scope**: 1 file(s) changed (46+ / 22-)
Author
Owner

Closing as duplicate — Duplicate of #104 which includes focus recovery and comprehensive tests. Keeping #104.

Closing as duplicate — Duplicate of #104 which includes focus recovery and comprehensive tests. Keeping #104.
Rockachopa closed this pull request 2026-04-15 04:28:53 +00:00
All checks were successful
Sanity Checks / sanity-test (pull_request) Successful in 8s
Smoke Test / smoke (pull_request) Successful in 18s

Pull request closed

Sign in to join this conversation.