Audit and improve web accessibility following WCAG 2.1 guidelines. Use when asked to "improve accessibility", "a11y audit", "WCAG compliance", "screen reader support", "keyboard navigation", or "make accessible".
Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Audit and improve web accessibility following WCAG 2.1 guidelines. Use when asked to "improve accessibility", "a11y audit", "WCAG compliance", "screen reader support", "keyboard navigation", or "make accessible".
license
MIT
metadata
{"author":"web-quality-skills","version":"1.0"}
Accessibility (a11y)
Comprehensive accessibility guidelines based on WCAG 2.1 and Lighthouse accessibility audits. Goal: make content usable by everyone, including people with disabilities.
WCAG Principles: POUR
Principle
Description
Perceivable
Content can be perceived through different senses
Operable
Interface can be operated by all users
Understandable
Content and interface are understandable
Robust
Content works with assistive technologies
Conformance levels
Level
Requirement
Target
A
Minimum accessibility
Must pass
AA
Standard compliance
Should pass (legal requirement in many jurisdictions)
AAA
Enhanced accessibility
Nice to have
Perceivable
Text alternatives (1.1)
Images require alt text:
<!-- ❌ Missing alt --><imgsrc="chart.png"><!-- ✅ Descriptive alt --><imgsrc="chart.png"alt="Bar chart showing 40% increase in Q3 sales"><!-- ✅ Decorative image (empty alt) --><imgsrc="decorative-border.png"alt=""role="presentation"><!-- ✅ Complex image with longer description --><figure><imgsrc="infographic.png"alt="2024 market trends infographic"aria-describedby="infographic-desc"><figcaptionid="infographic-desc"><!-- Detailed description --></figcaption></figure>
Icon buttons need accessible names:
<!-- ❌ No accessible name --><button><svg><!-- menu icon --></svg></button><!-- ✅ Using aria-label --><buttonaria-label="Open menu"><svgaria-hidden="true"><!-- menu icon --></svg></button><!-- ✅ Using visually hidden text --><button><svgaria-hidden="true"><!-- menu icon --></svg><spanclass="visually-hidden">Open menu</span></button>
<!-- ❌ Only color indicates error --><inputclass="error-border"><style>.error-border { border-color: red; }</style><!-- ✅ Color + icon + text --><divclass="field-error"><inputaria-invalid="true"aria-describedby="email-error"><spanid="email-error"class="error-message"><svgaria-hidden="true"><!-- error icon --></svg>
Please enter a valid email address
</span></div>
Media alternatives (1.2)
<!-- Video with captions --><videocontrols><sourcesrc="video.mp4"type="video/mp4"><trackkind="captions"src="captions.vtt"srclang="en"label="English"default><trackkind="descriptions"src="descriptions.vtt"srclang="en"label="Descriptions"></video><!-- Audio with transcript --><audiocontrols><sourcesrc="podcast.mp3"type="audio/mp3"></audio><details><summary>Transcript</summary><p>Full transcript text...</p></details>
Operable
Keyboard accessible (2.1)
All functionality must be keyboard accessible:
// ❌ Only handles click
element.addEventListener('click', handleAction);
// ✅ Handles both click and keyboard
element.addEventListener('click', handleAction);
element.addEventListener('keydown', (e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
handleAction();
}
});
<body><ahref="#main-content"class="skip-link">Skip to main content</a><header><!-- navigation --></header><mainid="main-content"tabindex="-1"><!-- main content --></main></body>
<!-- ❌ No language specified --><html><!-- ✅ Language specified --><htmllang="en"><!-- ✅ Language changes within page --><p>The French word for hello is <spanlang="fr">bonjour</span>.</p>
Consistent navigation (3.2.3)
<!-- Navigation should be consistent across pages --><navaria-label="Main"><ul><li><ahref="/"aria-current="page">Home</a></li><li><ahref="/products">Products</a></li><li><ahref="/about">About</a></li></ul></nav>
Form labels (3.3.2)
<!-- ❌ No label association --><inputtype="email"placeholder="Email"><!-- ✅ Explicit label --><labelfor="email">Email address</label><inputtype="email"id="email"name="email"autocomplete="email"required><!-- ✅ Implicit label --><label>
Email address
<inputtype="email"name="email"autocomplete="email"required></label><!-- ✅ With instructions --><labelfor="password">Password</label><inputtype="password"id="password"aria-describedby="password-requirements"><pid="password-requirements">
Must be at least 8 characters with one number.
</p>
Error handling (3.3.1, 3.3.3)
<!-- Announce errors to screen readers --><formnovalidate><divclass="field"aria-live="polite"><labelfor="email">Email</label><inputtype="email"id="email"aria-invalid="true"aria-describedby="email-error"><pid="email-error"class="error"role="alert">
Please enter a valid email address (e.g., name@example.com)
</p></div></form>
// Focus first error on submit
form.addEventListener('submit', (e) => {
const firstError = form.querySelector('[aria-invalid="true"]');
if (firstError) {
e.preventDefault();
firstError.focus();
// Announce error summaryconst errorSummary = document.getElementById('error-summary');
errorSummary.textContent = `${errors.length} errors found. Please fix them and try again.`;
errorSummary.focus();
}
});
<!-- Status updates --><divaria-live="polite"aria-atomic="true"class="status"><!-- Content updates announced to screen readers --></div><!-- Urgent alerts --><divrole="alert"aria-live="assertive"><!-- Interrupts current announcement --></div>