Skip to main content
Options for [AccessibilitySnapshot.toStringWith].

Properties

boolean
Hoist unnamed structural wrappers out of the output: the wrapper line is skipped and its children are rendered at the depth the wrapper would have had. The root is always rendered. Defaults to true.
boolean
Only render interactive elements (buttons, links, inputs, …) and the ancestors needed to give them context: a node is dropped when its role is not interactive and no rendered node exists below it. Defaults to false.
number
Maximum characters per node name; longer names are cut and suffixed with . Also caps rendered values, which are capped at 80 characters when this is unset.
number
Maximum rendered depth (post-collapse, 0-based). Nodes deeper than this — and their entire subtrees — are dropped. Unset renders all depths.