WCAG 2.1 AA Accessibility-Audit für Laravel/Blade. Nutze bei: "A11y prüfen", "Barrierefreiheit", "WCAG Audit", "ist das barrierefrei", "aria fehlt", "alt-Texte", "Kontrast", "Tastatur-Navigation", "Screenreader", "A11y Tests", "BITV".
Allgemeine WCAG-Regeln → CLAUDE.md Kapitel 4. Dieser Skill fokussiert auf Laravel/Blade-spezifische Audit-Methodik.
| Schritt | Aktion |
|---|---|
| 1. Scan | Blade-Templates, Layouts, Components finden und analysieren |
| 2. Analyse | WCAG-Kriterien gegen Code prüfen (siehe Checkliste) |
| 3. Fix | Automatisch behebbare Issues fixen |
| 4. Test | Pest-Tests für dauerhafte A11y-Sicherung |
| 5. Report | Ergebnisse als Markdown/JSON |
find resources/views -name "*.blade.php" | sort
grep -rln "<form\|wire:submit" resources/views/ --include="*.blade.php"
grep -rln "onclick\|@click\|x-on:click" resources/views/ --include="*.blade.php"
grep -rln "<img" resources/views/ --include="*.blade.php"
Bilder:
<img> ohne alt → Fix: alt="" (dekorativ) oder beschreibender Textalt aus custom_properties.alt ziehenFormulare:
<label for="id"> oder aria-labelwire:model Inputs: Label nicht vergessen@error Block mit role="alert" oder aria-describedbyInteraktive Elemente:
aria-expanded, aria-controls setzenrole="dialog", aria-modal="true", Focus-Traprole="listbox", Keyboard-NavigationNavigation:
<a href="#main-content" class="sr-only focus:not-sr-only"><nav aria-label="Hauptnavigation"> – nicht nur <nav>aria-expanded auf Toggle-ButtonDynamischer Content:
aria-live="polite" auf Containeraria-busy="true" während Ladenit('all images have alt attributes', function () {
$response = $this->get('/');
$response->assertDontSee('<img ', false); // Oder:
// DOM parsen und prüfen dass jedes <img> alt hat
});
it('all forms have labels', function () {
$response = $this->get('/kontakt');
$response->assertSee('<label', false);
});
it('skip link exists', function () {
$response = $this->get('/');
$response->assertSee('skip', false);
});
it('page has exactly one h1', function () {
$response = $this->get('/');
expect(substr_count($response->getContent(), '<h1'))->toBe(1);
});
# A11y Audit – {Projekt}
## Zusammenfassung
{X} Kritisch, {Y} Wichtig, {Z} Hinweise
## Findings
| # | Severity | WCAG | Problem | Datei | Fix |
|---|----------|------|---------|-------|-----|
| 1 | Kritisch | 1.1.1 | Bild ohne alt | show.blade.php:42 | alt="" hinzufügen |