Repository navigation
Conversation
MacOSBackend reads AXTitleUIElement then AXTitle/AXDescription; WindowsBackend reads UIA LabeledBy then Name via a new focused-field-label agent route; LinuxBackend reads AT-SPI LABELLED_BY then the accessible name. Unit tests cover the priority and fail-closed None path. Real Chart.swift / chart_gtk.py proofs still need the lab VM (Part of #1868).
Keep the AT-SPI relation walk list-typed so mypy accepts the tuple fallback without an assignment conflict.
This branch has not been deployed
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.
Part of #1868
Summary
Record-time field labels currently come from Playwright only. Native TYPE events fall back to nearby OCR at compile time because Windows/macOS/Linux backends never implemented
focused_field_label.This adds the seam on all three:
AXTitleUIElement, thenAXTitle/AXDescription/uia/focused-field-labelagent route; UIALabeledBythenNameLABELLED_BYthen accessible nameReads the focused element only, never by position. Returns None when there is no label so the OCR fallback still applies. Never raises.
Testing
pytest tests/test_native_focused_field_label.py -n 4: 7 passed_ax_field_labelmissing); head restores and passesUntested
field_labelThose remain on Native recordings get no field labels from the accessibility tree (only the browser's do) #1868 for a lab-capable follow-up; this PR does not close the issue.