Skip to main content

A11yNodeProps

Struct A11yNodeProps 

Source
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: bool

true 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

Source§

fn clone(&self) -> A11yNodeProps

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for A11yNodeProps

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for A11yNodeProps

Source§

fn default() -> A11yNodeProps

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.