Expand description
Thin facade for the use-accessibility workspace.
The crate reexports the focused accessibility crates directly so consumers can opt into one dependency while still using the smaller APIs.
§Examples
use use_accessibility::*;
let ratio = contrast_ratio(
RgbColor {
red: 0,
green: 0,
blue: 0,
},
RgbColor {
red: 255,
green: 255,
blue: 255,
},
);
let target = TouchTarget::new(48.0, 44.0).unwrap();
let label = AccessibleLabel::new("Submit order").unwrap();
assert!(passes_normal_text_aaa(ratio));
assert!(target.is_recommended_size());
assert_eq!(label.word_count(), 2);Re-exports§
pub use use_accessibility_check;pub use use_accessibility_score;pub use use_accessible_label;pub use use_contrast;pub use use_focus_order;pub use use_motion_preference;pub use use_readable_text;pub use use_touch_target;
Structs§
- Accessibility
Check Result - Accessibility
Issue - Accessibility
Score - Accessible
Label - Focus
Item - RgbColor
- Text
Size - Touch
Target
Enums§
- Accessibility
Score Error - Accessibility
Severity - Accessible
Label Error - Animation
Policy - Check
Status - Contrast
Error - Contrast
Level - Motion
Preference - Readable
Text Error - Touch
Target Error
Functions§
- adjust_
duration_ ms - animation_
policy - characters_
per_ line - classify_
large_ text - classify_
normal_ text - contrast_
ratio - count_
failed - count_
passed - count_
warnings - enabled_
focus_ items - filter_
by_ severity - has_
accessible_ label - has_
duplicate_ focus_ order - has_
empty_ focus_ id - has_
errors - has_
warnings - is_
focus_ order_ valid - is_
label_ too_ long - is_
line_ height_ readable - is_
measure_ readable - is_
touch_ target_ recommended - issue_
count - label_
word_ count - line_
height_ ratio - minimum_
touch_ target_ px - normalize_
accessible_ label - passes_
large_ text_ aa - passes_
large_ text_ aaa - passes_
normal_ text_ aa - passes_
normal_ text_ aaa - relative_
luminance - score_
results - should_
disable_ animation - should_
reduce_ motion - sorted_
focus_ order - touch_
target_ area