Semantic structure
Provide descriptive titles
Always add a title that describes what the chart shows:Add descriptive labels
Use ARIA labels for context:Animation accessibility
Respect motion preferences
Recharts automatically respects the user’sprefers-reduced-motion setting when using isAnimationActive="auto":
Provide animation controls
For critical visualizations, offer users control:Color and contrast
Ensure sufficient contrast
Use colors with WCAG AA compliant contrast ratios (at least 4.5:1 for text, 3:1 for UI components):Don’t rely on color alone
Use patterns, shapes, or labels in addition to color:Use accessible color palettes
Choose colorblind-friendly palettes:Tooltips and interaction
Keyboard-accessible tooltips
Recharts tooltips are keyboard accessible by default. Ensure custom tooltips maintain this:Focus indicators
Ensure interactive elements have visible focus states:Alternative text representations
Provide data tables
Offer a table version for screen reader users:Add text descriptions
Provide a text summary of key insights:Axis accessibility
Label your axes
Always label axes clearly:Format tick labels
Make tick values readable:Legend accessibility
Ensure legends are readable
Provide context in legend labels
Responsive design
Adapt to different screen sizes
Support text scaling
Use relative units for text:Testing accessibility
Screen reader testing
- Test with NVDA (Windows), JAWS (Windows), or VoiceOver (macOS)
- Navigate using keyboard only (Tab, Arrow keys)
- Verify all information is announced
Automated testing
Use tools like:Manual checks
- Can you navigate to all interactive elements with keyboard?
- Are focus indicators visible?
- Do tooltips work without a mouse?
- Is color contrast sufficient?
- Are animations respectful of motion preferences?
- Is there alternative text representation?
ARIA attributes reference
Essential ARIA attributes for charts
Best practices checklist
WCAG compliance levels
- Level A: Basic accessibility (minimum)
- Level AA: Recommended for most sites (includes 4.5:1 contrast)
- Level AAA: Enhanced accessibility (includes 7:1 contrast)