This guide provides practical steps for testing the accessibility of toast notifications and the notification center with screen readers. The goal is to verify that screen reader users receive appropriate announcements when toasts appear and new notifications arrive.
-
Enable VoiceOver:
- Press
Cmd + F5or go to System Settings > Accessibility > VoiceOver - Or use
Cmd + Option + F5for quick toggle
- Press
-
VoiceOver Useful Commands:
Ctrl + Option + Right/Left Arrow: Move to next/previous itemCtrl + Option + Shift + Down Arrow: Read from current positionCtrl + Option + A: Read all content from cursor positionCtrl + Option + Space: Activate/click current item
-
Install NVDA:
- Download from nvaccess.org
- Free, open-source screen reader
-
NVDA Useful Commands:
NVDA + Down Arrow: Read current lineNVDA + Up Arrow: Read previous lineNVDA + B: Read next buttonNVDA + F: Read next form field
- Chrome: Works well with both VoiceOver and NVDA
- Safari: Best with VoiceOver on macOS
- Firefox: Good compatibility with NVDA
Test Case: Success Toast Announcement
- Navigate to any page that can trigger a toast (e.g., invoice funding)
- Activate the toast trigger (button click, form submission)
- Expected Result: Screen reader should announce:
- Toast title: "Invoice funded"
- Toast message: "Invoice #123 has been funded successfully"
- Announcement should occur without requiring user focus
Test Case: Error Toast Announcement
- Trigger an error toast (e.g., transaction failure)
- Expected Result: Screen reader should announce error immediately
- Error toasts may use assertive politeness (
aria-live="assertive") - Should interrupt other speech if necessary
- Error toasts may use assertive politeness (
Test Case: Toast Dismissal
- Trigger a toast
- Wait for auto-dismissal (5 seconds) or manually dismiss
- Expected Result: No duplicate or confusing announcements on dismissal
Test Case: New Notification Arrival
- Have the notification system running (requires wallet connection)
- Simulate or wait for a new notification (invoice settled, proposal created)
- Expected Result: Screen reader should announce:
- "1 new notification" (or count if multiple)
- Announcement should be polite, not interruptive
Test Case: Opening Notification Drawer
- Navigate to notification bell button
- Expected Result: Button should announce:
- "Open notifications" or "Open notifications, 3 unread"
- Button state should be clear
- Activate the button to open drawer
- Expected Result:
- Focus should move into the drawer
- Drawer should announce its purpose: "Notification centre"
Test Case: Reading Notifications
- Open notification drawer
- Navigate through notifications
- Expected Result:
- Each notification should be readable
- Unread status should be indicated
- Links should be properly described
- Problem: Screen reader announces same thing multiple times
- Cause: Multiple ARIA live regions updating with same content
- Solution: Ensure only one live region announces each update
- Problem: Screen reader doesn't announce toast/notification
- Cause: Live region not updated or wrong politeness level
- Solution: Verify
aria-liveattribute and content updates
- Problem: Focus doesn't move to interactive elements
- Cause: Missing
tabindexor focus management - Solution: Ensure focus moves to toast action buttons
- Problem: Announcement happens too fast/slow
- Cause: Incorrect timing for screen reader processing
- Solution: Allow 500ms-1000ms for announcements to be processed
While manual testing is essential, automated checks can catch regressions:
# Run accessibility tests
pnpm test -- --run "accessibility"
# Run specific toast/notification tests
pnpm test -- --run "ToastNotification"
# Check for WCAG violations
pnpm test -- --run "a11y"- Success toasts announce to screen readers
- Error toasts announce immediately (assertive)
- Toast content is descriptive and clear
- Auto-dismissal doesn't cause announcement issues
- Manual dismissal works with keyboard
- Focus moves to toast action buttons (if present)
- Multiple toasts don't cause announcement conflicts
- New notifications announce arrival count
- Notification bell has proper ARIA label
- Bell indicates unread count in label
- Drawer opens with proper focus management
- Notifications are readable in drawer
- Mark as read functions are accessible
- Drawer closes with proper focus return
- Color contrast meets WCAG AA standards
- No animation-induced seizures (flashing)
- Respects
prefers-reduced-motion - Keyboard navigation works completely
- No keyboard traps
- Proper heading structure
- Images have alt text
- Check Console for errors
- Verify
aria-liveregion exists in DOM - Ensure region content actually changes
- Check for
aria-hidden="true"on parent elements
- Ensure NVDA is in browse mode (not forms mode)
- Check for
roleandaria-liveattributes - Verify content is text (not React components)
// Debug ARIA live regions
console.log('Live regions:', document.querySelectorAll('[aria-live]'));
console.log('Toast region:', document.getElementById('toast-live-region'));
// Check screen reader text
console.log('Screen reader text:', document.querySelector('.sr-only')?.textContent);- WebAIM Screen Reader Survey
- Deque University: Screen Reader Testing
- A11Y Project: Testing with Screen Readers
- MDN: ARIA Live Regions
# Accessibility Test Results
**Date**: [Date]
**Tester**: [Name]
**Screen Reader**: [VoiceOver/NVDA/JAWS]
**Browser**: [Chrome/Safari/Firefox]
## Toast System
- Success toast announcement: [PASS/FAIL]
- Error toast announcement: [PASS/FAIL]
- Toast dismissal: [PASS/FAIL]
- Focus management: [PASS/FAIL]
## Notification System
- New notification announcement: [PASS/FAIL]
- Notification drawer: [PASS/FAIL]
- Notification reading: [PASS/FAIL]
## Issues Found
1. [Description of issue]
2. [Description of issue]
## Recommendations
1. [Suggested fix]
2. [Suggested fix]