Module screen_reader
Expand description
Built-in screen reader.
Narrates the semantic tree (crate::a11y::AccessNode) through an
offline TTS stack. Focus changes interrupt the previous utterance;
everything funnels through one [SpeechQueue], so a
focus storm coalesces to the latest utterance instead of backing up.
describe is the pure core (AccessNode -> String, no I/O) —
exhaustively unit-tested below as a role x state truth table.
A reading cursor can also walk the flattened accessible tree (DFS,
presentational nodes collapsed) via ScreenReader::read_all /
read_next / read_prev.
Narration vocabulary resolves through i18n! bundles;
with none loaded it falls back to English so headless builds narrate
unchanged.
Structs§
Functions§
- describe
- Compose the spoken phrase for an accessible node — the pure, heavily unit-tested core of the screen reader.
- describe_
state - Value + state, without name or role — confirms the result of activating or adjusting a control (e.g. “checked”) without re-reading the whole label.
- flatten_
reading_ order - DFS, collapsing presentational widgets (
accessibility() == None) exactly ascrate::accesskit_bridge::build_tree_updatedoes. - is_
form_ field - Deliberately covers the editable + actionable controls (buttons, toggles, inputs, ranges, selectors) but not structural containers or static content.
- is_
heading