frontend-accessibility
Use when the user asks to make a page pass WCAG 2.2 AA in code, fix ARIA, keyboard navigation, focus management, accessible forms and modals, screen reader…
от j4flmao★ 47 звёзд на GitHub
Установить frontend-accessibility в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Frontend Accessibility
Purpose
Meet WCAG 2.2 AA standards. Semantic HTML first. ARIA only when necessary. Every interactive element is keyboard accessible. Color contrast meets 4.5:1 minimum. Dynamic content changes announced via live regions. Automated testing enforced in CI.
Agent Protocol
Trigger
Exact user phrases: "accessibility", "a11y", "WCAG", "screen reader", "ARIA", "keyboard navigation", "color contrast", "focus management", "semantic HTML", "accessible".
Input Context
Before activating, verify:
- The component or page being reviewed is specified.
- The WCAG level required (AA by default, AAA for specific requirements) is known.
- Target audience (consumer, enterprise, government) to determine WCAG level.
Output Artifact
No file output. Produces accessibility review or implementation guidance as text.
Response Format
Issue:
Element: {selector}
Issue: {description}
WCAG: {success criterion}
Severity: {critical/major/minor}
Fix: {specific code change}
Implementation:
Pattern: {name}
HTML: {semantic element}
ARIA: {aria attributes if needed}
Keyboard: {focus behavior}
No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output.
Completion Criteria
- Semantic HTML elements used instead of div/span with ARIA roles.
- ARIA used only when native HTML semantics do not cover the pattern.
- All interactive elements keyboard accessible (Tab, Enter, Escape).
- Color contrast meets 4.5:1 for normal text, 3:1 for large text.
- Focus indicators visible on all interactive elements.
- Dynamic content changes announced via aria-live.
- Automated a11y tests included (axe-core).
Max Response Length
Per issue: 6 lines. Per pattern: 8 lines.
Component Architecture / Decision Trees
Semantic Element Decision Tree
Is it interactive?
|-- YES --> Does it navigate?
| |-- YES --> <a href="..."> (even for client-side routing)
| |-- NO --> Does it submit a form?
| |-- YES --> <button type="submit">
| |-- NO --> <button type="button">
|-- NO --> Does it represent a document structure?
|-- YES --> See: <header>, <nav>, <main>, <section>, <article>, <aside>, <footer>
|-- NO --> Is it a group of related items?
|-- YES --> <ul>/<ol> + <li>, or <select>/<option>
|-- NO --> Is it a standalone piece of content?
|-- YES --> <p>, <figure>, <blockquote>, <pre>, <code>
|-- NO --> <div> or <span> as last resort
ARIA Decision Tree
Does native HTML element exist for this pattern?
|-- YES --> Use native element. Do NOT add ARIA role (overrides native semantics).
|-- NO --> Can the pattern be built with composition of native elements?
|-- YES --> Use composition. No ARIA needed.
|-- NO --> Use ARIA role. Must manage keyboard interaction manually.
|-- role="button", role="tab", role="dialog", role="alertdialog"
|-- role="listbox", role="combobox", role="menu", role="menubar"
|-- role="tree", role="grid", role="slider"
Focus Management Decision Tree
Does the component manage focus?
|-- Modal/Dialog: Trap focus, return to trigger on close
|-- Tab panel: Arrow keys between tabs, roving tabindex
|-- Menu: Arrow keys between items, Escape to close, return focus to trigger
|-- Combobox: Focus stays in input, listbox is programmatically associated
|-- Accordion: Section toggle via Enter/Space, no focus movement
|-- Carousel: Focus wraps, tab stops on carousel shell (not all slides)
WCAG 2.2 New Criteria Decision Tree
Does the component have a focus indicator?
|-- YES --> Is focus indicator at least 2px thick? (WCAG 2.2 2.4.13 Focus Appearance)
| |-- YES --> Meets WCAG 2.2 AA
| |-- NO --> Increase focus indicator to 2px minimum, ensure 3:1 contrast against adjacent
|-- NO --> Add focus indicator (WCAG 2.4.11, 2.4.12, 2.4.13)
Does the user need to dismiss a modal or overlay?
|-- YES --> Add [Dismiss] button, Escape key handler (WCAG 2.2 2.4.11 Focus Not Obscured)
|-- NO --> No action needed
Is there a draggable operation?
|-- YES --> Provide single-pointer alternative (click to move) (WCAG 2.2 2.5.7 Dragging Movements)
|-- NO --> No action needed
Does the component have a target size?
|-- YES --> Is it 24x24px minimum? (WCAG 2.2 2.5.8 Target Size)
|-- YES --> Meets WCAG 2.2 AA
|-- NO --> Increase to 24x24px minimum (exceptions: inline, essential, legal)
Workflow
Step 0: WCAG 2.2 New Requirements (2023)
WCAG 2.2 adds 9 new success criteria. The most impactful for frontend development:
- 2.4.11 Focus Not Obscured (AA): Focused element must not be fully hidden by other content (modals, sticky headers).
- 2.4.12 Focus Not Obscured (AAA): Focused element must not be partially hidden.
- 2.4.13 Focus Appearance (AA): Fo
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/a11y-aria.md
- references/a11y-testing.md
- references/a11y-tools.md
- references/accessible-component-patterns.md
- references/accessible-data-visualization.md
- references/accessible-forms.md
- references/wcag-22-compliance.md
- references/wcag-checklist.md
FAQ
Что делает скилл frontend-accessibility?
Use when the user asks to make a page pass WCAG 2.2 AA in code, fix ARIA, keyboard navigation, focus management, accessible forms and modals, screen reader bugs or add axe tests in CI. Produces accessible component code and automated a11y checks for any framework. Not for design-side audits, contrast reviews or VPATs (use design-accessibility).
Как установить скилл frontend-accessibility?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл frontend-accessibility запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…