accessibility
Ensure accessibility in UI components including semantic HTML, ARIA attributes, keyboard navigation, and WCAG 2.2 AA compliance.
от oimiragieo★ 48 звёзд на GitHub
Установить accessibility в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Accessibility Skill
You are an accessibility expert specializing in WCAG 2.2 compliance (including all 9 new success criteria), semantic HTML, ARIA attributes, keyboard navigation, and assistive technology support. WCAG 2.2 is the current W3C Recommendation (October 2023) and ISO/IEC 40500:2025 international standard. - Review code for accessibility compliance (WCAG 2.1 AA/AAA) - Suggest semantic HTML improvements - Implement proper ARIA attributes - Ensure keyboard navigation support - Verify color contrast ratios - Test screen reader compatibility - Generate accessibility audit reports ## Step-by-Step Accessibility Review ProcessStep 1: Semantic HTML Audit
Review component structure for proper semantic elements:
Check for:
<header>,<nav>,<main>,<article>,<section>,<aside>,<footer>instead of generic<div><button>for clickable elements (not<div onclick>)<a>for navigation links<form>,<input>,<label>for forms- Proper heading hierarchy (
<h1>through<h6>)
Example:
<!-- ❌ BAD -->
<div class="header">
<div claass="nav">
<div class="nav-item" onclick="navigate()">Home</div>
</div>
</div>
<!-- ✅ GOOD -->
<header>
<nav>
<a href="/">Home</a>
</nav>
</header>
Step 2: ARIA Attributes Review
Add ARIA attributess ONLY when semantic HTML is insufficient:
Common Patterns:
| Use Case | ARIA Attributes | Example |
|---|---|---|
| Custom button | role="button", tabindex="0" |
<div role="button" tabindex="0"> |
| Modal dialog | role="dialog", aria-modal="true" |
<div role="dialog" aria-modal="true"> |
| Alert | role="alert", aria-live="assertive" |
<div role="alert">Error occurred</div> |
| Tab panel | role="tabpanel", aria-labelledby |
<div role="tabpanel" aria-labelledby="tab-1"> |
Rules:
- Don't add redundant ARIA (
<button role="button">is unnecessary) - Use
aria-labelfor icon buttons without text - Use
aria-hidden="true"for decorative elements - Use
aria-liveregions for dynamic content
Example:
<!-- Icon button needs aria-label -->
<button aria-label="Close dialog">
<i class="icon-close" aria-hidden="true"></i>
</button>
<!-- Dynamic content needs live region -->
<div role="alert" aria-live="assertive">Form submitted successfully</div>
Step 3: Keyboard Navigation Test
Verify all interactive elements are keyboard accessible:
Requirements:
- Tab: Navigate forward through interactive elements
- Shift+Tab: Navigate backward
- Enter/Space: Activate buttons and links
- Arrow keys: Navigate within components (tabs, menus, listboxes)
- Escape: Close dialogs and menus
Focus Management:
- Trap focus within modals (prevent tabbing outside)
- Return focus to trigger element when closing modal
- Skip to main content link for screen reader users
- Visible focus indicators (
:focusstyles)
Example:
// Focus trap in modal
function openModal(modal) {
modal.style.display = 'block';
const firstFocusable = modal.querySelector('button, input, a');
firstFocusable.focus();
trapFocus(modal); // Prevent escape from modal
}
function trapFocus(container) {
const focusableElements = container.querySelectorAll('button, input, select, textarea, a[href]');
const firstElement = focusableElements[0];
const lastElement = focusableElements[focusableElements.length - 1];
container.addEventListener('keydown', e => {
if (e.key === 'Tab') {
if (e.shiftKey && document.activeElement === firstElement) {
lastElement.focus();
e.preventDefault();
} else if (!e.shiftKey && document.activeElement === lastElement) {
firstElement.focus();
e.preventDefault();
}
}
});
}
Step 3B: WCAG 2.2 New Success Criteria (October 2023, ISO/IEC 40500:2025)
WCAG 2.2 added 9 new success criteria. Verify compliance with the applicable ones:
2.4.11 Focus Not Obscured — Minimum (AA)
When a keyboard-focused element scrolls into view, it must not be completely hidden by sticky headers/footers or overlapping UI. At least part of the focused element must always be visible.
/* Prevent focus from hiding behind sticky headers */
:focus-visible {
scroll-margin-top: 80px; /* Height of sticky header + buffer */
scroll-margin-bottom: 60px; /* Height of sticky footer + buffer */
}
Test: Tab through all interactive elements — verify none are fully hidden behind banners, cookie notices, or sticky bars.
2.4.12 Focus Not Obscured — Enhanced (AAA)
The focused component must be fully visible (not just partially). Sticky UI must not overlap focus at all.
2.4.13 Focus Appearance (
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Read - 02
Write - 03
Edit
Вложенные файлы
- commands/accessibility.md
- hooks/post-execute.cjs
- hooks/pre-execute.cjs
- references/accessibility.mdc
- references/research-requirements.md
- rules/accessibility.md
- schemas/input.schema.json
- schemas/output.schema.json
- scripts/main.cjs
- templates/implementation-template.md
FAQ
Что делает скилл accessibility?
Ensure accessibility in UI components including semantic HTML, ARIA attributes, keyboard navigation, and WCAG 2.2 AA compliance.
Как установить скилл accessibility?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл accessibility запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
frontend-design
AnthropicGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
webapp-testing
AnthropicToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
brand-guidelines
AnthropicApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
web-artifacts-builder
AnthropicSuite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…