pub enum AccessRole {
None,
Label,
Heading,
Button,
CheckBox,
RadioButton,
TextInput,
MultilineTextInput,
ComboBox,
Image,
ScrollView,
Group,
}Expand description
What an element is, for assistive technology. Deliberately a small enum
owned by the layout rather than an accesskit type: the layout stays free of
the platform a11y crate, and only the shell translates these.
Resolved during the build, where the tag, the type= and the role=
attribute are all still in hand, deriving it later from painted output would
be guesswork.
Variants§
None
Not interesting to a screen reader on its own (a plain layout box).
Label
Static text.
Heading
Button
CheckBox
RadioButton
TextInput
MultilineTextInput
type="textarea".
ComboBox
type="select".
Image
ScrollView
A box that scrolls its content.
Group
A meaningful grouping (an explicit role= we don’t map more precisely).
Implementations§
Source§impl AccessRole
impl AccessRole
Sourcepub fn is_meaningful(self) -> bool
pub fn is_meaningful(self) -> bool
Does this element carry meaning worth exposing at all?
Trait Implementations§
Source§impl Clone for AccessRole
impl Clone for AccessRole
Source§fn clone(&self) -> AccessRole
fn clone(&self) -> AccessRole
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AccessRole
Source§impl Debug for AccessRole
impl Debug for AccessRole
Source§impl Default for AccessRole
impl Default for AccessRole
Source§fn default() -> AccessRole
fn default() -> AccessRole
Returns the “default value” for a type. Read more
impl Eq for AccessRole
Source§impl PartialEq for AccessRole
impl PartialEq for AccessRole
impl StructuralPartialEq for AccessRole
Auto Trait Implementations§
impl Freeze for AccessRole
impl RefUnwindSafe for AccessRole
impl Send for AccessRole
impl Sync for AccessRole
impl Unpin for AccessRole
impl UnsafeUnpin for AccessRole
impl UnwindSafe for AccessRole
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