pub enum AccessRole {
Show 13 variants
None,
Label,
Heading,
Button,
CheckBox,
RadioButton,
TextInput,
MultilineTextInput,
ComboBox,
Image,
Link,
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
Link
A navigation target: to="/path", or an explicit role="link". Distinct
from a button because a screen reader announces it differently, and
because the distinction is what tells someone they are moving rather than
acting.
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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more