pub enum Role {
Button,
Text,
TextInput,
Image,
Checkbox,
Switch,
Dialog,
Slider,
Input,
List,
ListItem,
Generic,
}Expand description
The accessibility role of a node.
Roles tell screen readers and other assistive technology what kind of control a node represents. Choose the most specific role that applies.
Variants§
Button
A clickable button that triggers an action.
Text
A read-only text label.
TextInput
An editable text field (single or multi-line).
Image
A raster or vector image.
Checkbox
A toggle that is either checked or unchecked.
Switch
A toggle switch (on/off).
Dialog
A modal or non-modal dialog overlay.
Slider
A continuous range input (e.g., volume control).
Input
A generic form input that does not fit the other roles.
List
A scrollable list container.
ListItem
An individual item inside a List.
Generic
A node with no specific semantic role. The default.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Role
impl<'de> Deserialize<'de> for Role
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for Role
impl Eq for Role
impl StructuralPartialEq for Role
Auto Trait Implementations§
impl Freeze for Role
impl RefUnwindSafe for Role
impl Send for Role
impl Sync for Role
impl Unpin for Role
impl UnsafeUnpin for Role
impl UnwindSafe for Role
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more