Catalog
affaan-m/accessibility

affaan-m

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels, accessibility traits and hints, focus management, contrast, target size, and screen-reader support. Use when building or auditing UI for accessibility compliance, keyboard navigation, or screen-reader support.

NewUpdated Sep 27, 2026

Accessibility (WCAG 2.2)

This skill ensures that digital interfaces are Perceivable, Operable, Understandable, and Robust (POUR) for all users, including those using screen readers, switch controls, or keyboard navigation. It focuses on the technical implementation of WCAG 2.2 success criteria.

When to Use

  • Defining UI component specifications for Web, iOS, or Android.
  • Auditing existing code for accessibility barriers or compliance gaps.
  • Implementing new WCAG 2.2 standards like Target Size (Minimum) and Focus Appearance.
  • Mapping high-level design requirements to technical attributes (ARIA roles, traits, hints).

Core Concepts

  • POUR Principles: The foundation of WCAG (Perceivable, Operable, Understandable, Robust).
  • Semantic Mapping: Using native elements over generic containers to provide built-in accessibility.
  • Accessibility Tree: The representation of the UI that assistive technologies actually "read."
  • Focus Management: Controlling the order and visibility of the keyboard/screen reader cursor.
  • Labeling & Hints: Providing context through aria-label, accessibilityLabel, and contentDescription.

How It Works

Step 1: Identify the Component Role

Determine the functional purpose (e.g., Is this a button, a link, or a tab?). Use the most semantic native element available before resorting to custom roles.

Step 2: Define Perceivable Attributes

  • Ensure text contrast meets 4.5:1 (normal) or 3:1 (large/UI).
  • Add text alternatives for non-text content (images, icons).
  • Implement responsive reflow (up to 400% zoom without loss of function).

Step 3: Implement Operable Controls

  • Ensure a minimum 24x24 CSS pixel target size (WCAG 2.2 SC 2.5.8).
  • Verify all interactive elements are reachable via keyboard and have a visible focus indicator (SC 2.4.11).
  • Provide single-pointer alternatives for dragging movements.

Step 4: Ensure Understandable Logic

  • Use consistent navigation patterns.
  • Provide descriptive error messages and suggestions for correction (SC 3.3.3).
  • Implement "Redundant Entry" (SC 3.3.7) to prevent asking for the same data twice.

Step 5: Verify Robust Compatibility

  • Use correct Name, Role, Value patterns.
  • Implement aria-live or live regions for dynamic status updates.

Accessibility Architecture Diagram

flowchart TD
  UI["UI Component"] --> Platform{Platform?}
  Platform -->|Web| ARIA["WAI-ARIA + HTML5"]
  Platform -->|iOS| SwiftUI["Accessibility Traits + Labels"]
  Platform -->|Android| Compose["Semantics + ContentDesc"]

  ARIA --> AT["Assistive Technology (Screen Readers, Switches)"]
  SwiftUI --> AT
  Compose --> AT

Cross-Platform Mapping

Feature Web (HTML/ARIA) iOS (SwiftUI) Android (Compose)
Primary Label aria-label / <label> .accessibilityLabel() contentDescription
Secondary Hint aria-describedby .accessibilityHint() Modifier.semantics { stateDescription = ... }
Action Role role="button" .accessibilityAddTraits(.isButton) Modifier.semantics { role = Role.Button }
Live Updates aria-live="polite" .accessibilityLiveRegion(.polite) Modifier.semantics { liveRegion = LiveRegionMode.Polite }

Examples

<form role="search">
  <label for="search-input" class="sr-only">Search products</label>
  <input type="search" id="search-input" placeholder="Search..." />
  <button type="submit" aria-label="Submit Search">
    <svg aria-hidden="true">...</svg>
  </button>
</form>

iOS: Accessible Action Button

Button(action: deleteItem) {
    Image(systemName: "trash")
}
.accessibilityLabel("Delete item")
.accessibilityHint("Permanently removes this item from your list")
.accessibilityAddTraits(.isButton)

Android: Accessible Toggle

Switch(
    checked = isEnabled,
    onCheckedChange = { onToggle() },
    modifier = Modifier.semantics {
        contentDescription = "Enable notifications"
    }
)

