web-accessibility

Implement WCAG 2.1 accessibility standards in web UI components using semantic HTML, ARIA, and keyboard navigation.

1|Updated May 10, 2026
One-click install
npx skills add https://github.com/Tgoldi/claude-skills --skill web-accessibility-tgoldi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: web-accessibility
Source: https://github.com/Tgoldi/claude-skills/tree/main/web-accessibility
Command: npx skills add https://github.com/Tgoldi/claude-skills --skill web-accessibility-tgoldi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Web interfaces often exclude users with disabilities due to missing ARIA attributes, poor keyboard navigation, low color contrast, and non-semantic markup. This Skill guides the implementation of WCAG 2.1-compliant components so applications work with screen readers, keyboards, and assistive technologies. ## Core Features & Use Cases - Accessible Component Implementation: Build modals, dropdowns, tabs, and forms with focus traps, ARIA roles, and keyboard handlers in React, Vue, Svelte, or vanilla JS. - Accessibility Audits: Identify and fix violations using axe-core, Lighthouse, and manual keyboard/screen reader testing. - WCAG Compliance Checks: Enforce contrast ratios (4.5:1 for AA), label associations, and focus indicators to meet legal accessibility requirements. - Use Case: You need a React modal that traps focus, closes on ESC, and announces its title to screen readers — this Skill provides the complete accessible implementation pattern. ## Quick Start Make my React modal component accessible with focus trapping, ESC key handling, and proper ARIA attributes for screen readers.

Frequently Asked Questions about web-accessibility

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

FAQPage Schema
How do I make a React modal accessible for screen readers?

Use role="dialog" with aria-modal="true", aria-labelledby pointing to the title, and aria-describedby for the content. Trap focus inside the modal, move focus to it on open, close on ESC, and return focus to the trigger element on close.

How to implement keyboard navigation in a dropdown component?

Handle ArrowUp and ArrowDown to move through options, Enter or Space to select, and Escape to close and return focus to the trigger button. Use role="listbox" on the list and role="option" with aria-selected on items.

What color contrast ratio does WCAG AA require?

WCAG 2.1 Level AA requires a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text. Level AAA raises these to 7:1 and 4.5:1 respectively. Never convey information by color alone; pair it with icons or text.

Can I use a div with role="button" instead of a button element?

Semantic HTML should come first: a native <button> provides keyboard focus, Enter/Space activation, and screen reader announcements for free. ARIA roles on divs require manually reimplementing all of that behavior, so use them only as a last resort.

Why is outline: none harmful for accessibility?

Removing the focus outline leaves keyboard users with no visible indication of which element is focused, making the interface unusable without a mouse. Instead of outline: none, provide a custom focus style such as a colored outline with offset.

How do I test web accessibility automatically in Jest?

Use jest-axe with @testing-library/react: render the component, run axe(container), and assert expect(results).toHaveNoViolations(). Complement automated scans with manual keyboard-only testing and screen readers like NVDA or VoiceOver.