The Title Prop
Thetitle prop adds a <title> element inside the SVG, providing a text description for screen readers:
Decorative vs Meaningful Icons
Icons fall into two categories that require different accessibility approaches:- Decorative Icons
- Meaningful Icons
Icons that are purely visual and don’t convey unique information should be hidden from screen readers:The text “Lets go for a?” conveys the message, so the icon is decorative.
Icon Buttons
When icons are used as buttons without text, provide accessible labels:1
Use aria-label
Add descriptive
aria-label to the button element:2
Add title for tooltips
Optionally include
title for visual tooltip:3
Hide icon from screen readers
Add
aria-hidden to the icon to avoid redundancy:Icons with Adjacent Text
When icons accompany visible text, hide the icon from screen readers:Interactive Icon Links
For icon-based navigation links:Status Indicators
For icons indicating status, ensure the meaning is conveyed accessibly:Form Field Icons
Icons in form fields require special consideration:Icon-Based Navigation
For icon-heavy navigation, provide multiple ways to understand the interface:Color and Contrast
Ensure icons meet WCAG contrast requirements:Accessibility Checklist
Is the icon decorative?
Is the icon decorative?
✓ Add
aria-hidden="true"✓ Ensure adjacent text provides full context✓ Don’t add title or aria-labelIs the icon meaningful/functional?
Is the icon meaningful/functional?
✓ Add
aria-label to the parent interactive element✓ Or provide visible text label✓ Consider adding title for tooltips✓ Add aria-hidden="true" to avoid redundancy when label is presentDoes the icon convey status?
Does the icon convey status?
✓ Use
role="status" or role="alert"✓ Consider aria-live regions for dynamic updates✓ Include text description, not just the iconDoes the icon meet contrast requirements?
Does the icon meet contrast requirements?
✓ Ensure 3:1 contrast ratio for UI components (WCAG AA)✓ Don’t rely on color alone to convey meaning✓ Test with color blindness simulators
Testing Accessibility
Test your icon implementation with:- Screen readers: NVDA (Windows), JAWS (Windows), VoiceOver (macOS/iOS)
- Keyboard navigation: Ensure all icon buttons are keyboard accessible
- Browser extensions: axe DevTools, WAVE, Lighthouse
- Automated testing: jest-axe, pa11y, Playwright accessibility tests
Next Steps
Customizing Icons
Learn how to customize icon appearance
Styling
Apply global styles with IconContext