pub struct A11yBuilder(/* private fields */);Implementations§
Source§impl A11yBuilder
impl A11yBuilder
pub fn label(self, s: impl Into<String>) -> Self
pub fn hint(self, s: impl Into<String>) -> Self
Sourcepub fn value(self, s: impl Into<String>) -> Self
pub fn value(self, s: impl Into<String>) -> Self
The control’s current value read aloud by the screen reader (e.g. a Meter’s “72%”).
pub fn role(self, r: Role) -> Self
Hide this element from assistive tech (still visible on screen) — e.g. a redundant chrome element already announced by its labelled sibling.
Sourcepub fn decorative(self) -> Self
pub fn decorative(self) -> Self
Purely decorative (a background flourish): hidden from assistive tech and, for images, exempt from the “needs a label” lint (§13).
Trait Implementations§
Source§impl Default for A11yBuilder
impl Default for A11yBuilder
Source§fn default() -> A11yBuilder
fn default() -> A11yBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for A11yBuilder
impl RefUnwindSafe for A11yBuilder
impl Send for A11yBuilder
impl Sync for A11yBuilder
impl Unpin for A11yBuilder
impl UnsafeUnpin for A11yBuilder
impl UnwindSafe for A11yBuilder
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more