pub struct A11yProps {
pub label: Option<String>,
pub hint: Option<String>,
pub value: Option<String>,
pub role: Role,
pub identifier: Option<String>,
pub hidden: bool,
pub decorative: bool,
}Fields§
§label: Option<String>§hint: Option<String>§value: Option<String>§role: Role§identifier: Option<String>§decorative: boolImplementations§
Source§impl A11yProps
impl A11yProps
Sourcepub fn merge(&mut self, other: &A11yProps)
pub fn merge(&mut self, other: &A11yProps)
Merge another set of annotations onto this one: any field other sets — a Some, a
non-None role, or a true flag — overrides ours; unset fields are left intact. Lets a
node accumulate its .a11y(), .id(), and piece defaults into one stored result, so
each set_a11y re-applies the full picture and a11y_audit has the complete expectation.
Sourcepub fn resolved_role(&self, kind: PieceKind) -> Role
pub fn resolved_role(&self, kind: PieceKind) -> Role
The role to expect for a node of kind carrying these annotations: an explicit
.role() wins, otherwise the kind’s native default (Role::for_kind).
Trait Implementations§
impl StructuralPartialEq for A11yProps
Auto Trait Implementations§
impl Freeze for A11yProps
impl RefUnwindSafe for A11yProps
impl Send for A11yProps
impl Sync for A11yProps
impl Unpin for A11yProps
impl UnsafeUnpin for A11yProps
impl UnwindSafe for A11yProps
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