All skills

Use when designing iOS interfaces, implementing accessibility (VoiceOver, Dynamic Type), handling dark mode, ensuring adequate touch targets, providing animation/haptic feedback, or requesting user permissions. Apple Human Interface Guidelines for iOS compliance.

Use this Skill: https://skilld.dev/gh/johnrogers/claude-swift-engineering/ios-hig

This session only. Nothing lands on disk.

referencesaccessibility.md

≈516 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Accessibility

Apple Human Interface Guidelines for accessible iOS app design.

Critical Rules

  • Provide meaningful accessibility labels/hints for icon-only controls and custom components
  • Ensure Dynamic Type works end-to-end; avoid layouts that collapse at larger sizes
  • Maintain readable contrast and avoid conveying meaning by color alone
  • Respect platform accessibility settings (Reduce Motion/Transparency) when relevant
  • Prefer system controls that come with good accessibility defaults

Examples

Icon-Only Buttons

// ✅ Icon-only button with accessible label
Button(action: model.refresh) {
    Image(systemName: "arrow.clockwise")
}
.accessibilityLabel("Refresh")
.accessibilityHint("Reloads the list")

// ❌ Icon-only control with no label; VoiceOver reads "arrow.clockwise"
Button(action: model.refresh) {
    Image(systemName: "arrow.clockwise")
}

Dynamic Type Support

// ✅ Dynamic Type with proper layout
VStack(alignment: .leading, spacing: 8) {
    Text(item.title)
        .font(.headline)
        .lineLimit(2)

    if let summary = item.summary {
        Text(summary)
            .font(.body)
            .foregroundStyle(.secondary)
            .lineLimit(3)
    }
}

// ❌ Hard-coded sizes that don't scale
VStack(alignment: .leading) {
    Text(item.title)
        .font(.system(size: 14))
        .lineLimit(1)
}

Reduce Motion

// ✅ Respect Reduce Motion setting
@Environment(\.accessibilityReduceMotion) var reduceMotion

var body: some View {
    content
        .animation(reduceMotion ? .none : .spring, value: isExpanded)
}

// ❌ Always animate regardless of setting
var body: some View {
    content
        .animation(.spring, value: isExpanded)
}

Summary

Key Principles:

  1. Use .accessibilityLabel() and .accessibilityHint() for icon-only controls
  2. Support Dynamic Type with system font styles
  3. Maintain sufficient color contrast
  4. Respect accessibility settings like Reduce Motion
  5. Prefer system controls with built-in accessibility

Source: SKILL.md on GitHub

1 warning16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill consists of documentation and SwiftUI code examples for Apple's Human Interface Guidelines (HIG). It is a purely informational resource providing best practices for accessibility, visual design, and privacy without any security risks.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer7mo

    8/8 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at d62eb71. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Dormantupdated 9 months ago

README badge

README badge for johnrogers/claude-swift-engineering/ios-hig