feat: crisis overlay keyboard navigation — Escape key (fixes #95) #102

Closed
Rockachopa wants to merge 2 commits from fix/overlay-escape-key into main
Owner

Fixes #95

Changes

index.html:

  • Added Escape key handler for the crisis overlay
  • Escape closes the overlay (if dismiss button is enabled after 10s cooldown)
  • Focus is returned to the element that had focus before the overlay opened (chat input)

tests/test_crisis_overlay_focus_trap.py:

  • Added test_overlay_escape_key_closes_overlay verifying the Escape handler exists

Acceptance Criteria

  • Tab cycles through all focusable elements in overlay (already implemented)
  • Shift+Tab reverses direction (already implemented)
  • Escape closes overlay and returns focus to chat input (NEW)
  • Test: static verification of keyboard navigation code
Fixes #95 ## Changes **index.html:** - Added Escape key handler for the crisis overlay - Escape closes the overlay (if dismiss button is enabled after 10s cooldown) - Focus is returned to the element that had focus before the overlay opened (chat input) **tests/test_crisis_overlay_focus_trap.py:** - Added `test_overlay_escape_key_closes_overlay` verifying the Escape handler exists ## Acceptance Criteria - [x] Tab cycles through all focusable elements in overlay (already implemented) - [x] Shift+Tab reverses direction (already implemented) - [x] Escape closes overlay and returns focus to chat input (NEW) - [x] Test: static verification of keyboard navigation code
Rockachopa added 2 commits 2026-04-15 03:15:50 +00:00
Escape closes the overlay and returns focus to chat input.
Respects the 10s cooldown (won't dismiss if button is disabled).

Fixes #95
test: add Escape key handler test for crisis overlay
Some checks failed
Sanity Checks / sanity-test (pull_request) Successful in 13s
Smoke Test / smoke (pull_request) Failing after 18s
d2352ed589
Timmy approved these changes 2026-04-15 04:13:50 +00:00
Timmy left a comment
Owner

Feature implementation reviewed - looks solid.

Scope: 2 file(s) changed (23+ / 0-)

Feature implementation reviewed - looks solid. **Scope**: 2 file(s) changed (23+ / 0-)
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:52 +00:00
Some checks failed
Sanity Checks / sanity-test (pull_request) Successful in 13s
Smoke Test / smoke (pull_request) Failing after 18s

Pull request closed

Sign in to join this conversation.