.agents/skills/accessibility/SKILL.md
# Accessibility Skill — AuditKit This skill is auto-included in the generated ZIP when the Accessibility pillar score is below 90. ## WCAG 2.1 Quick Reference The most common failures caught by Lighthouse (axe-core): ## Images ```html <!-- Every <img> needs meaningful alt text --> <img src="/hero.jpg" alt="Team working in a modern office"> <!-- Decorative images use empty alt --> <img src="/divider.svg" alt="" role="presentation"> <!-- Next.js --> <Image src="/hero.jpg" alt="Team working
npx skillsauth add nirholas/auditkit .agents/skills/accessibilityInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill is auto-included in the generated ZIP when the Accessibility pillar score is below 90.
The most common failures caught by Lighthouse (axe-core):
<!-- Every <img> needs meaningful alt text -->
<img src="/hero.jpg" alt="Team working in a modern office">
<!-- Decorative images use empty alt -->
<img src="/divider.svg" alt="" role="presentation">
<!-- Next.js -->
<Image src="/hero.jpg" alt="Team working in a modern office" width={1200} height={600} />
/* Bad — grey text on white */
color: #999999; /* 2.85:1 — fails */
/* Good */
color: #767676; /* 4.54:1 — passes AA */
Check contrast: https://webaim.org/resources/contrastchecker/
<!-- Buttons must have accessible labels -->
<button aria-label="Close dialog">
<svg>...</svg>
</button>
<!-- Links must be descriptive -->
<!-- Bad: -->
<a href="/post">Read more</a>
<!-- Good: -->
<a href="/post">Read more about Core Web Vitals</a>
<!-- Form inputs need labels -->
<label for="email">Email address</label>
<input id="email" type="email" name="email">
// All interactive elements must be keyboard accessible
// Use native elements when possible (button, a, input)
// If using div/span for clicks, add:
<div
role="button"
tabIndex={0}
onClick={handleClick}
onKeyDown={(e) => e.key === 'Enter' && handleClick()}
>
Click me
</div>
<!-- Navigation landmark -->
<nav aria-label="Main navigation">...</nav>
<!-- Skip link (place first in body) -->
<a href="#main-content" class="sr-only focus:not-sr-only">Skip to content</a>
<!-- Live regions for dynamic content -->
<div aria-live="polite" aria-atomic="true">
<!-- Content that updates dynamically -->
</div>
<!-- Modal -->
<dialog aria-modal="true" aria-labelledby="dialog-title">
<h2 id="dialog-title">Dialog Title</h2>
...
</dialog>
<!-- Screen reader only text -->
<span class="sr-only">Loading...</span>
<!-- Focus visible (don't remove outlines!) -->
<button class="focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500">...</button>
# Install axe-core browser extension for manual testing
# Or run Lighthouse in Chrome DevTools → Accessibility
# Automated: axe-playwright
npm install @axe-core/playwright
import { checkA11y } from 'axe-playwright'
test('home page passes accessibility', async ({ page }) => {
await page.goto('/')
await checkA11y(page)
})
development
# Structured Data Skill — AuditKit This skill is auto-included in the generated ZIP when the Structured Data pillar score is below 90. Structured data (Schema.org JSON-LD) helps search engines and AI systems understand your content type — enabling rich results in Google Search and better AI discoverability. --- ## JSON-LD Basics Always use `application/ld+json` script tags in `<head>`. Never use Microdata or RDFa (JSON-LD is the recommended format per Google). ```html <script type="applica
development
# SEO Skill — AuditKit This skill is auto-included in the generated ZIP when the SEO pillar score is below 90. ## Critical Requirements Every page MUST have: - `<title>` tag (50–60 characters) - `<meta name="description">` (120–158 characters) - `<link rel="canonical">` pointing to the preferred URL - At least one `<h1>` tag ## Meta Tags Checklist ```html <head> <!-- Required --> <title>Page Title — Site Name</title> <meta name="description" content="120–158 char description of this s
development
# Security Skill — AuditKit This skill is auto-included in the generated ZIP when the Security pillar score is below 90. ## HTTP Security Headers Add all of these to every response. Vercel users: add to `vercel.json`. Next.js users: add to `next.config.ts`. ### next.config.ts ```typescript const securityHeaders = [ { key: 'Strict-Transport-Security', value: 'max-age=63072000; includeSubDomains; preload', }, { key: 'Content-Security-Policy', value: [ "default-src
development
# Performance Skill — AuditKit This skill is auto-included in the generated ZIP when the Performance pillar score is below 90. ## What it covers Core Web Vitals (LCP, CLS, TBT/FID, FCP, TTFB, Speed Index) and general page weight / render-blocking resource issues. ## Thresholds (Google's "good" targets) | Metric | Good | Needs Improvement | Poor | |--------|------|-------------------|------| | LCP (Largest Contentful Paint) | < 2.5s | 2.5–4s | > 4s | | CLS (Cumulative Layout Shift) | < 0.1 |