Accessibility

From oborchers/fractional-cto · View interactive version

Accessibility is an AI agent skill from the GitHub repository oborchers/fractional-cto. This skill should be used when the user is building or reviewing accessibility (a11y), WCAG 2.2 AA compliance, keyboard navigation, focus management, screen reader support, ARIA attributes, color contrast, or SPA accessibility. Covers legal requirements, accessible component primitives, and the uniq

How to use this skill

Skill file

Accessibility Is Not a Feature — It Is a Legal Requirement

WCAG 2.2 Level AA is the target — not because it is aspirational, but because it is law. The ADA Title II final rule requires WCAG 2.1 AA compliance for government-facing software. The European Accessibility Act applies to any SaaS accessible to EU citizens. Over 4,000 accessibility lawsuits were filed in 2023 alone.

Minimum Standards

Color Contrast

Keyboard Operability

Every interactive element must be operable by keyboard alone:

| Key | Action |

|-----|--------|

| Tab | Navigate between elements |

| Enter/Space | Activate element |

| Escape | Close modals, popovers, dropdowns — always |

| Arrow keys | Navigate within composite widgets |

Focus must always be visible. Many CSS resets strip :focus styles — this is a critical accessibility violation. Ensure every focusable element has a visible focus indicator.

SPA Accessibility

Single-page applications break three browser behaviors that most teams miss entirely. Traditional page loads reset focus, announce the new page title, and reset scroll position. SPAs break all three.

Mandatory SPA fixes:

  1. Move focus on route change — use tabindex="-1" on the element receiving programmatic focus
  2. Update the <title> tag on every navigation
  3. Announce route changes via ARIA live regions
  4. Restore focus on back-button navigation

When uncertain where to place focus after navigation, move it to the top of the page — it is always correct.

Use Accessible Component Primitives

Do not build modals, dialogs, or dropdown menus from scratch. The edge cases are vast and the failure modes are invisible to sighted developers.

Use libraries like Radix UI (the foundation of shadcn/ui) that handle ARIA attributes, focus management, and keyboard navigation internally.

Testing

Automated testing catches roughly 30% of accessibility issues. Manual testing catches the rest.

Manual testing methods:

Examples

Working implementations in examples/:

Review Checklist

When reviewing or building for accessibility:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.