pub struct A11yNode {Show 15 fields
pub raw_type: String,
pub element_type_raw: u64,
pub role: Option<Role>,
pub identifier: Option<String>,
pub label: Option<String>,
pub title: Option<String>,
pub placeholder_value: Option<String>,
pub value: Option<String>,
pub text: Option<String>,
pub bounds: Rect,
pub enabled: bool,
pub selected: bool,
pub has_focus: bool,
pub visible: bool,
pub children: Vec<A11yNode>,
}Expand description
Accessibility tree node — a single-node snapshot as returned by /tree,
mirroring the Swift-side TreeRoute.nodeToDict shape.
rawType carries the underlying Apple XCUIElement.ElementType raw
name (e.g. “any”, “other”, “staticText”); role is the curated semantic
mapping (None when XCUIElement type doesn’t map to a known Role).
Each optional string field maps to a single Apple a11y attribute, in the order the standard iOS a11y drivers scan them.
#[serde(default)] on the recursive children: Vec<A11yNode> allows
terminal nodes in JSON to omit the field entirely (/tree route emits
"children":[] consistently but we accept both for forward-compat).
Fields§
§raw_type: StringRaw Apple XCUIElement.ElementType name (e.g. "any", "other").
element_type_raw: u64Raw numeric XCUIElement.ElementType.rawValue.
raw_type above is a string form derived by elementTypeName,
but consumers debugging a degraded a11y tree (RN Fabric on iOS
26.5 is the motivating case) need the numeric form to spot
“iOS types this as .button (9) but identifier / label empty”
— the signature of an app-side accessibility-bridge drop. The
numeric form also disambiguates the alert/dialog button
promotion (rawType is lifted to “button” for consumer
selectors, but the original ElementType number stays here).
Defaults to 1 (.other) for wire payloads that omit it.
role: Option<Role>Curated semantic role; None when the raw type doesn’t map.
identifier: Option<String>Accessibility identifier (Apple accessibilityIdentifier).
label: Option<String>Accessibility label (Apple accessibilityLabel).
title: Option<String>Element title (Apple title).
placeholder_value: Option<String>Placeholder text shown when the field is empty.
value: Option<String>Element value (Apple value).
text: Option<String>Visible text content (Apple text).
bounds: RectGeometric bounds in logical points.
enabled: boolWhether the element is currently interactable.
selected: boolWhether the element is currently selected.
has_focus: boolWhether the element currently has keyboard focus.
visible: boolWhether Apple’s accessibility runtime reports this element as visible.
children: Vec<A11yNode>Child nodes in stable DFS pre-order.