Package location:
Packages/DesignSystem/Sources/DesignSystem/Accessibility/Overview
The Accessibility module is part of the DesignSystem package and provides ready-to-use accessibility features that work with VoiceOver, Dynamic Type, Reduce Motion, and High Contrast modes out of the box.Pre-defined VoiceOver Labels
Typed labels for common UI patterns, ready to apply
Dynamic Type
Text scales beautifully with user preferences
Reduce Motion
Respects motion sensitivity settings
High Contrast
Colors adapt for better readability
Quick Start
VoiceOver Labels
One line for full accessibility:Dynamic Type Support
Text scales beautifully with user preferences:Reduce Motion
Respects users who experience discomfort with animations:High Contrast Mode
Colors adapt automatically for users who need more contrast:File Structure
Pre-Defined Labels
TheA11y enum groups typed A11yLabel values by feature. Use A11y.<Group>.<label> directly, or extend the enum with your own (see Adding Custom Labels).
A11y.Chat
A11y.Chat
sendButton, messageInput, userMessage, assistantMessage, newChat, historyList, copyAction, deleteActionA11y.Auth
A11y.Auth
signInApple, signInGoogle, emailInput, passwordInput, signOutA11y.Settings
A11y.Settings
themeSelector, notificationsToggle, diagnosticsToggle, deleteAccountA11y.Profile
A11y.Profile
photo, displayName, editButtonA11y.Payments
A11y.Payments
subscribeButton, restoreButton, planOption(name:price:), subscriptionStatus(isSubscribed:)A11y.Navigation
A11y.Navigation
A11y.Common
A11y.Common
loading, error(message:), success(message:), dismissAdding Custom Labels
1. Define Your Label
2. Apply to Views
SwiftUI Modifiers
.saiAccessible(_:)
Apply a pre-defined accessibility label:
.saiAccessibilityHidden()
Hide decorative elements from VoiceOver:
.saiScaledFont(size:weight:relativeTo:)
Dynamic Type-aware font sizing:
.saiReducedMotionAnimation(_:)
Motion-sensitive animation:
.saiContrastAwareForeground(normal:highContrast:)
High contrast color adaptation:
Debug Tools
Accessibility Audit Overlay
accessibilityAuditOverlay(showWarnings:) is a DEBUG-only modifier that adds a toggle button and a colored-legend overlay to a view during development. It is compiled out of Release builds.
- Red — critical issues (missing/empty labels, buttons without hints, images without labels, touch targets smaller than 44x44 points, insufficient contrast)
- Yellow — warnings (generic or overly long labels, missing traits, redundant labels)
- Green — accessible
A11yAudit.printResults(_:) prints issue and warning counts, and A11yChecklist.printChecklist() prints the manual review checklist.
Testing Accessibility
Unit Tests
UI Tests
Manual Testing
Best Practices
Label all interactive elements
Buttons, links, and controls need labels
Hide decorative images
Use
.saiAccessibilityHidden() for backgroundsProvide meaningful hints
Describe what happens when activated
Test with real users
Accessibility users find issues you miss
Test Coverage
Accessibility helpers are covered through DesignSystem tests and should also be verified manually with VoiceOver, Dynamic Type, Reduce Motion, and high contrast settings on a simulator or device.Related
Quick Start
Run the app before auditing accessibility
Architecture
Understand module boundaries
Localization Module
Type-safe strings and i18n
Design System
UI tokens and components
