[Browser Run] Add accessibility tree endpoint docs#31899
Conversation
Review🚨 1 critical found in commit Code ReviewThis code review is in beta and may not always be helpful — use your judgment. Critical (1)
ConventionsNo convention issues found. Style Guide ReviewNo style-guide issues found. CommandsOnly codeowners can run commands. Post a comment with the command to trigger it.
|
|
Addressed the docs bot feedback in the latest push:\n\n- Changed the changelog response fence from |
|
|
||
| [Browser Run](/browser-run/) now supports a standalone `/accessibilityTree` endpoint, giving agent and automation workflows direct access to the browser's accessibility tree for a rendered webpage. | ||
|
|
||
| For AI agents, the accessibility tree provides a token-efficient alternative to screenshots and a more semantic alternative to raw HTML. Instead of asking a model to infer interactive controls from pixels, you can provide the browser's structured representation of the page: roles, names, values, states, and hierarchy. This helps AI agents identify available elements and determine which actions they can take. |
There was a problem hiding this comment.
I am reading this still wondering, “what is an accessibility tree?”
irvinebroque
left a comment
There was a problem hiding this comment.
If this is useful for things beyond accessibility
(I think that’s what this is saying)
We need to say that more loudly
Otherwise I’d read this as a customer and see the word accessibility and just tune out unless that was something top of mind for me
Clarified the purpose and benefits of the new /accessibilityTree endpoint for AI agents and automation workflows. Enhanced explanation of the accessibility tree's structure and its advantages over screenshots and raw HTML.
Co-authored-by: Kathy <153706637+kathayl@users.noreply.github.com>
|
|
||
| For AI agents, this means less inference from pixels and less parsing HTML. You can provide the page structure directly, helping agents identify available elements and determine which actions they can take. | ||
|
|
||
| With the new `/accessibilityTree` endpoint, you can request the accessibility tree directly when you only need the semantic structure of a page. If you need multiple page formats in a single API call, you can use the [`/snapshot`](/browser-run/quick-actions/snapshot/) endpoint, which also returned Markdown, HTML, and screenshots. |
There was a problem hiding this comment.
| With the new `/accessibilityTree` endpoint, you can request the accessibility tree directly when you only need the semantic structure of a page. If you need multiple page formats in a single API call, you can use the [`/snapshot`](/browser-run/quick-actions/snapshot/) endpoint, which also returned Markdown, HTML, and screenshots. | |
| With the new `/accessibilityTree` endpoint, you can request the accessibility tree directly when you only need the semantic structure of a page. If you need multiple page formats in a single API call, you can use the [`/snapshot`](/browser-run/quick-actions/snapshot/) endpoint, which also returns Markdown, HTML, and screenshots. |
Summary
Adds Browser Run documentation for the new
/accessibilityTreeQuick Action endpoint.Includes:
/accessibilityTreeendpoint documentation page/snapshotdocumentation update to link to the new single-format endpointDocumentation checklist
Validation
pnpm run checkpnpm run lintpnpm run format:core:checkpnpm run buildpnpm exec tsx bin/check-link-validation/index.ts