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/full-keyboard-access.md
View on GitHub# Full Keyboard Access
Full Keyboard Access enables users to navigate and interact with iOS using only a hardware keyboard.
## How It Works
Users navigate through focusable elements with Tab and activate with Space. A visible focus indicator shows the current element.
Full Keyboard Access is especially important on iPadOS with hardware keyboards.
## Enable Full Keyboard Access
**Settings > Accessibility > Keyboards > Full Keyboard Access**
## Key Commands
| Key | Action |
|-----|--------|
| Tab | Move to next element |
| Shift + Tab | Move to previous element |
| Space | Activate focused element |
| Escape | Dismiss or go back |
| Tab + Z | Show custom actions |
| Arrow keys | Navigate within controls |
## Development Impact
Elements that work with VoiceOver typically work with Full Keyboard Access. Focus on:
- Logical focus order
- Visible focus indicator
- Keyboard shortcuts for key actions
## Focus Order
Focus follows the accessibility order. Use the same techniques as VoiceOver:
**UIKit**:
```swift
view.accessibilityElements = [headerLabel, searchField, listView]
```
**SwiftUI**:
```swift
VStack {
Text("First").accessibilitySortPriority(2)
Text("Second").accessibilitySortPriority(1)
}
```
## Keyboard Shortcuts
Provide shortcuts for frequently used actions.
### UIKit
```swift
override var keyCommands: [UIKeyCommand]? {
[
UIKeyCommand(
title: "Refresh",
action: #selector(refresh),
input: "r",
modifierFlags: .command
),
UIKeyCommand(
title: "Search",
action: #selector(search),
input: "f",
modifierFlags: .command
)
]
}
```
### SwiftUI
```swift
Button("Refresh", action: refresh)
.keyboardShortcut("r", modifiers: .command)
```
Shortcuts appear when the user holds the Command key.
## Input Labels
Help users find elements by alternate names:
**UIKit**:
```swift
button.accessibilityUserInputLabels = ["Settings", "Preferences", "Config"]
```
**SwiftUI**:
```swift
.accessibilityInputLabels(["Settings", "Preferences", "Config"])
```
This helps keyboard users who search by name.
## Custom Actions
Custom actions are accessible via Tab + Z:
```swift
cell.accessibilityCustomActions = [
UIAccessibilityCustomAction(name: "Delete", actionHandler: { _ in
self.delete()
return true
})
]
```
## Grouping
Group related elements to reduce Tab stops:
**UIKit**:
```swift
containerView.isAccessibilityElement = true
containerView.accessibilityLabel = "\(title), \(subtitle)"
```
**SwiftUI**:
```swift
.accessibilityElement(children: .combine)
```
## Testing
### Simulator
Enable Full Keyboard Access in the simulator's Settings app. Use your Mac keyboard to navigate.
### Device
Connect a hardware keyboard (Bluetooth or Smart Connector).
### What to verify
1. All interactive elements are focusable
2. Focus order is logical
3. Focus indicator is visible
4. Space activates the focused element
5. Escape dismisses modals
6. Keyboard shortcuts work
## Common Issues
| Problem | Solution |
|---------|----------|
| Element not focusable | Ensure `isAccessibilityElement = true` |
| Focus order confusing | Set `accessibilityElements` order |
| Focus indicator hidden | Avoid clipping or overlays |
| Action requires touch | Add keyboard shortcut or custom action |
## Checklist
- [ ] All interactive elements focusable
- [ ] Focus order follows task flow
- [ ] Keyboard shortcuts for main actions
- [ ] Custom actions exposed via Tab + Z
- [ ] Tested in simulator and on device
## 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 |