Repository navigation
Reach web pages and sign-in sheets through AXe web refs - #173
Merged
Merged
Conversation
Web views, Safari, SFSafariViewController and ASWebAuthenticationSession render out of process, so the accessibility tree shows at most their host view. With AXe >= 2.1.0 on a simulator, a --text tap or type that misses in the tree now falls back to the page's controls through AXe's checked web refs, and mav ui web lists them. Misses and wait timeouts on such screens say why, and an older AXe names the upgrade. The goal engine snapshot is unchanged.
Never follow a miss whose input may have been delivered, never redirect a selector with an id or value, keep delays and tap styles out of ref taps, report verified=unavailable for web taps, carry the receipt, explain legacy flow waits, and probe AXe once on the failure path.
bitomule
force-pushed
the
worktree-t-mav-156-out-of-process-content
branch
from
December 3, 2026 00:11
1dab217 to
b4a8012
Compare
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.
Closes #156.
Problem
WKWebView pages, Safari,
SFSafariViewControllerand the sign-in sheet ofASWebAuthenticationSessionrender in WebKit's own processes. The accessibility tree thatmav ui treereads shows at most their host view. Reproduced with a minimal app on an iPhone 17 Pro simulator, iOS 26.4, AXe 2.2.0: the sign-in sheet showed a username field, a password field and a "Log in" button, while the tree held only the app's own two buttons. As a result:What reaches it
AXe 2.1.0 added
describe-ui --agent --web. It hit-tests the screen, finds each page and lists the links, buttons and fields a tap would reach aswrefs. A checked ref tap (--snapshot-id,--expected-pid) re-checks the element under the ref just before input. This works for in-app WKWebViews (with or withoutisInspectable), Safari, SFSafariViewController and ASWebAuthenticationSession.ui tree --point X,Yalso reaches into the page, element by element.Change
elementNotFoundwith nothing sent, a--texttap on a simulator with AXe >= 2.1.0 taps the one web control whose label (or, failing that, value/placeholder) matches, through a checked ref.mav ui type TEXT --text LABEL, flowtap: {text: ...}andtype: {where: {text: ...}}get it too, and the flow recordsselector_via=web.mav ui weblists the page's controls:web ref=w3 role=button label="Log in" action=tap.web_controls=Nand anext=. Await/assert/ui waittimeout does the same, plusweb_match=when the text is a control's label. Page text is not listed, so the message points at the screenshot. With an AXe older than 2.1.0, a miss on a screen whose tree shows a web host (SFAuthenticationView,WKWebView, ...) addsweb_content=unreadableand names the upgrade.--idor--valueis never redirected to a web control.selector_ambiguous, which lists them.retry=unsafewhen partial).--verifyreportsverified=unavailable, because the native tree cannot see the page.--web.Docs: README "Web content and sign-in sheets" plus a Troubleshooting entry,
skills/mav/SKILL.md,docs/axe2.md, andmav help ui web/ui tree/ui tap.Validation
Real simulator (iPhone 17 Pro, iOS 26.4, AXe 2.2.0), with a throwaway app that opens an ASWebAuthenticationSession sheet and an in-app WKWebView:
steps=6); the screenshot showed the page's "Submitted" state.ui type ... --text Emailandui tap --text "Accept all"landed.Tests: 19 in
internal/mav/web_content_test.goand 4 ininternal/mav/drivers/axe/web_test.go, on fixtures shaped like AXe 2.2.0's real output. With the fallback and the explanations disabled, 9 of the behaviour tests fail. With the review fixes reverted, the uncertain-delivery, id-redirect and verify tests fail. The rest guard unchanged behaviour (no web content, old AXe without a web host).make checkpasses.Not covered
ui tree --pointand coordinates.--webto its snapshot so a goal can act on web controls. Left out to keep this change to the selector path.