fix: crisis overlay initial focus to enabled Call 988 link (#69) #126

Closed
Rockachopa wants to merge 0 commits from burn/69-1776264183 into main
Owner

Closes #69

Problem

showOverlay() disabled the dismiss button for the 10-second countdown, then immediately called overlayDismissBtn.focus(). Disabled buttons cannot receive focus, so keyboard and assistive-technology users had no reliable initial focus target when the crisis overlay opened.

Changes

  • Added overlayCallLink variable referencing the .overlay-call element
  • showOverlay() now focuses the Call 988 link (always enabled) instead of the disabled dismiss button
  • Regression test verifies initial focus targets the enabled call link
  • Regression test verifies the .overlay-call JS variable is declared

Acceptance Criteria

  • Overlay sets initial focus to an enabled control (Call 988 link)
  • Regression test covers initial focus target on overlay open

Tests

All 28 tests pass (5 focus-trap tests, including 2 new ones).

Closes #69 ## Problem `showOverlay()` disabled the dismiss button for the 10-second countdown, then immediately called `overlayDismissBtn.focus()`. Disabled buttons cannot receive focus, so keyboard and assistive-technology users had no reliable initial focus target when the crisis overlay opened. ## Changes - Added `overlayCallLink` variable referencing the `.overlay-call` element - `showOverlay()` now focuses the Call 988 link (always enabled) instead of the disabled dismiss button - Regression test verifies initial focus targets the enabled call link - Regression test verifies the `.overlay-call` JS variable is declared ## Acceptance Criteria - [x] Overlay sets initial focus to an enabled control (Call 988 link) - [x] Regression test covers initial focus target on overlay open ## Tests All 28 tests pass (5 focus-trap tests, including 2 new ones).
Rockachopa added 2 commits 2026-04-15 15:10:05 +00:00
fix: crisis overlay initial focus to enabled Call 988 link (#69)
All checks were successful
Sanity Checks / sanity-test (pull_request) Successful in 9s
Smoke Test / smoke (pull_request) Successful in 15s
07b3f67845
Timmy approved these changes 2026-04-15 16:16:18 +00:00
Timmy left a comment
Owner

Review: fix: crisis overlay initial focus to enabled Call 988 link

Correct fix — focuses the always-enabled Call 988 link instead of the disabled dismiss button, which cannot receive focus. The test additions verify the new behavior and regression-guard against the old pattern.

One minor note: this overlaps with PRs #116 and #84 which fix the same issue (#69). Consider closing the duplicates.

Approved.

**Review: fix: crisis overlay initial focus to enabled Call 988 link** Correct fix — focuses the always-enabled Call 988 link instead of the disabled dismiss button, which cannot receive focus. The test additions verify the new behavior and regression-guard against the old pattern. One minor note: this overlaps with PRs #116 and #84 which fix the same issue (#69). Consider closing the duplicates. Approved.
Timmy closed this pull request 2026-04-17 01:52:39 +00:00
Owner

Archived — branch unknown preserved for reference. Cherry-pick if still relevant.

Archived — branch `unknown` preserved for reference. Cherry-pick if still relevant.
All checks were successful
Sanity Checks / sanity-test (pull_request) Successful in 9s
Smoke Test / smoke (pull_request) Successful in 15s

Pull request closed

Sign in to join this conversation.