Accessibility Service
Component Detail
Service Layer
high complexity
Shared Component
mobile
1
Dependencies
4
Dependents
0
Entities
0
Integrations
Description
Central service managing runtime accessibility state, screen reader detection, font scaling, and focus traversal order across the application. Provides reactive streams that widgets subscribe to for adapting layout and semantics based on the user's active accessibility settings.
accessibility-service
Responsibilities
- Detect active screen reader (VoiceOver on iOS, TalkBack on Android) and expose as stream
- Monitor system font scale and notify widgets to adapt layouts when scale exceeds thresholds
- Validate contrast ratios at runtime for dynamic color combinations against WCAG 4.5:1 and 3:1 rules
- Manage explicit focus traversal order for multi-step form flows and dialogs
- Announce live region updates (e.g., form errors, status changes) to active screen reader
Interfaces
isScreenReaderActive() → Stream<bool>
getFontScaleFactor() → double
validateContrast(Color foreground, Color background) → bool
announceToScreenReader(String message, {TextDirection? textDirection})
setFocusTraversalOrder(List<FocusNode> nodes)
requestFocus(FocusNode node)
getCurrentSemanticFocus() → FocusNode?
checkMinimumTouchTarget(Size size) → bool
getReduceMotionEnabled() → bool
getHighContrastEnabled() → bool
Relationships
Dependents (4)
Components that depend on this component