Skip to content

fix: reorder wxd_AccRole to match wxAccRole's alphabetical order#155

Merged
AllenDang merged 2 commits into
AllenDang:mainfrom
LeonarddeR:fixEnums
Jun 11, 2026
Merged

fix: reorder wxd_AccRole to match wxAccRole's alphabetical order#155
AllenDang merged 2 commits into
AllenDang:mainfrom
LeonarddeR:fixEnums

Conversation

@LeonarddeR

@LeonarddeR LeonarddeR commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

wxd_AccRole was introduced in ecca66a in MSAA numerical order, while wxWidgets' wxAccRole uses alphabetical order. The C++ binding casts between them directly — consistent with wxd_AccStatus and wxd_NavDir which correctly mirror their wx counterparts. The mismatched ordering caused every role to silently map to the wrong value.

Example: WXD_ROLE_SYSTEM_PROPERTYPAGE (ordinal 38) was received by wxWidgets as wxROLE_SYSTEM_OUTLINEITEM (ordinal 38 in its alphabetical enum) and emitted to the accessibility API as ROLE_SYSTEM_OUTLINEITEM.

Fix: Reorder wxd_AccRole alphabetically to match wxAccRole exactly. Also remove SPLITBUTTON, IPADDRESS and OUTLINEBUTTON which have no counterpart in wxAccRole and were incorrectly copied from oleacc.

No changes to accessible.cpp — the existing direct cast is now correct.

wxd_AccRole was introduced in ecca66a in MSAA numerical order, while
wxWidgets' wxAccRole uses alphabetical order. The C++ binding casts
between them directly — consistent with wxd_AccStatus and wxd_NavDir
which correctly mirror their wx counterparts. The mismatched ordering
caused every role to silently map to the wrong value.

Example: WXD_ROLE_SYSTEM_PROPERTYPAGE (ordinal 38) was received by
wxWidgets as wxROLE_SYSTEM_OUTLINEITEM (ordinal 38 in its alphabetical
enum) and emitted to the accessibility API as ROLE_SYSTEM_OUTLINEITEM.

Fix: reorder wxd_AccRole alphabetically to match wxAccRole exactly.
Also remove SPLITBUTTON, IPADDRESS and OUTLINEBUTTON which have no
counterpart in wxAccRole and were incorrectly copied from oleacc.

No changes to accessible.cpp — the existing direct cast is now correct.
@AllenDang AllenDang merged commit c9738f1 into AllenDang:main Jun 11, 2026
13 checks passed
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.

2 participants