JordanCoin/ios-skills-collection / skills/dadederk--ios-accessibility
ios-accessibility
VerifiedExpert guidance on iOS accessibility best practices, patterns, and implementation. Use when developers mention: (1) iOS accessibility, VoiceOver, Dynamic Type, or assistive technologies, (2) accessibility labels, traits, hints, or values, (3) automated accessibility testing, auditing, or manual testing, (4) Switch Control, Voice Control, or Full Keyboard Access, (5) inclusive design or accessibility culture, (6) making apps work for users with disabilities.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 9.5 KB |
| references/concepts-and-culture.md | markdown | 10.7 KB |
| references/dynamic-type-swiftui.md | markdown | 13.5 KB |
| references/dynamic-type-uikit.md | markdown | 12.2 KB |
| references/dynamic-type.md | markdown | 2.8 KB |
| references/full-keyboard-access.md | markdown | 3.6 KB |
| references/glossary.md | markdown | 8.6 KB |
| references/good-practices.md | markdown | 17.5 KB |
| references/playbook.md | markdown | 21.3 KB |
| references/resources.md | markdown | 4.4 KB |
| references/switch-control.md | markdown | 4.2 KB |
| references/testing-automated.md | markdown | 5.5 KB |
| references/testing-manual.md | markdown | 8.2 KB |
| references/voice-control.md | markdown | 3.6 KB |
| references/voiceover-swiftui.md | markdown | 16.7 KB |
| references/voiceover-uikit.md | markdown | 25.5 KB |
| references/voiceover.md | markdown | 5.9 KB |
references/voice-control.md
View on GitHub# Voice Control
Voice Control allows users to navigate and interact using only their voice.
## How It Works
Voice Control recognizes accessibility labels and lets users speak them to activate controls.
```
User: "Tap Settings"
→ Activates button with accessibilityLabel "Settings"
```
Voice Control can work offline and relies heavily on the labels you provide. Clear, concise labels lead to faster, more reliable activation.
## Enable Voice Control
**Settings > Accessibility > Voice Control**
Or say "Turn on Voice Control" to Siri.
## Key Commands
| Command | Action |
|---------|--------|
| "Show names" | Overlay labels on all elements |
| "Show numbers" | Overlay numbers on all elements |
| "Tap [label]" | Activate element by name |
| "Tap [number]" | Activate numbered element |
| "Show grid" | Display a grid for precise tapping |
| "Show actions" | Show custom actions for focused element |
| "Scroll down/up" | Scroll the screen |
| "Go back" | Navigate back |
## Label Best Practices
### Match visible text
If a button shows "Submit", the accessibility label should be "Submit" — not "Send" or "Submit button".
```swift
// Button shows "Settings"
settingsButton.accessibilityLabel = "Settings" // ✓ Matches
```
### Avoid duplicates
Multiple elements with the same label cause ambiguity. Voice Control falls back to showing numbers.
### Use input labels for alternatives
When the visible text doesn't match what users might say:
**UIKit**:
```swift
gearButton.accessibilityLabel = "Settings"
gearButton.accessibilityUserInputLabels = ["Settings", "Preferences", "Options", "Gear", "Cog"]
```
**SwiftUI**:
```swift
Button(action: openSettings) {
Image(systemName: "gear")
}
.accessibilityLabel("Settings")
.accessibilityInputLabels(["Settings", "Preferences", "Options", "Gear", "Cog"])
```
Users can say any of these alternatives.
## Testing with Voice Control
### "Show names"
Reveals all accessibility labels overlaid on the screen. Quickly identifies:
- Missing labels (no overlay appears)
- Duplicate labels (same text on multiple elements)
- Confusing labels (text that doesn't match the visual)
Use this during development to validate the labels users will actually speak.
### "Show actions"
Focus on an element and say "Show actions" to see custom accessibility actions.
## Custom Actions
Voice Control exposes custom actions. Users can say "Show actions for [element]" then activate by name.
```swift
cell.accessibilityCustomActions = [
UIAccessibilityCustomAction(name: "Delete", actionHandler: { _ in
self.delete()
return true
})
]
```
User: "Show actions for Message"
→ "Delete" appears
User: "Tap Delete"
## Accessibility Values
Values improve Voice Control usability for stateful controls:
```swift
slider.accessibilityLabel = "Volume"
slider.accessibilityValue = "50 percent"
```
User: "What is Volume?"
→ Voice Control announces "50 percent"
## Common Issues
| Problem | Solution |
|---------|----------|
| Element has no label | Add `accessibilityLabel` |
| Label doesn't match visible text | Update label or use input labels |
| Multiple elements with same label | Make labels unique or use context |
| Icon-only button | Add descriptive label |
| Custom gesture required | Provide accessible alternative |
## Checklist
- [ ] Labels match visible text when possible
- [ ] No duplicate labels for different controls
- [ ] Icon-only buttons have descriptive labels
- [ ] Input labels provided for non-obvious names
- [ ] Custom actions exposed for secondary features
- [ ] Tested with "Show names" command
## Sources
- https://accessibilityupto11.com/365-days-ios-accessibility/
- https://accessibilityupto11.com/blog/
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |