Skip to content

[Browser Run] Add accessibility tree endpoint docs#31899

Open
AbdulsaboorS wants to merge 4 commits into
cloudflare:productionfrom
AbdulsaboorS:browser-run-accessibility-tree-docs-fork
Open

[Browser Run] Add accessibility tree endpoint docs#31899
AbdulsaboorS wants to merge 4 commits into
cloudflare:productionfrom
AbdulsaboorS:browser-run-accessibility-tree-docs-fork

Conversation

@AbdulsaboorS

@AbdulsaboorS AbdulsaboorS commented Jul 6, 2026

Copy link
Copy Markdown

Summary

Adds Browser Run documentation for the new /accessibilityTree Quick Action endpoint.

Includes:

  • New /accessibilityTree endpoint documentation page
  • Browser Run release note entry
  • Cloudflare-wide changelog entry
  • /snapshot documentation update to link to the new single-format endpoint

Documentation checklist

  • Is there a changelog entry (guidelines)? If you do not add one for something awesome and new (however small), how will our customers find out? Changelogs are automatically posted to RSS feeds, Discord, and X.
  • The change adheres to the documentation style guide.

Validation

  • pnpm run check
  • pnpm run lint
  • pnpm run format:core:check
  • pnpm run build
  • pnpm exec tsx bin/check-link-validation/index.ts

@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Review

🚨 1 critical found in commit 9d66ef1.

Code Review

This code review is in beta and may not always be helpful — use your judgment.

Critical (1)
File Issue
changelog/browser-run/2026-07-06-browser-run-accessibility-tree-endpoint.mdx line 16 Incorrect REST endpoint path — The curl example uses /accounts//browser-run/accessibilityTree, but all other Browser Run single-format REST endpoints live under /browser-rendering/ (e.g., /browser-rendering/content, /browser-rendering/screenshot, /browser-rendering/markdown, /browser-rendering/snapshot). A request to the documented URL would 404. Fix: Change the curl URL path from /browser-run/accessibilityTree to /browser-rendering/accessibilityTree.

Conventions

No convention issues found.

Style Guide Review

No style-guide issues found.

Commands

Only codeowners can run commands. Post a comment with the command to trigger it.

Command Description
/review Runs a review now. Incremental if a prior review exists, full if not.
/full-review Re-reviews the entire PR diff from scratch, ignoring incremental history. Useful after a rebase, when you want a fresh review, or if the bot gets out of sync and reports issues that no longer exist.
/ignore-review-limit Permanently lifts the 2-review automatic limit for this PR. Future pushes will trigger reviews as normal.
/disable-auto-review Stops automatic reviews from triggering on future pushes to this PR. Codeowners can still run /review or /full-review manually.

@AbdulsaboorS

Copy link
Copy Markdown
Author

Addressed the docs bot feedback in the latest push:\n\n- Changed the changelog response fence from json output` to json.\n- Replaced clickable controlswithinteractive controls.\n- Also changed the new endpoint page response fences to plain ```json to avoid the same warning.\n\nLocal validation after the fix:\n- pnpm run check\n- pnpm run lint\n- pnpm run format:core:check\n- pnpm run build\n- pnpm exec tsx bin/check-link-validation/index.ts


[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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am reading this still wondering, “what is an accessibility tree?”

@irvinebroque irvinebroque left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.