Accessibility
Accessibility features and implementations in CraftReactNative components.
CraftReactNative components are built with accessibility in mind, following WCAG guidelines and React Native accessibility best practices.
Color contrast
All color combinations in the theme system are designed with WCAG 2.1 AA guidelines in mind, aiming to ensure text remains readable and interactive elements are clearly distinguishable across all theme variants and modes.
- Text on backgrounds maintains a minimum 4.5:1 contrast ratio
- Large text (18px+) maintains a minimum 3:1 contrast ratio
- Interactive elements are designed with sufficient contrast for visibility
Accessibility props support
All components accept React Native's AccessibilityProps, allowing full customization of accessibility behavior. You can provide custom labels, hints, roles, and other accessibility properties as needed.
Semantic roles
Components use appropriate semantic roles for screen readers:
- Buttons, checkboxes, radio buttons, sliders, and other interactive elements have proper roles
- Form inputs maintain native accessibility
- Complex components like carousels and modals use appropriate roles and actions
Touch targets
Interactive components are designed with mobile accessibility best practices in mind:
- Buttons are sized with appropriate minimum dimensions for easy tapping
- Interactive elements include
hitSlopfor easier interaction - Touch targets are sized appropriately for their importance and context
Screen reader support
Components are designed to work well with screen readers:
- Proper labeling and hints throughout
- Value announcements for dynamic content changes
- Screen reader detection and adaptive behavior where needed
- Focus management in modals and overlays
Best practices
When using components:
- Provide labels: Always include
accessibilityLabelfor icon-only buttons or when the default label isn't descriptive enough - Add hints when needed: Use
accessibilityHintfor complex interactions that need explanation - Test with screen readers: Test with VoiceOver (iOS) and TalkBack (Android)
- Maintain contrast: Don't override theme colors with low-contrast alternatives
- Use semantic components: Prefer built-in components over custom implementations
Example
All accessibility features work automatically - you just need to provide appropriate labels and hints for your specific use case.