pub enum A11yRole {
Show 35 variants
Button,
Link,
TextInput,
TextArea,
Checkbox,
Switch,
Radio,
RadioGroup,
Slider,
ProgressBar,
ComboBox,
ListBox,
ListItem,
MenuBar,
Menu,
MenuItem,
MenuItemCheckbox,
MenuItemRadio,
Tab,
TabList,
TabPanel,
Tree,
TreeItem,
Toolbar,
Dialog,
AlertDialog,
Tooltip,
Status,
Alert,
Label,
Heading,
Group,
Region,
Landmark,
Generic,
}Expand description
Explicit accessibility role override. Maps to [accesskit::Role] through
the From<A11yRole> for accesskit::Role impl in lumen-a11y-accesskit.
- Absent component: role derived from primitives (
TextInput-> text input,Toggleable-> switch/checkbox,SliderValue-> slider, etc.). - Present component: this value wins. Markup author can pin a role with
role="dialog".
Variants§
Button
Push button.
Link
Hyperlink.
TextInput
Single-line text input. Distinct from Self::TextArea so screen
readers can announce single- vs multi-line behaviour.
TextArea
Multi-line text area.
Checkbox
Two-state checkbox.
Switch
Two-state on/off switch (checkbox semantics, switch presentation).
Distinct from Self::Checkbox so assistive tech announces it as a
switch (Role::Switch) - the role <switch> pins explicitly.
Radio
Single radio button. Pair with Self::RadioGroup.
RadioGroup
Container for a set of Self::Radio options.
Slider
Continuous bounded scalar control.
ProgressBar
Read-only progress indicator.
ComboBox
Drop-down combobox.
ListBox
Selectable list.
ListItem
One row in a Self::ListBox or Self::Tree.
MenuBar
Top-level menu bar (typically a window’s main menu).
Menu
Sub-menu container.
MenuItem
Action menu entry.
MenuItemCheckbox
Toggleable menu entry (checkbox-style).
MenuItemRadio
Menu entry inside a radio group.
Tab
Tab strip entry.
TabList
Container for Self::Tab entries.
TabPanel
Panel revealed by an active Self::Tab.
Tree
Tree container.
TreeItem
Single row inside a Self::Tree; use A11yLevel for depth.
Toolbar
Toolbar (typically a horizontal strip of Self::Buttons).
Dialog
Modal or modeless dialog.
AlertDialog
Alert dialog (modal, error-style).
Tooltip
Tooltip surface.
Status
Polite status region (live-region default).
Alert
Assertive alert region (live-region default).
Label
Visible label (typically associated via A11yRelations.labelled_by).
Heading
Heading; pair with A11yLevel for <h1>..<h6> depth.
Group
Generic grouping container (<fieldset>, <section>).
Region
Named landmark region (<aside>, <section role=region>).
Landmark
Page landmark (<header>, <footer>, <nav>, <main>).
Generic
Default generic container with no semantic role.
Trait Implementations§
Source§impl Component for A11yRole
impl Component for A11yRole
Source§const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::Table
const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::Table
Source§type Mutability = Mutable
type Mutability = Mutable
Component<Mutability = Mutable>,
while immutable components will instead have Component<Mutability = Immutable>. Read moreSource§fn register_required_components(
_requiree: ComponentId,
required_components: &mut RequiredComponentsRegistrator<'_, '_>,
)
fn register_required_components( _requiree: ComponentId, required_components: &mut RequiredComponentsRegistrator<'_, '_>, )
Source§fn clone_behavior() -> ComponentCloneBehavior
fn clone_behavior() -> ComponentCloneBehavior
Source§fn map_entities<M: EntityMapper>(this: &mut Self, mapper: &mut M)
fn map_entities<M: EntityMapper>(this: &mut Self, mapper: &mut M)
EntityMapper. This is used to remap entities in contexts like scenes and entity cloning.
When deriving Component, this is populated by annotating fields containing entities with #[entities] Read moreSource§fn relationship_accessor() -> Option<ComponentRelationshipAccessor<Self>>
fn relationship_accessor() -> Option<ComponentRelationshipAccessor<Self>>
ComponentRelationshipAccessor] required for working with relationships in dynamic contexts. Read more§fn on_discard() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_discard() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
§fn on_despawn() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_despawn() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Source§impl From<&SliderValue> for A11yRole
impl From<&SliderValue> for A11yRole
Source§fn from(_: &SliderValue) -> Self
fn from(_: &SliderValue) -> Self
Source§impl From<&Toggleable> for A11yRole
impl From<&Toggleable> for A11yRole
Source§fn from(_: &Toggleable) -> Self
fn from(_: &Toggleable) -> Self
impl Copy for A11yRole
impl Eq for A11yRole
impl StructuralPartialEq for A11yRole
Auto Trait Implementations§
impl Freeze for A11yRole
impl RefUnwindSafe for A11yRole
impl Send for A11yRole
impl Sync for A11yRole
impl Unpin for A11yRole
impl UnsafeUnpin for A11yRole
impl UnwindSafe for A11yRole
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<C> Bundle for Cwhere
C: Component,
impl<C> Bundle for Cwhere
C: Component,
fn component_ids( components: &mut ComponentsRegistrator<'_>, ) -> impl Iterator<Item = ComponentId> + use<C>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> DynEq for T
impl<T> DynEq for T
§impl<C> DynamicBundle for Cwhere
C: Component,
impl<C> DynamicBundle for Cwhere
C: Component,
§unsafe fn get_components(
ptr: MovingPtr<'_, C>,
func: &mut impl FnMut(StorageType, OwningPtr<'_>),
) -> <C as DynamicBundle>::Effect
unsafe fn get_components( ptr: MovingPtr<'_, C>, func: &mut impl FnMut(StorageType, OwningPtr<'_>), ) -> <C as DynamicBundle>::Effect
§unsafe fn apply_effect(
_ptr: MovingPtr<'_, MaybeUninit<C>>,
_entity: &mut EntityWorldMut<'_>,
)
unsafe fn apply_effect( _ptr: MovingPtr<'_, MaybeUninit<C>>, _entity: &mut EntityWorldMut<'_>, )
§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.