accessibility-wcag
БесплатноБез исполняемых скриптовНе проверенWCAG 2.1 AA compliance requirements including semantic markup, keyboard navigation, ARIA labels, and color contrast
от Hack23★ 15 звёзд на GitHubОб этом скилле
Accessibility WCAG Skill
Purpose
This skill ensures all web content meets WCAG 2.1 Level AA standards for accessibility, making websites usable by people with disabilities including visual, auditory, motor, and cognitive impairments.
Rules
WCAG 2.1 AA Requirements
WCAG is organized around four principles (POUR):
- Perceivable - Information must be presentable in ways users can perceive
- Operable - Interface must be operable by all users
- Understandable - Information and operation must be understandable
- Robust - Content must be robust enough for assistive technologies
Perceivable Requirements
Text Alternatives (1.1)
MUST:
- Provide
alttext for all meaningful images - Use empty
alt=""for decorative images - Provide captions for audio/video content
- Provide transcripts for audio-only content
- Use descriptive link text (not "click here")
Examples:
<!-- GOOD: Meaningful alt text -->
<img src="security-audit.jpg" alt="Security professional reviewing network logs on dual monitors">
<!-- GOOD: Decorative image -->
<img src="divider.png" alt="" aria-hidden="true">
<!-- BAD: Missing alt -->
<img src="chart.png">
<!-- BAD: Useless alt text -->
<img src="photo.jpg" alt="Image">
Time-based Media (1.2)
MUST:
- Provide captions for videos (prerecorded and live)
- Provide audio descriptions for video content
- Provide transcripts for audio content
Adaptable Content (1.3)
MUST:
- Use semantic HTML (headings, lists, tables correctly)
- Ensure content is accessible without CSS
- Don't rely on sensory characteristics alone (color, shape, position)
- Use proper reading order in DOM
Examples:
<!-- GOOD: Semantic markup -->
<nav aria-label="Main navigation">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/about">About</a></li>
</ul>
</nav>
<!-- BAD: Div soup -->
<div class="nav">
<div class="item"><a href="/">Home</a></div>
<div class="item"><a href="/about">About</a></div>
</div>
Distinguishable Content (1.4)
MUST:
- Maintain color contrast ratio of at least 4.5:1 for normal text
- Maintain color contrast ratio of at least 3:1 for large text (18pt+ or 14pt+ bold)
- Don't use color alone to convey information
- Allow text resize up to 200% without loss of functionality
- Avoid background audio that can't be paused/stopped
- Ensure text can be selected and copied
Color Contrast Examples:
/* GOOD: High contrast (7:1) */
.text {
color: #000000; /* Black */
background-color: #FFFFFF; /* White */
}
/* GOOD: Sufficient contrast (4.6:1) */
.link {
color: #0066CC; /* Blue */
background-color: #FFFFFF; /* White */
}
/* BAD: Insufficient contrast (2.3:1) */
.subtle-text {
color: #CCCCCC; /* Light gray */
background-color: #FFFFFF; /* White */
}
Operable Requirements
Keyboard Accessible (2.1)
MUST:
- Make all functionality available via keyboard
- Provide visible focus indicators
- Don't create keyboard traps
- Ensure logical tab order
- Provide keyboard shortcuts for complex interfaces
Examples:
<!-- GOOD: Button is keyboard accessible -->
<button onclick="submitForm()">Submit</button>
<!-- BAD: Div onClick is not keyboard accessible -->
<div onclick="submitForm()">Submit</div>
<!-- BETTER: If you must use div, add role and tabindex -->
<div role="button" tabindex="0" onclick="submitForm()" onkeypress="handleKeyPress(event)">
Submit
</div>
/* GOOD: Visible focus indicator */
a:focus,
button:focus {
outline: 2px solid #0066CC;
outline-offset: 2px;
}
/* BAD: Removing focus outline without replacement */
*:focus {
outline: none; /* Never do this without providing alternative! */
}
Enough Time (2.2)
MUST:
- Allow users to turn off, adjust, or extend time limits
- Provide pause, stop, hide for auto-updating content
- No time limits unless essential (auctions, real-time games)
Seizures and Physical Reactions (2.3)
MUST NOT:
- Use content that flashes more than 3 times per second
- Create large flashing areas
Navigable (2.4)
MUST:
- Provide skip links to bypass repeated content
- Use descriptive page titles
- Ensure logical focus order
- Provide clear link purposes
- Offer multiple ways to navigate (menu, search, sitemap)
- Provide visible focus indicators
- Use clear headings and labels
Examples:
<!-- GOOD: Skip link -->
<a href="#main-content" class="skip-link">Skip to main content</a>
<nav>...</nav>
<main id="main-content">...</main>
<!-- GOOD: Descriptive title -->
<title>Security Services - ISO 27001 Implementation | Hack23</title>
<!-- BAD: Generic title -->
<title>Services</title>
Input Modalities (2.5)
MUST:
- Ensure touch targets are at least 44×44 pixels
- Don't rely on device motion alone
- Allow cancellation of pointer events
- Make clickable label text match accessible name
Understandable Requirements
Readable (3.1)
**MUST:
Установить accessibility-wcag в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл accessibility-wcag?
WCAG 2.1 AA compliance requirements including semantic markup, keyboard navigation, ARIA labels, and color contrast
Как установить скилл accessibility-wcag?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл accessibility-wcag запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies 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…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic