Skip to content

fix(a11y): add Escape key handling to 12 dialogs (#407)#421

Closed
Orinks wants to merge 2 commits intodevfrom
fix/accessiweather-issue-407
Closed

fix(a11y): add Escape key handling to 12 dialogs (#407)#421
Orinks wants to merge 2 commits intodevfrom
fix/accessiweather-issue-407

Conversation

@Orinks
Copy link
Copy Markdown
Owner

@Orinks Orinks commented Mar 3, 2026

Summary

  • Adds wx.EVT_CHAR_HOOK binding to 12 dialogs that had no Escape key handler: AirQualityDialog, AlertDialog, AviationDialog, CommunityPacksBrowserDialog, DebugAlertDialog, DiscussionDialog, ExplanationDialog, NationwideDiscussionDialog, NOAARadioDialog, SoundPackManagerDialog, UVIndexDialog, WeatherHistoryDialog
  • Modal dialogs call EndModal(wx.ID_CANCEL) on Escape; the modeless NOAA Radio dialog calls Close() to trigger its existing cleanup handler
  • Extends headless wx stub in conftest.py with WXK_ESCAPE, ID_CLOSE, NOT_FOUND constants, wx.lib.scrolledpanel sub-module, and a __getattr__ fallback so dialog imports succeed without wxPython installed

Closes #407

Test plan

  • New test file tests/test_dialog_escape_key.py with 26 tests covering all 13 dialogs (12 new + 1 existing WeatherAssistantDialog)
  • Each dialog tested for both Escape key (calls EndModal/Close) and non-Escape key (calls event.Skip)
  • Full test suite passes (2446 passed, 5 pre-existing failures in unrelated focus tests)

🤖 Generated with Claude Code

Orinks and others added 2 commits March 3, 2026 03:10
Bind wx.EVT_CHAR_HOOK on all dialogs that lacked an Escape-to-close
handler. Modal dialogs call EndModal(wx.ID_CANCEL); the modeless NOAA
Radio dialog calls Close() to trigger its existing cleanup handler.

Also extend the headless wx stub in conftest.py with WXK_ESCAPE,
ID_CLOSE, NOT_FOUND constants, wx.lib.scrolledpanel sub-module, and a
__getattr__ fallback so dialog imports succeed without wxPython.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Orinks
Copy link
Copy Markdown
Owner Author

Orinks commented Mar 5, 2026

Closing as duplicate/superseded by merged PR #424, which contains the finalized fix and CI updates.

@Orinks Orinks closed this Mar 5, 2026
@Orinks Orinks deleted the fix/accessiweather-issue-407 branch March 19, 2026 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant