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
Source§impl From<AccessibleRole> for Value
impl From<AccessibleRole> for Value
Source§fn from(v: AccessibleRole) -> Value
fn from(v: AccessibleRole) -> Value
§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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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<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
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().impl<T> Scalar for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.SharedString.