pub struct Semantics {Show 22 fields
pub role: Role,
pub label: Option<String>,
pub focused: bool,
pub enabled: bool,
pub selectable_group: bool,
pub checked: Option<bool>,
pub selected: Option<bool>,
pub value: Option<String>,
pub heading: bool,
pub live_region: Option<LiveRegion>,
pub state_description: Option<String>,
pub traversal_index: Option<f32>,
pub is_traversal_group: bool,
pub hidden: bool,
pub collection_rows: Option<usize>,
pub collection_columns: Option<usize>,
pub row_index: Option<usize>,
pub column_index: Option<usize>,
pub progress: Option<ProgressRangeInfo>,
pub error: Option<String>,
pub expanded: Option<bool>,
pub test_tag: Option<String>,
}Expand description
Semantics attached to a View, used to build the accessibility tree.
Fields§
§role: RolePrimary role of this node (what kind of thing it is).
label: Option<String>Human‑readable label for screen readers. For buttons, this is the “name” that is announced.
focused: boolWhether this node is currently focused.
enabled: boolWhether this node is actionable. Disabled nodes remain in the tree but are marked not enabled.
selectable_group: boolMarks this node as a collection of horizontally or vertically stacked selectable elements (ex: Tabs, RadioButtons).
checked: Option<bool>§selected: Option<bool>§value: Option<String>§heading: bool§live_region: Option<LiveRegion>§state_description: Option<String>§traversal_index: Option<f32>§is_traversal_group: bool§collection_rows: Option<usize>§collection_columns: Option<usize>§row_index: Option<usize>§column_index: Option<usize>§progress: Option<ProgressRangeInfo>§error: Option<String>§expanded: Option<bool>§test_tag: Option<String>Test-only identifier, mirroring Compose’s Modifier.testTag.
Implementations§
Source§impl Semantics
impl Semantics
pub fn new(role: Role) -> Self
pub fn with_label(self, label: impl Into<String>) -> Self
pub fn with_selectable_group(self) -> Self
pub fn with_checked(self, checked: bool) -> Self
pub fn with_selected(self, selected: bool) -> Self
pub fn with_value(self, value: impl Into<String>) -> Self
pub fn with_heading(self) -> Self
pub fn with_live_region(self, region: LiveRegion) -> Self
pub fn with_state_description(self, description: impl Into<String>) -> Self
pub fn with_traversal_index(self, index: f32) -> Self
pub fn with_traversal_group(self) -> Self
pub fn with_collection(self, rows: usize, columns: usize) -> Self
pub fn with_collection_item(self, row: usize, column: usize) -> Self
pub fn with_progress_range(self, info: ProgressRangeInfo) -> Self
pub fn with_error(self, message: impl Into<String>) -> Self
pub fn with_expanded(self, expanded: bool) -> Self
pub fn with_test_tag(self, tag: impl Into<String>) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Forget for Semantics
impl Freeze for Semantics
impl Move for Semantics
impl RefUnwindSafe for Semantics
impl Send for Semanticswhere
RawVecInner: Send,
impl Sync for Semanticswhere
RawVecInner: Sync,
impl Unpin for Semantics
impl UnsafeUnpin for Semantics
impl UnwindSafe for Semanticswhere
RawVecInner: UnwindSafe,
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