PluginBench
Skill
Pass
Audit score 90

accessibility

affaan-m/everything-claude-code

Design and audit inclusive digital products using WCAG 2.2 Level AA standards across Web, iOS, and Android.

What is accessibility?

This skill ensures digital interfaces are Perceivable, Operable, Understandable, and Robust (POUR) for all users, including those using assistive technologies. Use it to generate semantic ARIA for Web and accessibility traits for native platforms, audit code for compliance gaps, and implement WCAG 2.2 success criteria like target size and focus appearance.

  • Map UI component specifications to WCAG 2.2 standards across Web (HTML/ARIA), iOS (SwiftUI), and Android (Compose)
  • Audit existing code for accessibility barriers and compliance gaps
  • Implement POUR principles: Perceivable (contrast, text alternatives), Operable (keyboard navigation, target size), Understandable (consistent patterns, error messages), Robust (Name/Role/Value, live regions)
  • Generate semantic ARIA labels, roles, and live region attributes for Web components
  • Define accessibility traits, labels, and hints for native iOS and Android components
  • Verify focus management, modal focus trapping, and keyboard navigation patterns

How to install accessibility

npx skills add https://github.com/affaan-m/everything-claude-code --skill accessibility
Claude Code
Cursor
Windsurf
Cline

How to use accessibility

  1. 1.Identify the component's functional role (button, link, tab, etc.) and use the most semantic native element available
  2. 2.Define perceivable attributes: ensure 4.5:1 text contrast, add text alternatives for non-text content, implement responsive reflow to 400% zoom
  3. 3.Implement operable controls: meet 24x24px (Web) or 44x44pt (Native) target size, ensure keyboard reachability, add visible focus indicators
  4. 4.Ensure understandable logic: use consistent navigation patterns, provide descriptive error messages, implement redundant entry prevention
  5. 5.Verify robust compatibility: use correct Name/Role/Value patterns, implement aria-live or live regions for dynamic updates
  6. 6.Cross-reference the platform-specific mapping table (Web ARIA vs iOS traits vs Android semantics) to implement consistent accessibility across platforms

Use cases

Good for
  • Defining accessible UI component specifications before development on Web, iOS, or Android
  • Auditing existing interfaces for WCAG 2.2 compliance gaps and accessibility barriers
  • Implementing new WCAG 2.2 standards like Target Size (Minimum) and Focus Appearance requirements
  • Mapping high-level design requirements to technical accessibility attributes (ARIA roles, traits, hints)
  • Ensuring modals trap focus correctly and dropdowns restore focus to trigger elements on close
Who it's for
  • Frontend developers building Web applications
  • iOS and Android developers using SwiftUI and Compose
  • Accessibility auditors and compliance specialists
  • Product designers defining component specifications
  • QA engineers testing for accessibility compliance

accessibility FAQ

What are the POUR principles?

POUR stands for Perceivable (content is visible/readable), Operable (keyboard and assistive tech navigation), Understandable (clear logic and language), and Robust (compatible with assistive technologies). These are the foundation of WCAG 2.2.

What is the minimum target size for interactive elements?

Web requires 24x24 CSS pixels (WCAG 2.2 SC 2.5.8), while native iOS and Android platforms require 44x44 points.

How do I handle focus in modals?

Modals must trap focus (prevent keyboard navigation to background content) while open and release it cleanly on close via the Escape key or an explicit close button. This prevents users from accidentally interacting with hidden content.

What's the difference between aria-label and aria-describedby?

aria-label provides the primary accessible name for an element, while aria-describedby links to additional descriptive text. Use aria-label for concise labels and aria-describedby for longer explanations.

Should I use 'Image of...' in alt text?

No. Screen readers already announce the role 'Image', so including it in alt text is redundant. Write concise, descriptive alt text that conveys the image's purpose or content.

Full instructions (SKILL.md)

Source of truth, from affaan-m/everything-claude-code.


name: accessibility description: Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA standards. Use this skill to generate semantic ARIA for Web and accessibility traits for Web and Native platforms (iOS/Android). metadata: origin: ECC

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

FeatureWeb (HTML/ARIA)iOS (SwiftUI)Android (Compose)
Primary Labelaria-label / <label>.accessibilityLabel()contentDescription
Secondary Hintaria-describedby.accessibilityHint()Modifier.semantics { stateDescription = ... }
Action Rolerole="button".accessibilityAddTraits(.isButton)Modifier.semantics { role = Role.Button }
Live Updatesaria-live="polite".accessibilityLiveRegion(.polite)Modifier.semantics { liveRegion = LiveRegionMode.Polite }

Examples

Web: Accessible Search

<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

Related Skills

  • frontend-patterns
  • design-system
  • liquid-glass-design
  • swiftui-patterns