pub struct Accessibility {
pub bold_text: bool,
pub high_contrast: bool,
pub disable_animations: bool,
pub invert_colors: bool,
pub accessible_navigation: bool,
pub always_use_24_hour_format: bool,
}Expand description
The accessibility settings the platform reports about its user.
The reference carries these on MediaQueryData as separate booleans; they are one
struct here because they arrive from one query and are read together, and because a
widget that honours one usually honours its neighbours.
Honoured by the framework: disable_animations. The
rest are reported for the application to act on — saying so is more useful than a
field that looks obeyed and is not.
Fields§
§bold_text: boolThe user has asked for heavier text everywhere.
high_contrast: boolThe user has asked for higher contrast than the design’s own.
disable_animations: boolThe user has asked for motion to be reduced or removed.
The framework honours this for its implicit animations — the ones a widget starts by itself when a value changes — by completing them at once instead of over time. The change still happens; it stops moving. That is what the setting asks for, and skipping the change instead would leave the interface wrong rather than still.
invert_colors: boolThe user has asked for inverted colours.
Something is reading the screen aloud, or otherwise driving it without a pointer.
A hint rather than an instruction: it is how an interface knows that a control which only appears on hover will never appear.
always_use_24_hour_format: boolThe user’s clock format — true for 24-hour, false for 12.
Implementations§
Source§impl Accessibility
impl Accessibility
Sourcepub fn with_overrides(self, over: AccessibilityOverrides) -> Self
pub fn with_overrides(self, over: AccessibilityOverrides) -> Self
The platform’s answer with an application’s AccessibilityOverrides laid over it.