casoon/ai-agent-config/accessibility-audit
Claude Code and agent skill by casoon/ai-agent-config
- community
Checking that the SKILL.md file is still in the repository.
WCAG 2.2 AA patterns for Astro — semantic HTML, keyboard navigation, focus indicators, form labels, contrast ratios, ARIA roles, and motion preferences. Use when building or auditing any UI for accessibility, adding forms or interactive components, reviewing contrast or touch targets, or when fixing axe-core violations from Playwright tests. Load this skill before adding any form, dialog, tab, accordion, or icon-only button.
Install
npx vskill@latest install casoon/ai-agent-config/accessibility-auditSKILL.md
The same SKILL.md was published earlier as casoon/ai-agent-config/accessibility-audit.
Accessibility audit
Accessibility is baseline, not a feature. Every pattern must be usable without a mouse, without sight, and without fine motor control.
Focus areas
- Semantic HTML first — use native elements (
<button>,<a>,<details>,<dialog>) where possible. - Keyboard access and visible focus indicators on all interactive elements.
- Labels, landmarks, and sensible heading hierarchy.
- Contrast and motion preferences respected in light and dark mode.
Page structure
- One
<h1>per page, no skipped heading levels. - Landmarks:
<nav aria-label="…">,<main id="main">,<article>,<section aria-labelledby="…">,<aside>,<footer>. - Skip link to
#mainin the layout. - Set
langon<html>; derive per locale where i18n is in use.
Interactive elements
Links
- Links distinguishable by underline, not color alone.
- External links with
target="_blank"needrel="noopener noreferrer"and a screen reader hint (<span class="sr-only">(opens in new tab)</span>). - Icon-only links need
aria-label; the icon inside getsaria-hidden="true". - Never use
<a>withouthreffor actions — use<button type="button">.
Buttons
- Icon-only buttons must have
aria-label; inner iconaria-hidden="true". - Always set
type="button"ortype="submit"explicitly. - Never
<div onclick>— use<button>.
Keyboard navigation
- Focus order follows visual layout — don't use positive
tabindex. - Custom interactive elements need
tabindex="0", appropriaterole, and keyboard event handlers.
Touch targets (WCAG 2.5.8)
Minimum 44×44 px for all interactive elements. Apply padding or min-h-[44px] min-w-[44px].
Forms
Checklist:
| Requirement | Implementation | ||||
|---|---|---|---|---|---|
| Associated label | <label for="id"> matching <input id="id"> | ||||
| Required indicator | Visual * with aria-hidden="true" plus required | ||||
| Error state | aria-invalid={true} on invalid input | ||||
| Error message | <span role="alert"> linked via aria-describedby | ||||
| Autocomplete | `autocomplete="name\ | email\ | tel\ | ..."` | |
| Grouped inputs | <fieldset> + <legend> for radios/checkboxes/address blocks | ||||
| Success feedback | <div role="status"> |
Tables
<caption>for purpose,<th scope="col">for columns,<th scope="row">for row headers.- Never use tables for layout.
Images
- All
<img>needalt. Decorative:alt=""plusaria-hidden="true". - Always set
widthandheightto prevent layout shift. - SVG icons:
aria-hidden="true" focusable="false"when decorative.
Color & contrast
| Text type | Minimum ratio | |
|---|---|---|
| Normal text (< 18 px) | 4.5:1 | |
| Large text (>= 18 px bold / 24 px) | 3:1 | |
| UI components, borders, icons, focus rings | 3:1 |
- Never use color as the sole indicator — pair with icon, text, or pattern.
- Every color class needs an explicit
dark:counterpart; both modes must independently meet contrast. - Avoid low-contrast muted grays on white (e.g.
text-neutral-400).
Motion
All animations must respect prefers-reduced-motion:
- No blinking or flashing effects (WCAG 2.3.1 — max 3 flashes/sec).
- Tailwind: use
motion-safe:andmotion-reduce:variants. - Scroll-driven animations: provide
@supportsfallback plus reduced-motion override.
ARIA patterns
Navigation with aria-current
Disclosure / accordion
Prefer native <details> + <summary>. For custom accordions use aria-expanded and aria-controls.
Tabs
role="tablist"witharia-labelon container.role="tab"+aria-selectedon each tab; inactive tabstabindex="-1".role="tabpanel"+aria-labelledbyon each panel.- Arrow-key navigation left/right.
Dialog
Prefer native <dialog>. For custom modals:
role="dialog"+aria-modal="true"+aria-labelledby.- Focus trap, Escape closes, return focus to trigger on close.
Live regions
aria-live="polite"for non-urgent status.role="alert"for errors (assertive).role="status"for success messages.
Lists
Tailwind's list-none strips list semantics in Safari — add role="list" when you need the semantic back.
Anti-patterns
New page checklist
langset on<html>.- Single
<h1>, sensible heading hierarchy. - Semantic landmarks in place, skip link works.
- All images have
alt(oralt=""+aria-hidden). - All links have visible underline (or button styling is intentional).
- Icon-only buttons/links have
aria-label. - Form inputs:
<label>,aria-invalid,aria-describedby,autocomplete. - Fieldset + legend for grouped inputs.
- Error messages use
role="alert"; success usesrole="status". - Focus indicators visible, no keyboard traps, all interactive elements reachable.
- Contrast meets 4.5:1 / 3:1 and holds in dark mode.
- No color-only signals.
- Touch targets ≥ 44×44 px.
- Animations respect reduced motion.
- External links:
rel="noopener noreferrer". - Tables:
<caption>and<th scope>.
Testing
Automated (axe-core + Playwright)
Build-time
`@casoon/astro-post-audit` checks after every build for missing alt text, missing labels, empty button text, missing skip link, and heading hierarchy violations.
Manual
- Tab through the page — verify focus order and visibility.
- Screen reader (VoiceOver / NVDA / Orca).
- Zoom to 200 % — content must reflow without horizontal scroll.
- Enable
prefers-reduced-motionin DevTools — animations must stop. - DevTools Accessibility tab — check computed roles and names.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/accessibility-audit/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/casoon/ai-agent-config/accessibility-audit)