pub trait AccessibilityProvider {
    // Required methods
    fn push_node(&mut self, id: NodeId, node: Node);
    fn node_classes(&mut self) -> &mut NodeClassSet;
    fn nodes(&self) -> Iter<'_, (NodeId, Node)>;
    fn focus_id(&self) -> NodeId;
    fn set_focus(&mut self, new_focus_id: NodeId);

    // Provided methods
    fn add_node(
        &mut self,
        dioxus_node: &NodeRef<'_, CustomAttributeValues>,
        node_areas: &NodeAreas,
        accessibility_id: NodeId,
        node_accessibility: &AccessibilityNodeState
    ) { ... }
    fn set_focus_with_update(
        &mut self,
        new_focus_id: NodeId
    ) -> Option<TreeUpdate> { ... }
    fn build_root(&mut self, root_name: &str) -> Node { ... }
    fn process(&mut self, root_id: NodeId, root_name: &str) -> TreeUpdate { ... }
    fn set_focus_on_next_node(
        &mut self,
        direction: AccessibilityFocusDirection
    ) -> TreeUpdate { ... }
}

Required Methods§

fn push_node(&mut self, id: NodeId, node: Node)

Push a Node into the Accesibility Tree.

fn node_classes(&mut self) -> &mut NodeClassSet

Mutable reference to the NodeClassSet.

fn nodes(&self) -> Iter<'_, (NodeId, Node)>

Iterator over the Accessibility Tree of Nodes.

fn focus_id(&self) -> NodeId

Get the currently focused Node’s ID.

fn set_focus(&mut self, new_focus_id: NodeId)

Update the focused Node ID.

Provided Methods§

fn add_node( &mut self, dioxus_node: &NodeRef<'_, CustomAttributeValues>, node_areas: &NodeAreas, accessibility_id: NodeId, node_accessibility: &AccessibilityNodeState )

Add a Node to the Accessibility Tree.

fn set_focus_with_update(&mut self, new_focus_id: NodeId) -> Option<TreeUpdate>

Update the focused Node ID and generate a TreeUpdate if necessary.

fn build_root(&mut self, root_name: &str) -> Node

Create the root Accessibility Node.

fn process(&mut self, root_id: NodeId, root_name: &str) -> TreeUpdate

Process the Nodes accessibility Tree

fn set_focus_on_next_node( &mut self, direction: AccessibilityFocusDirection ) -> TreeUpdate

Focus the next/previous Node starting from the currently focused Node.

Implementors§