pub struct SemanticsNode {Show 19 fields
pub id: NodeId,
pub parent: Option<NodeId>,
pub role: SemanticsRole,
pub bounds: Rect,
pub flags: SemanticsFlags,
pub test_id: Option<String>,
pub active_descendant: Option<NodeId>,
pub pos_in_set: Option<u32>,
pub set_size: Option<u32>,
pub label: Option<String>,
pub value: Option<String>,
pub extra: SemanticsNodeExtra,
pub text_selection: Option<(u32, u32)>,
pub text_composition: Option<(u32, u32)>,
pub actions: SemanticsActions,
pub labelled_by: Vec<NodeId>,
pub described_by: Vec<NodeId>,
pub controls: Vec<NodeId>,
pub inline_spans: Vec<SemanticsInlineSpan>,
}Fields§
§id: NodeId§parent: Option<NodeId>§role: SemanticsRole§bounds: Rect§flags: SemanticsFlags§test_id: Option<String>Debug/test-only identifier for deterministic automation.
This MUST NOT be mapped into platform accessibility name/label fields by default.
active_descendant: Option<NodeId>When this node retains actual keyboard focus but another descendant is the current
“active item” (e.g. composite widgets using aria-activedescendant), this points to that
active descendant node.
pos_in_set: Option<u32>1-based position of this node within a logical collection (e.g. listbox/menu items).
This is used to support accessible large/virtualized collections where only a window of items is present in the semantics snapshot.
set_size: Option<u32>Total number of items in the logical collection that this node belongs to.
This is used to support accessible large/virtualized collections where only a window of items is present in the semantics snapshot.
label: Option<String>Human-readable name/label for assistive technologies.
value: Option<String>Value text, typically for text fields and sliders.
extra: SemanticsNodeExtra§text_selection: Option<(u32, u32)>Text selection in UTF-8 byte offsets within value (ADR 0071).
This is (anchor, focus) to preserve selection direction for assistive technologies.
text_composition: Option<(u32, u32)>IME composition range in UTF-8 byte offsets within value (ADR 0071).
This is a best-effort signal for accessibility and may be omitted by implementations that cannot represent composition distinctly.
actions: SemanticsActionsSupported actions for assistive technologies and automation.
labelled_by: Vec<NodeId>Nodes which provide this node’s accessible name.
This is a portable approximation of relations such as aria-labelledby.
described_by: Vec<NodeId>Nodes which provide this node’s accessible description.
This is a portable approximation of relations such as aria-describedby.
controls: Vec<NodeId>Nodes which this node controls.
This is a portable approximation of relations such as aria-controls.
inline_spans: Vec<SemanticsInlineSpan>Inline semantics spans within this node’s value (v1 metadata-only surface).
Implementations§
Source§impl SemanticsNode
impl SemanticsNode
pub fn validate(&self) -> Result<(), SemanticsValidationError>
Trait Implementations§
Source§impl Clone for SemanticsNode
impl Clone for SemanticsNode
Source§fn clone(&self) -> SemanticsNode
fn clone(&self) -> SemanticsNode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more