Skip to main content

Module accessibility

Module accessibility 

Source

Structs§

AccessNodeBuilder
Builder wrapper around accesskit::Node for widget accessibility declarations.
AccessibilityInfo
Query result for accessibility information about a widget.
Announcement
A captured live-region announcement — the text a screen reader would have spoken when a Live::{Polite,Assertive} node’s value (or label) changed.
TextRunAttributes
Styling attributes surfaced to assistive technology on a synthetic Role::TextRun node (WCAG 1.3.1 Info and Relationships / EN 301 549 11.5.2.9 “text attributes”). All fields default to “unset”; a rich-text widget populates them per formatting run so a screen reader can convey bold / italic / underline / strikethrough spans. AccessKit has no dedicated bold property, so bold folds into set_font_weight(700) when no explicit font_weight is given.

Enums§

SyntheticKind
Discriminator kind for synthetic-NodeId hashing. Different kinds sharing the same (widget_id, element_id) tuple produce distinct NodeIds so paragraph and run nodes for the same source element don’t collide.

Functions§

is_synthetic
Whether a given NodeId is a synthetic child node (emitted by a widget via push_paragraph_child / push_text_run_child) rather than a widget-derived NodeId.
node_id_to_widget_id
Legacy infallible converter kept for existing call sites that never encounter synthetic NodeIds. New code should prefer node_id_to_widget_id_maybe. Panics in debug for synthetic ids to catch misrouted calls early.
node_id_to_widget_id_maybe
Convert an AccessKit NodeId back to a WidgetId. Returns None for synthetic NodeIds (widget-emitted child nodes like TextRuns); callers that need to route an ActionRequest targeting a synthetic NodeId must consult WidgetTree::synthetic_parent_map to find the owning widget.
root_node_id
The special root node ID for the accessibility tree.
synthetic_node_id
Stable hash of (parent widget, element id, kind) producing a synthetic NodeId that survives edits for as long as the underlying element id is stable. Used by AccessNodeBuilder’s sub-tree API to allocate NodeIds for paragraph / text-run children without colliding with widget-derived NodeIds.
widget_id_to_node_id
Convert a WidgetId to an AccessKit NodeId.