Enum AccessibleRole
#[non_exhaustive]#[repr(u32)]pub enum AccessibleRole {
Show 29 variants
None = 0,
Button = 1,
Checkbox = 2,
Combobox = 3,
Groupbox = 4,
Image = 5,
List = 6,
Slider = 7,
Spinbox = 8,
Tab = 9,
TabList = 10,
TabPanel = 11,
Text = 12,
Table = 13,
Tree = 14,
ProgressIndicator = 15,
TextInput = 16,
Switch = 17,
ListItem = 18,
RadioButton = 19,
RadioGroup = 20,
Banner = 21,
Complementary = 22,
ContentInfo = 23,
Form = 24,
Main = 25,
Navigation = 26,
Region = 27,
Search = 28,
}Expand description
This enum represents the different values for the accessible-role property, used to describe the
role of an element in the context of assistive technology such as screen readers.
In addition to widget roles, this enum includes landmark roles (banner, complementary,
content-info, form, main, navigation, region, search).
Landmarks identify large content areas that screen reader users can jump between,
giving the application a navigable structure similar to headings in a document.
See WAI-ARIA Landmark Regions
for guidance on when and how to use them.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
None = 0
The element isn’t accessible.
Button = 1
The element is a Button or behaves like one.
Checkbox = 2
The element is a CheckBox or behaves like one.
Combobox = 3
The element is a ComboBox or behaves like one.
Groupbox = 4
The element is a GroupBox or behaves like one.
Image = 5
The element is an Image or behaves like one. This is automatically applied to Image elements.
List = 6
The element is a ListView or behaves like one.
Slider = 7
The element is a Slider or behaves like one.
Spinbox = 8
The element is a SpinBox or behaves like one.
Tab = 9
The element is a Tab or behaves like one.
TabList = 10
The element is similar to the tab bar in a TabWidget.
TabPanel = 11
The element is a container for tab content.
Text = 12
The role for a Text element. This is automatically applied to Text elements.
Table = 13
The role for a TableView or behaves like one.
Tree = 14
The role for a TreeView or behaves like one. (Not provided yet)
ProgressIndicator = 15
The element is a ProgressIndicator or behaves like one.
TextInput = 16
The role for widget with editable text such as a LineEdit or a TextEdit.
This is automatically applied to TextInput elements.
Switch = 17
The element is a Switch or behaves like one.
ListItem = 18
The element is an item in a ListView.
RadioButton = 19
The element is a RadioButton or behaves like one.
RadioGroup = 20
The element is a container grouping related RadioButtons.
Banner = 21
Landmark: the header area of the application, typically containing a logo, title, or global navigation.
Complementary = 22
Landmark: a supporting section that complements the main content, such as a sidebar.
ContentInfo = 23
Landmark: information about the application or its content, typically at the bottom (e.g. status bar, copyright).
Form = 24
Landmark: a region containing input fields and controls for submitting information.
Main = 25
Landmark: the primary content of the application. Each view should have exactly one main landmark.
Landmark: a group of links or controls used for navigating the application.
Region = 27
Landmark: a generic section significant enough to be listed in a summary. Use a more specific landmark if one applies.
Search = 28
Landmark: a region containing controls for searching or filtering content.
Trait Implementations§
§impl Clone for AccessibleRole
impl Clone for AccessibleRole
§fn clone(&self) -> AccessibleRole
fn clone(&self) -> AccessibleRole
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for AccessibleRole
§impl Debug for AccessibleRole
impl Debug for AccessibleRole
§impl Default for AccessibleRole
impl Default for AccessibleRole
§fn default() -> AccessibleRole
fn default() -> AccessibleRole
§impl Display for AccessibleRole
impl Display for AccessibleRole
impl Eq for AccessibleRole
§impl FromStr for AccessibleRole
impl FromStr for AccessibleRole
§impl Hash for AccessibleRole
impl Hash for AccessibleRole
§impl PartialEq for AccessibleRole
impl PartialEq for AccessibleRole
impl StructuralPartialEq for AccessibleRole
§impl TryFrom<&str> for AccessibleRole
impl TryFrom<&str> for AccessibleRole
Auto Trait Implementations§
impl Freeze for AccessibleRole
impl RefUnwindSafe for AccessibleRole
impl Send for AccessibleRole
impl Sync for AccessibleRole
impl Unpin for AccessibleRole
impl UnsafeUnpin for AccessibleRole
impl UnwindSafe for AccessibleRole
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
impl<T> Brush for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
SharedString].