Skills affaan-m ecc

accessibility

Use it when:
You're specifying, building or auditing UI components for keyboard, screen reader and WCAG 2.2 AA support.
It does:
Takes each component from its native role through perceivable, operable, understandable and robust checks, with concrete thresholds.
You get:
Components with 4.5:1 text contrast, 24x24px web or 44x44pt native targets, visible and contained focus, plus a pre-ship checklist.
Covers:
HTML and ARIA, SwiftUI accessibility modifiers and Jetpack Compose semantics side by side, with an example for each.
Unlike browser-qa:
That one, from the same repo, runs axe-core on live pages; this one is applied while the agent writes the UI.

TL;DR

ECC's accessibility skill works from WCAG's four principles, perceivable, operable, understandable and robust, and turns them into five checks per component: use the most semantic native element before a custom role; give text 4.5:1 contrast (3:1 for large text and UI), add text alternatives and let content reflow to 400% zoom; make targets at least 24x24 CSS pixels, reachable by keyboard with a visible focus indicator, and give dragging a single-pointer alternative; keep navigation consistent, write error messages that suggest a fix and don't ask for the same data twice; and use correct name, role and value, with live regions for status updates. A table maps labels, hints, roles and live updates across HTML/ARIA, SwiftUI and Jetpack Compose, with a search form, an icon button and a toggle as examples. It warns against clickable divs, meaning shown by color alone, modals that don't trap focus or can't be escaped, and alt text starting with image of. A closing checklist covers target sizes, focus, focus return from modals and menus, form errors, icon labels and text scaling.

Summarizes the skill at d2ef268.

npx skills add https://github.com/affaan-m/ecc --skill accessibility
Total Downloads
6,000 on skills.sh, Nov 9, 2026
Repo stars
299,776 affaan-m/ecc
First seen
May 19, 2026 on skills.sh
Weekly Downloads
483
+62% over the 8 weeks to Nov 9
Weekly values
Week toInstalls
Sep 21298
Sep 28190
Oct 5167
Oct 12266
Oct 19457
Oct 26453
Nov 2522
Nov 9483
Category

Taste for interfaces that don't look generated: direction, motion and accessibility.

Everything for building software: planning, coding, debugging, design, frameworks, cloud, agents and skills.

Type

Knowledge and rules the agent applies while it works: best practices, design principles, API references.

Effect

Adds no side effects of its own. It shapes how the agent thinks, writes or reviews. Guidelines and routers are always effect:none, even when the task they support edits code.

Needs

Instructions only. Works in any agent that supports skills.

Publisher

Everyone else. Unverified vendor claims default to community.

Topics

SKILL.md

From affaan-m/ecc at d2ef268. Checked daily, last changed Nov 6, 2026.

Frontmatter
name: accessibility
description: 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.
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

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

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