Skip to content

Add legacy_accessible: MSAA bridge for old controls UIA can't model#420

Merged
JE-Chen merged 1 commit into
devfrom
feat/legacy-accessible-batch
Jun 24, 2026
Merged

Add legacy_accessible: MSAA bridge for old controls UIA can't model#420
JE-Chen merged 1 commit into
devfrom
feat/legacy-accessible-batch

Conversation

@JE-Chen

@JE-Chen JE-Chen commented Jun 24, 2026

Copy link
Copy Markdown
Member

Why

Many legacy Win32 / MFC / Delphi controls expose nothing useful via the modern UIA patterns — control_get_value / control_invoke / control_toggle all return None or do nothing — yet they're fully described through the MSAA IAccessible bridge: a Name, Value, Description, Role, State and a DefaultAction. legacy_accessible is 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

  • Extends the accessibility backend ABC (base.py _unsupported defaults) + real UIA in windows_backend.py (LegacyIAccessiblePattern=10018; a _LEGACY_READS table over CurrentName/CurrentValue/CurrentDescription/CurrentDefaultAction/CurrentRole/CurrentState; the action reuses _invoke_pattern_method). role/state are the raw MSAA numbers.
  • 5 layers wired: core → facade __all__AC_legacy_info / AC_legacy_default_actionac_* 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.

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.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 23 complexity · 0 duplication

Metric Results
Complexity 23
Duplication 0

View in Codacy

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.

@JE-Chen JE-Chen merged commit c44cb3b into dev Jun 24, 2026
16 checks passed
@JE-Chen JE-Chen deleted the feat/legacy-accessible-batch branch June 24, 2026 19:27
@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant