Fix wxCollapsibleHeaderCtrl accessibility and Enter key under MSW (PR #27048)

7 views
Skip to first unread message

Quin Gillespie

unread,
Sep 21, 2026, 5:30:28 PM (24 hours ago) Sep 21
to wx-...@googlegroups.com, Subscribed

The generic collapsible header, used by wxCollapsiblePane and so by the generic about dialog, had two problems for keyboard and screen reader users under MSW:

  • Pressing Enter on the header activated the default button of the dialog. In wxAboutBox this closed the dialog. Enter now toggles the header, the same as Space.
  • Screen readers could not tell what the header was or if it was open. It now reports itself as a button with an expanded or collapsed state, sends a state change event when it toggles, and has a default action.

Tested with NVDA on Windows 11: the header now reads as "button collapsed" or "button expanded", and Enter toggles it without closing the about dialog.


You can view, comment on, or merge this pull request online at:

  https://github.com/wxWidgets/wxWidgets/pull/27048

Commit Summary

  • 4160e2f fix wxCollapsibleHeaderCtrl accessibility and Enter key handling under MSW

File Changes

(2 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/27048@github.com>

VZ

unread,
Sep 21, 2026, 7:03:32 PM (22 hours ago) Sep 21
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#27048)

Implementing a11y support for the header is very welcome, thank you!

But I wonder about "Enter" — do we really need it to toggle the header? I think "Space" should be already doing this, and not using "Enter" for this would avoid the need for MSW-specific code.

And if we do need it, using wxWANTS_CHARS should be a better way to let it have "Enter".


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/27048/c5768712829@github.com>

Quin Gillespie

unread,
Sep 21, 2026, 7:29:26 PM (22 hours ago) Sep 21
to wx-...@googlegroups.com, Subscribed
trypsynth left a comment (wxWidgets/wxWidgets#27048)

Thanks for looking at this!

I think Enter is worth keeping. Now that the header reports itself as a button, screen reader users hear "button" and expect Enter to press it, like it does for any focused button under MSW (and like the existing code in wxWindowMSW::MSWProcessMessage() ensures for wxButton, which gets Enter even when there is a default button elsewhere). Without it, Enter on the header activates the default button instead, which in wxAboutBox closes the whole dialog. That's how I found this in the first place.

I'll switch to wxWANTS_CHARS and drop the MSW-specific code. The header will then also get Tab, so I'll call HandleAsNavigationKey() for it in OnChar() to keep Tab navigation working. The only other difference I see is that arrow keys won't move to the next control from the header any more, which seems fine to me, but please let me know if you think otherwise.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/27048/c5768967297@github.com>

Quin Gillespie

unread,
Sep 21, 2026, 7:31:27 PM (22 hours ago) Sep 21
to wx-...@googlegroups.com, Push

@trypsynth pushed 1 commit.

  • f87ff32 fix Enter handling in wxCollapsibleHeaderCtrl using wxWANTS_CHARS


View it on GitHub or unsubscribe.


Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/27048/before/4160e2f4fa61f40a2bde6b8b2547fcdc72b7117d/after/f87ff32de374bcd9d61cc64f62b4608ca01281d6@github.com>

VZ

unread,
8:32 AM (9 hours ago) 8:32 AM
to wx-...@googlegroups.com, Subscribed

Closed #27048 via 950d491.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/27048/issue_event/31599219003@github.com>

Reply all
Reply to author
Forward
0 new messages