accessibility

Implement WCAG 2.2 AA compliant accessibility in React 19 components with shadcn/ui and Radix UI.

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/michelve/accessibility --skill accessibility-michelve
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: accessibility
Source: https://github.com/michelve/accessibility
Command: npx skills add https://github.com/michelve/accessibility --skill accessibility-michelve

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building accessible web interfaces requires navigating dozens of WCAG success criteria, ARIA patterns, and screen reader behaviors. This Skill provides concrete implementation guidance for WCAG 2.2 AA compliance in React 19 projects using shadcn/ui, Tailwind CSS v4, and Radix UI, so developers can fix audit failures and build accessible components without memorizing the specification. ## Core Features & Use Cases - WCAG 2.2 Criteria Coverage: Implements all new WCAG 2.2 success criteria including Focus Not Obscured (2.4.11), Target Size (2.5.8), Dragging Movements (2.5.7), Redundant Entry (3.3.7), and Accessible Authentication (3.3.8), with a full AA compliance checklist organized by POUR principle. - ARIA & Keyboard Patterns: Provides ready-to-use patterns for comboboxes, data grids, tree views, carousels, dialogs, and live regions, plus roving tabindex and FocusScope focus-trapping implementations. - Testing & Enterprise Reporting: Covers axe-core Playwright CI/CD audits, vitest-axe component tests, a five-screen-reader test matrix, VPAT report guidance, and accessibility statement templates. - Use Case: A developer's axe-core audit flags a custom dropdown menu that keyboard users cannot navigate. The Skill supplies the roving tabindex pattern, correct menu/menuitem roles, and Escape-to-close behavior to fix it. ## Quick Start Ask the assistant to audit a specific React component for WCAG 2.2 AA compliance or to fix a specific accessibility issue such as keyboard navigation in a dropdown menu.

Frequently Asked Questions about accessibility

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make a React dropdown menu keyboard accessible?▼

Use roving tabindex so only the active item has tabIndex 0 while others use -1, and handle Arrow Down/Up to move between items with Home/End jumping to the ends. Apply role="menu" on the container, role="menuitem" on items, and aria-haspopup plus aria-expanded on the trigger. Tab and Escape should close the menu and return focus to the trigger.

How do I trap focus in a modal dialog with Radix UI?▼

Import FocusScope from the radix-ui package and wrap the dialog content with the loop and trapped props. FocusScope moves focus into the dialog on mount and returns it on unmount. Prefer the shadcn Dialog component when possible since it wraps FocusScope and handles aria-modal, Escape dismissal, and focus return automatically.

Does shadcn/ui handle accessibility automatically?▼

Yes, shadcn/ui components are built on Radix UI primitives that handle ARIA roles, keyboard navigation, and focus management by default. Dialog, DropdownMenu, Select, Tabs, Checkbox, Tooltip, and similar components ship with correct roles and key interactions, so you should not re-implement what they already provide.

What are the new WCAG 2.2 success criteria I must meet?▼

WCAG 2.2 added nine criteria including Focus Not Obscured (2.4.11 AA), Dragging Movements (2.5.7 AA), Target Size Minimum of 24x24 CSS pixels (2.5.8 AA), Consistent Help (3.2.6 A), Redundant Entry (3.3.7 A), and Accessible Authentication (3.3.8 AA). All AA items are required for conformance while AAA items are aspirational.

How do I set up automated accessibility testing in CI?▼

Use @axe-core/playwright in Playwright tests to scan pages with WCAG 2.2 AA tags and assert zero violations, plus vitest-axe for component-level unit tests. Add a GitHub Actions workflow that runs on pull requests, builds the app, executes the Playwright accessibility project, and fails the build when violations are found.

Why is my focused element hidden behind a sticky header?▼

This violates WCAG 2.4.11 Focus Not Obscured at Level AA. Fix it by adding scroll-margin-top to focused elements, for example a CSS rule applying scroll-margin-top equal to the header height plus a margin on all focus-visible elements, or use the Tailwind focus-visible:scroll-mt-20 utility.