pub struct PaneAccessibilityPreferences {
pub reduced_motion: bool,
pub high_contrast: bool,
pub large_target: bool,
}Expand description
Host-agnostic accessibility preferences for pane interaction (bd-21pbi.5).
These three adaptive modes are applied uniformly across hosts so a pointer-free, low-vision, or touch user gets the same behavior in the terminal and in the browser:
- Reduced motion collapses affordance micro-animations to instant steps
(see
PaneAffordanceMotion) — the state change is preserved, the motion is not. - High contrast lifts splitter / focus-ring affordance colors to WCAG
AAA (applied by the host theme; see
ftui_style::PaneAffordanceTheme, which takes this flag). - Large target enlarges splitter handles / hit regions for precision and
touch ergonomics (see
enlarge_target).
Crucially, none of these modes changes the keyboard command vocabulary, the
focus graph, or announcements — pane semantics are mode-invariant. They are
not inputs to resolve at all; they only affect presentation (motion,
color, size). This is what keeps keyboard/focus behavior deterministic and
identical regardless of the active accessibility modes.
Fields§
§reduced_motion: boolCollapse affordance micro-animations to instant steps.
high_contrast: boolUse high-contrast (WCAG AAA) affordance colors.
large_target: boolEnlarge splitter handles / hit regions.
Implementations§
Source§impl PaneAccessibilityPreferences
impl PaneAccessibilityPreferences
Sourcepub const fn with_reduced_motion(self, on: bool) -> Self
pub const fn with_reduced_motion(self, on: bool) -> Self
Set the reduced-motion preference.
Sourcepub const fn with_high_contrast(self, on: bool) -> Self
pub const fn with_high_contrast(self, on: bool) -> Self
Set the high-contrast preference.
Sourcepub const fn with_large_target(self, on: bool) -> Self
pub const fn with_large_target(self, on: bool) -> Self
Set the large-target preference.
Sourcepub fn affordance_motion(self) -> PaneAffordanceMotion
pub fn affordance_motion(self) -> PaneAffordanceMotion
The affordance micro-animation policy implied by these preferences: the default timing, with motion stepped when reduced-motion is set.
Sourcepub fn enlarge_target(self, base: u16) -> u16
pub fn enlarge_target(self, base: u16) -> u16
The minimum interactive target size (in cells) for a base size.
In large-target mode a base of n cells grows to ~150% (rounded up),
with at least a +1-cell bump so even a 1-cell rail becomes easier to hit;
otherwise base is returned unchanged. Monotonic non-decreasing in
base, and never smaller than base.
Trait Implementations§
Source§impl Clone for PaneAccessibilityPreferences
impl Clone for PaneAccessibilityPreferences
Source§fn clone(&self) -> PaneAccessibilityPreferences
fn clone(&self) -> PaneAccessibilityPreferences
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PaneAccessibilityPreferences
Source§impl Debug for PaneAccessibilityPreferences
impl Debug for PaneAccessibilityPreferences
Source§impl Default for PaneAccessibilityPreferences
impl Default for PaneAccessibilityPreferences
Source§fn default() -> PaneAccessibilityPreferences
fn default() -> PaneAccessibilityPreferences
impl Eq for PaneAccessibilityPreferences
Source§impl PartialEq for PaneAccessibilityPreferences
impl PartialEq for PaneAccessibilityPreferences
Source§fn eq(&self, other: &PaneAccessibilityPreferences) -> bool
fn eq(&self, other: &PaneAccessibilityPreferences) -> bool
self and other values to be equal, and is used by ==.