pub struct AccessibilityBuilder { /* private fields */ }Implementations§
Source§impl AccessibilityBuilder
impl AccessibilityBuilder
Sets role = Button and label in one call.
Sourcepub fn heading(&mut self, label: &str, level: u8) -> &mut Self
pub fn heading(&mut self, label: &str, level: u8) -> &mut Self
Sets role = Heading with the given level (1–6) and label.
Sourcepub fn static_text(&mut self, label: &str) -> &mut Self
pub fn static_text(&mut self, label: &str) -> &mut Self
Sets role = StaticText and label. For read-only informational text.
Sourcepub fn checkbox(&mut self, label: &str) -> &mut Self
pub fn checkbox(&mut self, label: &str) -> &mut Self
Sets role = Checkbox, label, and focusable.
Sourcepub fn role(&mut self, role: AccessibilityRole) -> &mut Self
pub fn role(&mut self, role: AccessibilityRole) -> &mut Self
Sets the role explicitly.
Sourcepub fn description(&mut self, desc: &str) -> &mut Self
pub fn description(&mut self, desc: &str) -> &mut Self
Sets the accessible description.
Sourcepub fn value(&mut self, value: &str) -> &mut Self
pub fn value(&mut self, value: &str) -> &mut Self
Sets the current value (for sliders, progress bars, etc.).
Sourcepub fn checked(&mut self, checked: bool) -> &mut Self
pub fn checked(&mut self, checked: bool) -> &mut Self
Sets the checked state (for checkboxes/radio buttons).
Sourcepub fn tab_index(&mut self, index: i32) -> &mut Self
pub fn tab_index(&mut self, index: i32) -> &mut Self
Sets the explicit tab index. Elements without a tab_index follow insertion order.
Sourcepub fn focus_right(&mut self, target: impl Into<Id>) -> &mut Self
pub fn focus_right(&mut self, target: impl Into<Id>) -> &mut Self
When the right arrow key is pressed while this element is focused, focus moves to the given target element.
Sourcepub fn focus_left(&mut self, target: impl Into<Id>) -> &mut Self
pub fn focus_left(&mut self, target: impl Into<Id>) -> &mut Self
When the left arrow key is pressed while this element is focused, focus moves to the given target element.
Sourcepub fn focus_up(&mut self, target: impl Into<Id>) -> &mut Self
pub fn focus_up(&mut self, target: impl Into<Id>) -> &mut Self
When the up arrow key is pressed while this element is focused, focus moves to the given target element.
Sourcepub fn focus_down(&mut self, target: impl Into<Id>) -> &mut Self
pub fn focus_down(&mut self, target: impl Into<Id>) -> &mut Self
When the down arrow key is pressed while this element is focused, focus moves to the given target element.
Sourcepub fn disable_ring(&mut self) -> &mut Self
pub fn disable_ring(&mut self) -> &mut Self
Disables the automatic focus ring on this element.
Sourcepub fn ring_color(&mut self, color: impl Into<Color>) -> &mut Self
pub fn ring_color(&mut self, color: impl Into<Color>) -> &mut Self
Sets the color of the focus ring. Default is red (255, 60, 40).
Sourcepub fn ring_width(&mut self, width: u16) -> &mut Self
pub fn ring_width(&mut self, width: u16) -> &mut Self
Sets the width (thickness) of the focus ring in pixels. Default is 2.
Sourcepub fn live_region_polite(&mut self) -> &mut Self
pub fn live_region_polite(&mut self) -> &mut Self
Sets the live region to polite — screen reader announces changes on next idle.
Sourcepub fn live_region_assertive(&mut self) -> &mut Self
pub fn live_region_assertive(&mut self) -> &mut Self
Sets the live region to assertive — screen reader interrupts to announce changes.