Skip to main content

Module accessibility

Module accessibility 

Source
Expand description

Accessibility — accessibility-tree snapshot via the CDP Accessibility domain.

Page::accessibility returns an Accessibility handle bound to the page-level CDP session. Accessibility::snapshot captures a point-in-time view of the page’s accessibility tree and returns it as an AccessibilityNode tree.

CDP exposes two relevant commands:

  • Accessibility.getFullAXTree — the entire page’s accessibility tree (used when no root is requested).
  • Accessibility.getPartialAXTree — the subtree rooted at a given backendNodeId (used when root is supplied).

Both return a flat nodes array. We rebuild the parent/child relationships from each node’s childIds into the nested AccessibilityNode shape that mirrors Playwright’s Accessibility.snapshot.

Structs§

Accessibility
An accessibility snapshot handle for a Page.
AccessibilityNode
A single node in an accessibility-tree snapshot.
AccessibilitySnapshotOptions
Options for Accessibility::snapshot.