Built-in accessibility features
All calendar components include accessibility support by default:- Screen reader support: Proper
accessibilityRoleandaccessibilityLabelattributes - Keyboard navigation: Components respond to touch and keyboard events
- Focus management: Interactive elements are properly focusable
- State announcements: Selected, disabled, and today states are announced
Accessibility roles
Calendar components use appropriate accessibility roles:- Date cells: Use
buttonrole when interactive - Disabled dates: Role is removed to indicate non-interactivity
- Header navigation: Use
adjustablerole for month navigation
Custom accessibility labels
Provide custom accessibility labels for marked dates to give users context:Accessibility label interface
From the source code:Custom text announced by screen readers. Provides context about the date’s significance.
Automatic accessibility labels
When you don’t provide a custom label, the calendar generates one automatically:- Date information
- Selection state
- Disabled state
- Marked/unmarked state
Disabling touch events
Control touch event behavior for better accessibility:When
true, disabled dates cannot be tapped. Can be overridden per date with disableTouchEvent.When
true, inactive dates (outside current month) cannot be tapped. Can be overridden per date with disableTouchEvent.Disable touch events for a specific date in
markedDatesState-specific accessibility
Different date states are announced to screen reader users:- Selected dates
- Disabled dates
- Today
- Inactive dates
Period marking accessibility
For period markings, provide context about the date range:Clearly indicate the start, middle, and end of periods in accessibility labels to help users understand date ranges.
Multi-dot marking accessibility
Describe multiple events on the same date:Header accessibility
Month navigation arrows are accessible:adjustable role tells screen readers that users can swipe to change values (months).
Day names accessibility
Day names in the header have empty accessibility labels to avoid redundant announcements:Testing accessibility
iOS VoiceOver
- Enable VoiceOver: Settings → Accessibility → VoiceOver
- Navigate with swipes:
- Swipe right: Move to next element
- Swipe left: Move to previous element
- Double-tap: Activate element
- Test calendar navigation:
- Can you navigate between dates?
- Are date labels clear and descriptive?
- Can you activate dates?
- Are disabled dates properly announced?
Android TalkBack
- Enable TalkBack: Settings → Accessibility → TalkBack
- Navigate with swipes:
- Swipe right: Move to next element
- Swipe left: Move to previous element
- Double-tap: Activate element
- Test calendar navigation:
- Can you navigate between dates?
- Are date labels clear and descriptive?
- Can you activate dates?
- Are disabled dates properly announced?
Active opacity for touch feedback
Provide visual feedback for touch interactions:Opacity value (0-1) when the date is being touched. Default is around 0.2.
Active opacity provides visual feedback to all users, including those with motor impairments who may need confirmation of successful touch events.
Best practices
Provide meaningful labels
Provide meaningful labels
Always include descriptive accessibility labels for marked dates:
Announce state changes
Announce state changes
Update accessibility labels when date states change:
Test with real assistive technology
Test with real assistive technology
Don’t rely solely on automated testing:
- Test with VoiceOver on iOS
- Test with TalkBack on Android
- Test with external keyboard navigation
- Ask users with disabilities to test your implementation
Consider cognitive accessibility
Consider cognitive accessibility
- Use consistent visual indicators
- Provide clear labels and instructions
- Avoid overly complex interactions
- Use sufficient color contrast (see theming)
Disable touch on non-interactive dates
Disable touch on non-interactive dates
Prevent confusion by disabling touch on dates that shouldn’t be interactive:
Color contrast
Ensure sufficient color contrast for users with visual impairments:Semantic HTML equivalents
While React Native doesn’t use HTML, here are the semantic equivalents:| React Native Component | Accessibility Role | HTML Equivalent |
|---|---|---|
| Date cell (interactive) | button | <button> |
| Date cell (disabled) | (none) | <div> |
| Month navigation | adjustable | <input type="range"> |
| Calendar container | (none) | <table role="grid"> |
WCAG compliance
React Native Calendars supports WCAG 2.1 Level AA compliance when configured properly:Perceivable
Perceivable
- ✅ Text alternatives via
accessibilityLabel - ✅ Distinguishable content via theme colors
- ⚠️ Color contrast depends on your theme configuration
Operable
Operable
- ✅ Keyboard accessible (touch events)
- ✅ Enough time for interactions
- ✅ Navigable via screen reader
- ✅ Input modalities (touch, screen reader)
Understandable
Understandable
- ✅ Readable with LocaleConfig
- ✅ Predictable navigation
- ⚠️ Input assistance depends on your
accessibilityLabelimplementation
Robust
Robust
- ✅ Compatible with assistive technologies
- ✅ Standard React Native accessibility APIs
Example: Fully accessible calendar
- Custom accessibility labels with event information
- Selected state announcement
- High contrast colors
- Disabled touch events for non-interactive dates
- Proper marking and selection handling