Repository navigation
Knowledge Mobile Accessibility
Mobile accessibility reference data for React Native, Expo, iOS, and Android auditing. Covers the complete React Native accessibility props table (including RN 0.73+ ARIA aliases),
accessibilityRolevalues with iOS UIAccessibility and Android TalkBack mappings, touch target size requirements, SwiftUI and UIKit property references, Jetpack Compose semantics, common violation patterns with fixes, and testing tool commands.
Each agent, with its why.
| Agent | Why |
|---|---|
| mobile-accessibility | Primary consumer - full mobile accessibility audit |
Each prop, with its purpose and WCAG SC.
| Prop | Purpose | WCAG SC |
|---|---|---|
accessibilityLabel / aria-label
|
Human-readable name for the element | 1.1.1, 4.1.2 |
accessibilityRole / aria-role
|
Communicates element type to AT | 4.1.2 |
accessibilityHint / aria-describedby
|
Additional context spoken after label and role | 1.3.3 |
accessibilityState |
{checked, disabled, expanded, selected, busy} |
4.1.2 |
accessibilityValue |
{min, max, now, text} - for sliders, steppers |
1.3.1 |
accessibilityActions |
Custom actions (context menus, long-press alternatives) | 4.1.3 |
accessibilityLiveRegion / aria-live
|
'polite' or 'assertive' for dynamic updates |
4.1.3 |
accessibilityViewIsModal / aria-modal
|
Traps VoiceOver/TalkBack focus inside modals | 1.3.4 |
accessibilityElementsHidden / aria-hidden
|
iOS - hides decorative content from VoiceOver | 1.1.1 |
importantForAccessibility |
Android - 'no' or 'no-hide-descendants' for decorative |
1.1.1 |
RN 0.73+ introduces ARIA-aliased props (
aria-label,aria-role, etc.) - use these in new code.
Each role, with use for.
| Role | Use For |
|---|---|
'button' |
Buttons, submission triggers |
'link' |
Navigation links, external URLs |
'image' |
Informational images |
'imagebutton' |
Icon buttons |
'header' |
Section headings |
'checkbox' |
Checkboxes |
'switch' |
Toggle switches |
'tab' / 'tablist'
|
Tab elements and containers |
'combobox' |
Dropdowns / selects |
'alert' |
Alert dialogs |
'progressbar' |
Progress indicators |
'none' |
Suppress/remove role |
Each platform, with its minimum and standard.
| Platform | Minimum | Standard |
|---|---|---|
| iOS | 44 x 44 pt | Apple HIG |
| Android | 48 x 48 dp | Material Design |
| Web mobile (WCAG 2.5.5 AAA) | 44 x 44 CSS px | WCAG |
| Web mobile (WCAG 2.5.8 AA) | 24 x 24 CSS px with spacing | WCAG 2.2 |
// VIOLATION
<TouchableOpacity onPress={close}>
<Icon name="x" size={20} />
</TouchableOpacity>
// FIX
<TouchableOpacity onPress={close} accessibilityRole="button" accessibilityLabel="Close">
<Icon name="x" size={20} aria-hidden />
</TouchableOpacity>// VIOLATION - placeholder is not a label
<TextInput placeholder="Email" value={email} onChangeText={setEmail} />
// FIX
<View>
<Text nativeID="emailLabel">Email address</Text>
<TextInput
value={email} onChangeText={setEmail}
accessibilityLabelledBy="emailLabel"
keyboardType="email-address" autoComplete="email"
/>
</View>// FIX - Modal component traps VoiceOver automatically
<Modal visible={visible} transparent accessibilityViewIsModal={true} onRequestClose={close}>
<View style={styles.overlay}>
<Text>Are you sure?</Text>
<Button title="Confirm" onPress={confirm} />
<Button title="Cancel" onPress={close} />
</View>
</Modal>Each modifier, with its purpose.
| Modifier | Purpose |
|---|---|
.accessibilityLabel("...") |
Overrides spoken name |
.accessibilityHint("...") |
Spoken usage hint |
.accessibilityHidden(true) |
Removes from VoiceOver tree |
.accessibilityElement(children: .combine) |
Merges children into one node |
.accessibilityAddTraits(.isButton) |
Adds role trait |
.accessibilityAction(named: "...", {}) |
Custom action in Actions rotor |
Each modifier, with its purpose.
| Modifier | Purpose |
|---|---|
semantics { contentDescription = "..." } |
Accessible name |
semantics { role = Role.Button } |
Element role |
semantics { heading() } |
Marks as heading |
semantics { liveRegion = LiveRegion.Polite } |
Live announcements |
semantics { invisibleToUser() } |
Hides from TalkBack |
semantics { mergeDescendants = true } |
Merges child semantics |
# React Native Testing Library
npm install --save-dev @testing-library/react-nativeconst btn = screen.getByRole('button', { name: /submit/i });
expect(btn).toBeTruthy();# Enable TalkBack via ADB (Android CI)
adb shell settings put secure enabled_accessibility_services \
com.google.android.marvin.talkback/.TalkBackServiceskills/kb-mobile-accessibility/SKILL.md
- Agents Overview
- Accessibility Lead
- Web Accessibility Wizard
- Document Accessibility Wizard
- Markdown Assistant
- Developer Hub
- GitHub Hub