Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:AIPexStudio AIPex Accessibility Tree Snapshot

From Leeroopedia
Knowledge Sources
Domains Accessibility, Browser_Automation
Last Updated 2026-10-24 12:00 GMT

Overview

A technique for capturing a page's accessibility tree as a structured snapshot with unique element identifiers (UIDs), enabling stable element references for AI-driven automation.

Description

Accessibility Tree Snapshot addresses the problem that DOM selectors (CSS, XPath) are fragile—they break when page structure changes. Instead, the accessibility tree provides a semantic representation of the page using ARIA roles, names, and values. Each node in the tree is assigned a stable UID. The snapshot can be collected via CDP's `Accessibility.getFullAXTree` (focus mode) or via DOM traversal that builds an equivalent tree (background mode). The resulting tree is formatted as indented text for LLM consumption, with interactive elements, images, and meaningful text included, and focus state annotated. Elements are then addressed by UID in tool calls, providing a robust abstraction over DOM fragility.

Usage

Use this principle when an AI agent needs to interact with web page elements reliably. It is preferred over raw screenshots for most interactions because it is faster, cheaper, and more precise. Use the formatted text output to give the LLM awareness of the page structure.

Theoretical Basis

Snapshot = {
  root: TextSnapshotNode
  idToNode: Map<uid, TextSnapshotNode>
  tabId: number
}

TextSnapshotNode = {
  id, role, name, value, children[],
  focused, disabled, expanded, checked, ...
}

Formatting:
  Filter: include interactive roles, images, StaticText >= 2 chars
  Annotate: * = focused node, → = focus ancestor
  Output: indented text with uid, role, name, attributes

Related Pages

Implemented By

Uses Heuristic

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment