pub struct A11yNodeProps {Show 19 fields
pub description: Option<String>,
pub placeholder: Option<String>,
pub key_shortcut: Option<String>,
pub disabled: bool,
pub expanded: Option<bool>,
pub selected: Option<bool>,
pub checked: Option<CheckedState>,
pub value_now: Option<f64>,
pub value_min: Option<f64>,
pub value_max: Option<f64>,
pub value_step: Option<f64>,
pub text_value: Option<String>,
pub text_selection: Option<TextSelection>,
pub labelled_by: Vec<NodeId>,
pub described_by: Vec<NodeId>,
pub controlled_by: Vec<NodeId>,
pub owns: Vec<NodeId>,
pub text_run_children: Vec<TextRunChild>,
pub tab_index: Option<u32>,
}Expand description
Rich property bag attached to every crate::tree::A11yNode.
All fields are optional / defaulted so that callers only set what they need. The tree builder reads these fields and forwards them to the corresponding AccessKit setters.
Fields§
§description: Option<String>Longer description of the widget (ARIA aria-describedby-equivalent text).
placeholder: Option<String>Placeholder text for empty text inputs.
key_shortcut: Option<String>Keyboard shortcut that activates this widget (e.g. "Ctrl+S").
disabled: booltrue if the widget is non-interactive.
expanded: Option<bool>Expanded state: Some(true) = expanded, Some(false) = collapsed,
None = not expandable.
selected: Option<bool>Selected state: Some(true/false) = selectable, None = not selectable.
checked: Option<CheckedState>Checked / toggle state; None = not checkable.
value_now: Option<f64>Current numeric value (sliders, progress bars, spinners).
value_min: Option<f64>Minimum allowed numeric value.
value_max: Option<f64>Maximum allowed numeric value.
value_step: Option<f64>Step increment for the numeric value.
text_value: Option<String>Text content / string value of the node.
text_selection: Option<TextSelection>Text selection (anchor + focus byte offsets).
labelled_by: Vec<NodeId>Nodes that label this node (ARIA aria-labelledby).
described_by: Vec<NodeId>Nodes that describe this node (ARIA aria-describedby).
controlled_by: Vec<NodeId>Nodes that this node controls (ARIA aria-controls).
owns: Vec<NodeId>Nodes that this node logically owns but that are not DOM descendants.
text_run_children: Vec<TextRunChild>Synthesized text-run child segments for caret/selection exposure.
Populated by crate::tree::synthesize_text_run_children for text
nodes that carry a TextSelection. Empty by default.
tab_index: Option<u32>Explicit tab index controlling keyboard-focus order.
None / Some(0) = natural document order; Some(n) where n > 0 =
explicit position (lower values receive focus first). Interpreted by
crate::nav::TabOrder::compute.
Trait Implementations§
Source§impl Clone for A11yNodeProps
impl Clone for A11yNodeProps
Source§fn clone(&self) -> A11yNodeProps
fn clone(&self) -> A11yNodeProps
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for A11yNodeProps
impl Debug for A11yNodeProps
Source§impl Default for A11yNodeProps
impl Default for A11yNodeProps
Source§fn default() -> A11yNodeProps
fn default() -> A11yNodeProps
Auto Trait Implementations§
impl Freeze for A11yNodeProps
impl RefUnwindSafe for A11yNodeProps
impl Send for A11yNodeProps
impl Sync for A11yNodeProps
impl Unpin for A11yNodeProps
impl UnsafeUnpin for A11yNodeProps
impl UnwindSafe for A11yNodeProps
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more