--- id: "6baef973-5f05-47e3-aaad-0af8327692e9" name: "Accessibility-First Interaction" micro_summary: "Use AX semantics and coordinate clicks first; fall back to targeted DOM or LocateAnything, then verify the result." status: "resolved" see_also: [] scope: "Preferred generic page interaction order: accessibility tree and coordinate clicks first, targeted DOM inspection next, semantic visual location for unknown iframe/shadow/canvas mechanics, screenshot only when visual state matters." warnings: "Visual `click_element` can act on the user's foreground tab instead of the switched CDP target. Confirm the intended target and prefer target-scoped JS/CDP interaction when the user's active tab must remain untouched." --- ## 2026-08-15 — interaction order Prefer `cdp("Accessibility.getFullAXTree")["nodes"]` for roles, names, and `backendDOMNodeId`. Filter before printing. Resolve geometry with `DOM.getBoxModel`, click the content-box center with `click_at_xy`, then verify with targeted `js(...)` or `page_info()`. Use targeted DOM inspection or extraction when coordinates are the wrong tool. For unknown domains, finicky iframes, shadow DOM, canvas, or brittle selectors, prefer the semantic visual fallback: `find_element(description)` returns click-ready CSS coordinates and `click_element(description)` locates and clicks through the local LocateAnything worker. Use screenshots when layout or imagery is itself relevant. Coordinate clicks remain the default across iframe and shadow boundaries because CDP mouse events pass through at the compositor level.