Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

AccessSubtreeMode

Built-in SceneItem implementations.

Public types

KindName
enumAccessSubtreeMode — How the AT walker treats descendants of an item
structItemA11yOverrides — Builder-level accessibility overrides shared by every built-in SceneItem
fnaccess_label — Override the AT name announced for this item
fnaccess_description — Long-form context appended to the item's announcement
fnaccess_role — Override the AccessKit role for this item
fnaccess_hidden — Hide this item from the AT tree
fnaccess_subtree — Set the AT subtree mode
fnaccess_merge_subtree — Convenience: collapse all descendants into this item's AT node so the subtree reads as one element
fnaccess_exclude_subtree — Convenience: prune all descendants from the AT tree
fnaccess_value — Announce a string value for this item (e.g. a formatted data reading like "42 %")
fnaccess_numeric_value — Announce a numeric value for this item, for slider/gauge-like data marks whose magnitude assistive tech should describe
fnaccess_numeric_range — Announce the numeric min/max bounds for this item
fnaccess_numeric_step — Announce the numeric step (per-arrow increment) for this item

Public functions

ItemA11yOverrides

ReturnsFunction
Methods
AccessSubtreeModesubtree_mode()

Detailed description

Five lightweight items cover the common decoration cases:

  • RectItem — filled / stroked rectangle. Backgrounds, tiles, simple decorations.
  • PathItem — arbitrary vector path with optional fill and stroke. The "connector lines between cards" workhorse, with per-segment hit-test for stroke-only paths.
  • ImageItem — a raster image at a local-coord rectangle.
  • TextItem — unstyled text in a local-coord rectangle, static string or signal-bound.
  • GroupItem — a group container with optional fill / stroke / inline label. Visually a labelled box; non-visual groups serve as logical AT containers (Scene::add_a11y_group).

All built-ins store their geometry in local item coordinates anchored at the origin. Apps construct an item with its size at origin (RectItem::new(Rect::new(0.0, 0.0, w, h))) and place it in the scene with Scene::add_item(item, local_pos).

API reference

📖 Full rustdoc API for this module

pub enum AccessSubtreeMode

Import: use teksilo_scene::AccessSubtreeMode; — add teksilo-scene to [dependencies]: teksilo does not re-export it.

How the AT walker treats descendants of an item.

Mirrors the widget-tier AccessSubtreeMode: Inherit is the default (descendants emit normally); Exclude prunes them from the AT tree; Merge collapses them into the parent so the subtree reads as a single AT element. Used for "card with rect + label + indicator dot reads as one card" patterns.

#![allow(unused)]
fn main() {
pub enum AccessSubtreeMode { /* variants */ }
}

Variants

  • Inherit — Descendants emit their own AT nodes normally. Default.
  • Exclude — Descendants are pruned from the AT tree; the parent item emits as a single AT node with no children.
  • Merge — Descendants' label / description / actions are folded into the parent AT node; descendants are then pruned. The subtree reads as one AT element — useful for "card with icon + label + badge = one selectable card" patterns.

pub struct ItemA11yOverrides

Import: none — ItemA11yOverrides is public in a private module of teksilo-scene and nothing re-exports it.

Builder-level accessibility overrides shared by every built-in SceneItem. Mirrors the widget-level .access_* chain — names match so muscle memory carries over.

#![allow(unused)]
fn main() {
pub struct ItemA11yOverrides { /* fields */ }
}

Methods

pub fn subtree_mode(&self) -> AccessSubtreeMode

Read access for the AT walker.

pub fn access_label(...)

Import: none — access_label is public in a private module of teksilo-scene and nothing re-exports it.

Override the AT name announced for this item. Accepts anything convertible into LocalizedString — most commonly tr!(...) for translated labels, or any plain string (which auto-converts via From<String>).

#![allow(unused)]
fn main() {
pub fn access_label(mut self, label: impl Into<LocalizedString>) -> Self;
}

pub fn access_description(...)

Import: none — access_description is public in a private module of teksilo-scene and nothing re-exports it.

Long-form context appended to the item's announcement.

#![allow(unused)]
fn main() {
pub fn access_description(mut self, description: impl Into<LocalizedString>) -> Self;
}

pub fn access_role(...)

Import: none — access_role is public in a private module of teksilo-scene and nothing re-exports it.

Override the AccessKit role for this item.

#![allow(unused)]
fn main() {
pub fn access_role(mut self, role: accesskit::Role) -> Self;
}

pub fn access_hidden(...)

Import: none — access_hidden is public in a private module of teksilo-scene and nothing re-exports it.

Hide this item from the AT tree.

#![allow(unused)]
fn main() {
pub fn access_hidden(mut self, hidden: bool) -> Self;
}

pub fn access_subtree(...)

Import: none — access_subtree is public in a private module of teksilo-scene and nothing re-exports it.

Set the AT subtree mode. Merge collapses descendants into this item's AT node; Exclude prunes them; the default Inherit lets them emit normally.

#![allow(unused)]
fn main() {
pub fn access_subtree(mut self, mode: $crate::items::AccessSubtreeMode) -> Self;
}

pub fn access_merge_subtree(...)

Import: none — access_merge_subtree is public in a private module of teksilo-scene and nothing re-exports it.

Convenience: collapse all descendants into this item's AT node so the subtree reads as one element.

#![allow(unused)]
fn main() {
pub fn access_merge_subtree(mut self) -> Self;
}

pub fn access_exclude_subtree(...)

Import: none — access_exclude_subtree is public in a private module of teksilo-scene and nothing re-exports it.

Convenience: prune all descendants from the AT tree.

#![allow(unused)]
fn main() {
pub fn access_exclude_subtree(mut self) -> Self;
}

pub fn access_value(...)

Import: none — access_value is public in a private module of teksilo-scene and nothing re-exports it.

Announce a string value for this item (e.g. a formatted data reading like "42 %"). Mirrors the widget-tier .access_value.

#![allow(unused)]
fn main() {
pub fn access_value(mut self, value: impl Into<LocalizedString>) -> Self;
}

pub fn access_numeric_value(...)

Import: none — access_numeric_value is public in a private module of teksilo-scene and nothing re-exports it.

Announce a numeric value for this item, for slider/gauge-like data marks whose magnitude assistive tech should describe. Pair with access_numeric_range / access_numeric_step for full range semantics.

#![allow(unused)]
fn main() {
pub fn access_numeric_value(mut self, value: f64) -> Self;
}

pub fn access_numeric_range(...)

Import: none — access_numeric_range is public in a private module of teksilo-scene and nothing re-exports it.

Announce the numeric min/max bounds for this item.

#![allow(unused)]
fn main() {
pub fn access_numeric_range(mut self, min: f64, max: f64) -> Self;
}

pub fn access_numeric_step(...)

Import: none — access_numeric_step is public in a private module of teksilo-scene and nothing re-exports it.

Announce the numeric step (per-arrow increment) for this item.

#![allow(unused)]
fn main() {
pub fn access_numeric_step(mut self, step: f64) -> Self;
}