accessibility-code
1
总安装量
1
周安装量
#76377
全站排名
安装命令
npx skills add https://github.com/jllerenadesign/a11y-skills --skill accessibility-code
Agent 安装分布
amp
1
cline
1
opencode
1
cursor
1
kimi-cli
1
codex
1
Skill 文档
Accessibility Code Auditor
Audit and fix accessibility issues in any live web page or codebase. Works on HTML output â framework doesn’t matter.
Input types
- URL â live page in production (Framer, Webflow, Next.js, anything)
- Code file(s) â HTML, JSX, Vue, Svelte, or any template file
- Snippet â pasted component or block of markup
If given a URL, analyze the rendered HTML/DOM. If given source code, analyze the markup as written. The rules are the same either way.
Modes
/audit <url or file>â Full WCAG 2.2 AA audit, scored report/fix <file>â Targeted fixes only, minimal changes (no rewrites)/audit-component <snippet>â Audit a single component or pattern/quick <url or file>â Critical issues only, fast scan/audit-rtl <url or file>â RTL/bilingual audit for EN/AR pages
If no mode is specified, infer from context. Default to /audit.
If Arabic text, dir="rtl", or lang="ar" is detected at any point, automatically apply RTL rules from references/rtl-code.md.
Phase 1: Scan
Read references/wcag-code.md before starting any audit.
Scan in priority order:
| Priority | Category | What to check |
|---|---|---|
| ð´ Critical | Accessible names | Buttons, links, inputs without labels |
| ð´ Critical | Keyboard access | Elements unreachable by Tab, missing Enter/Space |
| ð´ Critical | Focus management | Modals without focus trap, focus not restored |
| ð Serious | Semantics | Divs/spans used as buttons, missing landmarks |
| ð Serious | Forms | Missing labels, no error association, no aria-invalid |
| ð Serious | Focus visibility | Outline removed, no visible replacement |
| ð Serious | RTL structure | Missing dir="rtl" on <html> or containers, broken layout |
| ð¡ Moderate | Announcements | Dynamic content without aria-live |
| ð¡ Moderate | Heading hierarchy | Skipped levels, multiple H1s |
| ð¡ Moderate | Images | Missing alt, wrong alt on functional images |
| ð¡ Moderate | Bidi text | Mixed EN/AR inline without dir isolation |
| ðµ Info | Touch targets | Elements < 24Ã24px |
| ðµ Info | Motion | No prefers-reduced-motion handling |
| ðµ Info | Arabic font | System fallback used instead of proper Arabic typeface |
Phase 2: Generate report
Always use this format:
âââââââââââââââââââââââââââââââââââââââââââââââââââ
ACCESSIBILITY AUDIT: [URL or filename]
Stack: [detected or "unknown"] · Level: WCAG 2.2 AA
âââââââââââââââââââââââââââââââââââââââââââââââââââ
CRITICAL (X issues)
âââââââââââââââââââ
[A11Y] Icon button â navigation toggle
Issue: No accessible name. Screen readers announce "button" with no context.
Location: <header> â <nav> â first button
Current: <button><svg>...</svg></button>
Fix: <button aria-label="Open navigation menu"><svg aria-hidden="true">...</svg></button>
WCAG: 4.1.2 Name, Role, Value
SERIOUS (X issues)
ââââââââââââââââââ
[A11Y] Form input â email field
Issue: Input has no associated label. Placeholder is not a label.
Location: <form#newsletter>
Current: <input type="email" placeholder="Enter your email">
Fix: <label for="email">Email address</label>
<input type="email" id="email" placeholder="Enter your email">
WCAG: 1.3.1 Info and Relationships
MODERATE (X issues)
âââââââââââââââââââ
[A11Y] Toast notification
Issue: Success message injected into DOM but not announced to screen readers.
Location: <div class="toast">
Current: <div class="toast">Item saved!</div>
Fix: <div class="toast" role="status" aria-live="polite">Item saved!</div>
WCAG: 4.1.3 Status Messages
INFO (X notes)
ââââââââââââââ
[A11Y] Heading hierarchy
Note: Page jumps from H1 to H3 in the features section.
Suggestion: Add H2 "Features" or change H3s to H2s.
WCAG: 1.3.1 Info and Relationships
âââââââââââââââââââââââââââââââââââââââââââââââââââ
SCORE: XX / 100
âââââââââââââââââââââââââââââââââââââââââââââââââââ
Total issues: X
ð´ Critical: X (-10 pts each)
ð Serious: X (-5 pts each)
ð¡ Moderate: X (-2 pts each)
ðµ Info: X (no deduction)
Quick wins (easy + high impact):
⨠[specific fix] â ~X min
⨠[specific fix] â ~X min
âââââââââââââââââââââââââââââââââââââââââââââââââââ
Phase 3: Fixes (if /fix mode)
Read references/wcag-code.md for correct patterns per issue type.
Rules for fixes:
- Prefer native HTML over ARIA when possible
- Make minimal, targeted changes â don’t refactor unrelated code
- Don’t add ARIA where native semantics already solve the problem
- Quote the exact current code, then show the fixed version
- For complex widgets (menu, combobox, dialog), use established patterns from WAI-ARIA APG â don’t invent custom behavior
Fix output format:
FIX: [Issue title]
File: [filename or "inline"]
BEFORE:
[exact current code]
AFTER:
[fixed code]
Why: [one sentence explaining the change]
Output behavior
- Always show exact code snippets â never vague descriptions
- Explain the user impact in plain language (“Screen readers will announce X”)
- For
/fixmode, never rewrite more than needed - For URL audits, note that automated analysis may miss visual-only issues (color contrast, small text) â recommend manual verification with browser tools
Reference files
references/wcag-code.mdâ ARIA patterns, semantic HTML, keyboard rulesreferences/audit-report.mdâ Extended report template and scoring referencereferences/rtl-code.mdâ RTL/bilingual rules: dir attribute, bidi ARIA, Arabic font stacks, mirroring