fix(a11y): add Escape key handling to 12 dialogs (#407)#421
Closed
fix(a11y): add Escape key handling to 12 dialogs (#407)#421
Conversation
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>
Owner
Author
|
Closing as duplicate/superseded by merged PR #424, which contains the finalized fix and CI updates. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
wx.EVT_CHAR_HOOKbinding to 12 dialogs that had no Escape key handler: AirQualityDialog, AlertDialog, AviationDialog, CommunityPacksBrowserDialog, DebugAlertDialog, DiscussionDialog, ExplanationDialog, NationwideDiscussionDialog, NOAARadioDialog, SoundPackManagerDialog, UVIndexDialog, WeatherHistoryDialogEndModal(wx.ID_CANCEL)on Escape; the modeless NOAA Radio dialog callsClose()to trigger its existing cleanup handlerconftest.pywithWXK_ESCAPE,ID_CLOSE,NOT_FOUNDconstants,wx.lib.scrolledpanelsub-module, and a__getattr__fallback so dialog imports succeed without wxPython installedCloses #407
Test plan
tests/test_dialog_escape_key.pywith 26 tests covering all 13 dialogs (12 new + 1 existing WeatherAssistantDialog)🤖 Generated with Claude Code