Skip to content
UXClaim
Accessibility

SwiftUI HIG Audit

Static code analyzer for SwiftUI apps against Apple HIG and WCAG 2.1 AA accessibility standards across iOS and macOS.

What It Does

SwiftUI HIG Audit is a static code analysis tool that scans your SwiftUI source files against Apple’s Human Interface Guidelines and WCAG 2.1 AA accessibility standards. It identifies 190+ rules across 22 categories—from VoiceOver labels and contrast violations to Dark Mode hardcoding and touch target sizes—without building or running your app.

How It Works

The skill auto-triggers when you ask Claude to audit or review your SwiftUI code. It can also run via explicit /hig-audit and /hig-fix commands. The tool scans for code patterns (like onTapGesture instead of Button, hardcoded colors, or missing .searchable), reports findings with severity levels and fix suggestions, and can automatically remediate violations with build verification.

Use Cases

  • Pre-launch audits: Catch accessibility and HIG violations before App Store submission
  • Accessibility compliance: Ensure WCAG 2.1 AA standards across your codebase
  • Design system enforcement: Verify typography, spacing, and color usage matches guidelines
  • Onboarding new developers: Establish HIG best practices as automated checks
  • Dark Mode & Dynamic Type: Catch hardcoded values that break adaptive UI

Who Benefits

Product designers building SwiftUI apps, iOS developers shipping accessible products, design systems teams enforcing guidelines, and accessibility advocates ensuring compliance at scale.

Frequently asked questions

How do I run a SwiftUI HIG audit?
Ask Claude naturally ("Audit this file for HIG compliance") or use the `/hig-audit` command. Specify a file path, directory, or rule category. The tool scans your source code and generates a markdown report with findings grouped by severity.
What does SwiftUI HIG Audit check for?
190+ rules across 22 categories: accessibility (VoiceOver labels, traits), contrast (WCAG), Dark Mode, typography (Dynamic Type), layout (touch targets), icons, motion, haptics, navigation, data entry, alerts, sheets, buttons, lists, search, loading, privacy, lifecycle, media, system, advanced a11y, and macOS-specific issues.
Can it automatically fix violations?
Yes. After running an audit, use `/hig-fix` to automatically remediate findings. The command plans fixes (identifying cascade effects), presents them for approval, executes them with build verification, and generates a report of changes.
Does it actually run or build my app?
No. This is a static code analysis tool—it reads source files and searches for patterns. It does not build, run, or visually inspect your app. This means it catches obvious violations but may miss runtime or visual issues.
What severity levels does it use?
Critical (accessibility barriers, App Store rejection risk, major HIG violations), Warning (HIG recommendations, usability issues), and Info (best practices, polish). Filter findings by severity with `--severity` flag.
Does it cover both iOS and macOS?
Yes. The tool audits SwiftUI code for iOS and macOS Human Interface Guidelines. It includes a dedicated macOS category (MCS-01–08) covering Settings, keyboard shortcuts, and menu bar patterns.
How do I install SwiftUI HIG Audit?
Copy the skill directory into your project or `.claude/commands/` folder. The skill auto-triggers on audit keywords, or use explicit slash commands. No npm/pip installation needed—it works with Claude Code in your workspace.
Can I audit only specific rule categories?
Yes. Use `--category` flag to audit specific areas: `--category accessibility`, `--category typography`, `--category dark-mode`, etc. Or filter by severity with `--severity critical`.

Glossary

HIG (Human Interface Guidelines)
Apple's design and interaction standards for iOS, macOS, and other platforms. Covers typography, spacing, navigation, accessibility, Dark Mode, and more.
WCAG 2.1 AA
Web Content Accessibility Guidelines Level AA—a widely adopted international standard ensuring digital products are accessible to users with disabilities (color contrast, keyboard navigation, screen reader support).
Static Code Analysis
Automated inspection of source code without running or building it. Finds patterns, style violations, and common bugs by examining the code text directly.
VoiceOver
Apple's screen reader technology that audibly describes app content for blind and low-vision users. Requires proper accessibility labels and traits.
Dynamic Type
Apple's system feature that lets users adjust text size system-wide. Apps must scale typography responsively rather than using fixed font sizes.

More in Accessibility

All →
Accessibility

A&T Claude Skills

Reusable Claude Code skills for accessibility audits, WCAG compliance checking, and web development workflows

automateandtweak
Accessibility

a11y-skills

Claude Skills for accessibility auditing, code review, and WCAG 2.2 compliance across web, mobile, and documents.

joedevon