Swift accessibility pro
Skill laxrajpurohit/swift-skills-pro/swift-accessibility-pro/skills/swift-accessibility-pro
Modern, original agent skills for Swift and Apple-platform development
npx -y skills add laxrajpurohit/swift-skills-pro --skill swift-accessibility-proAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use when making SwiftUI/UIKit apps accessible — VoiceOver labels and traits, Dynamic Type, color contrast, Reduce Motion, and accessibility testing.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
2.9 KB, as published. Nobody here has run it
Swift Accessibility Pro
Make apps usable by everyone. Treat accessibility as a requirement, not an add-on.
When to use
- Auditing or adding accessibility to SwiftUI/UIKit views.
- Fixing VoiceOver, Dynamic Type, or contrast issues.
- Preparing for accessibility review.
Trigger: /swift-accessibility-pro.
Core principles
- Every interactive element needs a clear label and the right trait.
- Text must scale with Dynamic Type; never hard-code font sizes.
- Don't convey meaning with color alone.
- Respect user settings: Reduce Motion, Increase Contrast, Bold Text.
VoiceOver labels
Icon-only controls are unlabeled to VoiceOver by default.
❌
Button { like() } label: { Image(systemName: "heart") }
✅
Button { like() } label: { Image(systemName: "heart") }
.accessibilityLabel("Like")
Combine decorative + meaningful elements:
HStack { Image(systemName: "star.fill"); Text("4.8") }
.accessibilityElement(children: .combine)
.accessibilityLabel("Rating 4.8 out of 5")
Hide purely decorative images: .accessibilityHidden(true).
Traits
Tell VoiceOver what an element is.
✅
Text("Settings").accessibilityAddTraits(.isHeader)
Image("chart").accessibilityLabel("Sales up 12%").accessibilityRemoveTraits(.isImage)
Dynamic Type
❌ Fixed size — won't scale
Text("Hello").font(.system(size: 17))
✅ Semantic style — scales
Text("Hello").font(.body)
For custom fonts use .font(.custom("Inter", size: 17, relativeTo: .body)). Test at the
largest accessibility sizes; use ViewThatFits/wrapping instead of truncation.
Color & contrast
- Don't signal state with color only — add an icon, text, or shape.
- Meet WCAG contrast (4.5:1 for body text). Support
@Environment(\.colorSchemeContrast).
❌
Circle().fill(isOnline ? .green : .red) // invisible to color-blind users
✅
Label(isOnline ? "Online" : "Offline",
systemImage: isOnline ? "checkmark.circle" : "xmark.circle")
Reduce Motion
@Environment(\.accessibilityReduceMotion) private var reduceMotion
// ...
.animation(reduceMotion ? nil : .spring, value: state)
Common mistakes checklist
- Icon-only buttons without
.accessibilityLabel. - Hard-coded font sizes that ignore Dynamic Type.
- State shown by color alone.
- Decorative images not hidden from VoiceOver.
- Headers without
.isHeadertrait. - Animations that ignore Reduce Motion.
- Touch targets smaller than 44×44 pt.
Output format (when reviewing)
Per issue: file:line, the barrier, before/after fix. Lead with blockers (unlabeled controls, non-scaling text) before enhancements.