Add legacy_accessible: MSAA bridge for old controls UIA can't model#420
Merged
Conversation
Many legacy Win32/MFC/Delphi controls expose nothing useful via modern
UIA (Value/Invoke/Toggle all return None) but are fully described via
the MSAA IAccessible bridge. legacy_info reads {name,value,description,
default_action,role,state} and legacy_default_action fires the MSAA
default action - the last-resort fallback that makes old apps
automatable. Extends the backend ABC + Windows UIA backend.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 23 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
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.



Why
Many legacy Win32 / MFC / Delphi controls expose nothing useful via the modern UIA patterns —
control_get_value/control_invoke/control_toggleall return None or do nothing — yet they're fully described through the MSAAIAccessiblebridge: a Name, Value, Description, Role, State and a DefaultAction.legacy_accessibleis the last-resort fallback that still reads that info and fires the default action, making the long tail of old apps automatable.legacy_info—{name, value, description, default_action, role, state}legacy_default_action— fire the MSAA default action (the Value/Invoke/Toggle fallback)Fifth feature of the ROUND-15 native-UIA depth lane.
Design
base.py_unsupporteddefaults) + real UIA inwindows_backend.py(LegacyIAccessiblePattern=10018; a_LEGACY_READStable overCurrentName/CurrentValue/CurrentDescription/CurrentDefaultAction/CurrentRole/CurrentState; the action reuses_invoke_pattern_method).role/stateare the raw MSAA numbers.__all__→AC_legacy_info/AC_legacy_default_action→ac_*MCP tools (info read-only, the action destructive) → Script Builder (Native UI). Qt-free verified.Tests
test/unit_test/headless/test_legacy_accessible_batch.py— fake backend covers the info dispatch, not-found → None, the default-action call, the unsupported-backend error, the executor adapters, and 5-layer wiring. 15 passed with the transform_window sibling. Real UIA not run in CI.