Skip to main content

A11yBridge

Trait A11yBridge 

Source
pub trait A11yBridge: Send {
    // Required methods
    fn publish_tree(&mut self, nodes: &[SemNode]);
    fn focus_changed(&mut self, node: Option<&SemNode>);
    fn announce(&mut self, msg: &str);
}
Expand description

Bridge from Repose’s semantics tree to platform accessibility APIs.

Implementations are responsible for:

  • Exposing nodes to the OS (AT‑SPI, Android accessibility, etc.).
  • Updating focus when focus_changed is called.
  • Announcing transient messages (e.g. button activation) via screen readers.

Required Methods§

Source

fn publish_tree(&mut self, nodes: &[SemNode])

Publish (or update) the full semantics tree for the current frame.

Source

fn focus_changed(&mut self, node: Option<&SemNode>)

Notify that the focused node has changed. None means focus cleared.

Source

fn announce(&mut self, msg: &str)

Announce a one‑off message via the platform’s accessibility channel.

Implementors§