fix: reorder wxd_AccRole to match wxAccRole's alphabetical order#155
Merged
Conversation
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.
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.
wxd_AccRolewas introduced in ecca66a in MSAA numerical order, while wxWidgets'wxAccRoleuses alphabetical order. The C++ binding casts between them directly — consistent withwxd_AccStatusandwxd_NavDirwhich 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 aswxROLE_SYSTEM_OUTLINEITEM(ordinal 38 in its alphabetical enum) and emitted to the accessibility API asROLE_SYSTEM_OUTLINEITEM.Fix: Reorder
wxd_AccRolealphabetically to matchwxAccRoleexactly. Also removeSPLITBUTTON,IPADDRESSandOUTLINEBUTTONwhich have no counterpart inwxAccRoleand were incorrectly copied from oleacc.No changes to
accessible.cpp— the existing direct cast is now correct.