Anti-Patterns to Avoid

  • Div-Buttons: Using a <div> or <span> for a click event without adding a role and keyboard support.
  • Color-Only Meaning: Indicating an error or status only with a color change (e.g., turning a border red).
  • Uncontained Modal Focus: Modals that don't trap focus, allowing keyboard users to navigate background content while the modal is open. Focus must be contained and escapable via the Escape key or an explicit close button (WCAG SC 2.1.2).
  • Redundant Alt Text: Using "Image of..." or "Picture of..." in alt text (screen readers already announce the role "Image").

Best Practices Checklist

  • Interactive elements meet the 24x24px (Web) or 44x44pt (Native) target size.
  • Focus indicators are clearly visible and high-contrast.
  • Modals contain focus while open, and release it cleanly on close (Escape key or close button).
  • Dropdowns and menus restore focus to the trigger element on close.
  • Forms provide text-based error suggestions.
  • All icon-only buttons have a descriptive text label.
  • Content reflows properly when text is scaled.

References

  • frontend-patterns
  • design-system
  • liquid-glass-design
  • swiftui-patterns
Files1
1 files · 1.0 KB

Select a file to preview

Overall Score

88/100

Grade

A

Excellent

Grades are signals, not a certification. Always review a skill yourself before use.

Safety

95

Quality

87

Clarity

88

Completeness

82

Summary

This skill provides comprehensive guidance for implementing WCAG 2.2 Level AA accessibility standards across Web, iOS, and Android platforms. It maps high-level accessibility principles (POUR) to concrete technical implementation patterns, including ARIA roles, iOS accessibility traits, and Android Compose semantics, with practical code examples and anti-patterns to avoid.

Detected Capabilities

documentation referencecode example generationcross-platform pattern mappingaccessibility standard guidance

Trigger Keywords

Phrases that agents use to match this skill to user intent.

wcag compliance auditscreen reader supportkeyboard navigationaccessible componentsfocus managementcross-platform accessibility

Risk Signals

INFO

No destructive, privileged, or network-dependent operations detected

entire document
INFO

Referenced external documentation (WCAG 2.2, WAI-ARIA, Apple, Android dev guides) — informational only, no code execution or data access

References section

Referenced Domains

External domains referenced in skill content, detected by static analysis.

developer.android.comdeveloper.apple.comwww.w3.org

Use Cases

  • Design accessible UI components for web applications
  • Audit existing code for WCAG 2.2 compliance gaps
  • Implement keyboard navigation and focus management
  • Add screen reader support to native iOS/Android apps
  • Map design requirements to accessibility attributes across platforms
  • Ensure accessible modal dialogs with proper focus trapping

Quality Notes

  • Excellent semantic mapping across three platforms (Web, iOS, Android) with clear, concrete examples
  • Well-structured POUR principles foundation provides strong conceptual grounding
  • Detailed cross-platform feature table (HTML/ARIA, SwiftUI, Compose) makes implementation guidance immediately actionable
  • Anti-patterns section is highly practical and prevents common accessibility mistakes
  • Comprehensive checklist with specific pixel/point measurements (24x24px web, 44x44pt native) enables measurable compliance
  • Good use of mermaid flowchart to visualize platform-specific accessibility trees
  • Code examples are production-ready and demonstrate proper patterns (sr-only class, live regions, focus containment)
  • References link directly to authoritative standards bodies (W3C, Apple, Google) supporting the guidance
Model: claude-haiku-4-5-20251001Analyzed: Sep 27, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Version History

  1. v3.0

    Contract changed: description

    ✦ AISkill activation description clarified to emphasize Web, iOS, and Android platforms, semantic ARIA, accessibility traits, focus management, and contrast standards.

    triggering2026-09-27

    LATEST
  2. v2.0

    Contract changed: description

    ✦ AIRefined activation description to clarify when agents should engage skill for WCAG 2.2 audits, keyboard/contrast/screen-reader reviews.

    triggering2026-09-09

    View This Version
  3. v1.2

    Content updated

    ✦ AIUpdates Related Skills reference from frontend-design to design-system.

    2026-07-14

    View This Version
  4. v1.1

    Content updated

    ✦ AIAdds LICENSE file.

    2026-04-20

    View This Version
  5. v1.0

    2026-04-13

    View This VersionInitial version

Use affaan-m/accessibility in your dev environment

Command Palette

Search for a command to run...