/claude-toolkit:ui-accessibilityfrom claude-toolkit
Audits and fixes WCAG 2.1 AA accessibility for Laravel, Livewire and Flux UI interfaces. Covers semantic HTML, keyboard navigation, colour contrast, focus management, form error announcements, and screen reader support.
Ships in claude-toolkit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Accessibility is not a pass at the end. It is semantic HTML, a real label, a visible focus ring and enough contrast — decisions made while the component is written, when they cost nothing.
The 80% rule: most real accessibility failures in a Laravel app come from five things —
a <div> used as a button, a form input with no associated label, an icon-only control with
no accessible name, invisible or removed focus styles, and text below contrast minimum in
dark mode. Fix those five and you have fixed most of what a real user hits.
| Command | Description |
|---|---|
/a11y audit | Audit a page or component against WCAG 2.1 AA |
/a11y keyboard | Walk the keyboard path — focus order, traps, visible focus |
/a11y contrast | Check colour contrast in light and dark mode |
/a11y forms | Audit labels, error association and announcement |
/a11y livewire | Audit async updates — live regions, loading and focus after re-render |
/a11y fix | Apply the fixes, in severity order |
Do not treat an automated checker's clean report as a pass. Automated tools catch roughly a third of WCAG failures. The keyboard walk in section 3 catches most of the rest, and it takes two minutes.
Every ARIA attribute you add is a correction for markup that should have been semantic. The first rule of ARIA is not to use ARIA.
{{-- ❌ Not focusable, not activatable by keyboard, not announced as a control --}}
<div class="btn" wire:click="save">Save</div>
{{-- ✅ Focusable, Enter and Space work, announced as "Save, button" --}}
<button type="button" wire:click="save">Save</button>
| Instead of | Use | You get for free |
|---|---|---|
<div class="btn"> | <button> | Focus, Enter/Space, role, disabled state |
<div onclick> navigating | <a href> | Focus, Enter, right-click, open in new tab |
<div class="heading"> | <h1>–<h6> | Screen reader heading navigation |
<div class="list"> | <ul> / <ol> / <li> | "List, 5 items" announced |
Styled <div> grid | <table> with <th scope> | Row/column announcement while navigating cells |
Custom checkbox <div> | <input type="checkbox"> | State, keyboard, form submission |
<div> sections | <main>, <nav>, <header>, <footer>, <aside> | Landmark navigation |
One <h1> per page. Heading levels descend without skipping — <h2> then <h3>, never
<h2> then <h4> because the size looked right. Size is CSS; level is structure.
Every interactive control needs a name a screen reader can announce. An icon is not a name.
{{-- ❌ Announced as "button" --}}
<button wire:click="delete"><x-icon name="trash" /></button>
{{-- ✅ Announced as "Delete invoice, button" --}}
<button wire:click="delete" aria-label="Delete invoice">
<x-icon name="trash" aria-hidden="true" />
</button>
{{-- ✅ Better — visible text, hidden only visually --}}
<button wire:click="delete">
<x-icon name="trash" aria-hidden="true" />
<span class="sr-only">Delete invoice</span>
</button>
aria-hidden="true" so they are not announced twice.alt="" on a decorative image; a real description on an informative one; for a chart or
diagram, describe the finding, not the picture.alt="image", alt="icon", or the filename.aria-label.{{-- Utility class every project needs --}}
<style>
.sr-only {
position: absolute; width: 1px; height: 1px;
padding: 0; margin: -1px; overflow: hidden;
clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
</style>
Tailwind ships sr-only and not-sr-only already — use those.
Two minutes, and it catches more than any automated tool. Put the mouse down and Tab through the page.
| Check | Pass condition |
|---|---|
| Every control reachable | Tab reaches every button, link, input and custom control |
| Focus is visible | You can always see where you are, in both light and dark mode |
| Order is logical | Focus follows the visual reading order, not DOM accident |
| No trap | Tab always moves on; Escape closes any overlay |
| Enter and Space | Enter activates links and buttons; Space activates buttons and checkboxes |
| Escape | Closes modals, dropdowns and popovers, and returns focus |
| Arrow keys | Move within tabs, menus, radio groups and listboxes |
| Skip link | First Tab on the page offers "Skip to main content" |
/* ❌ The single most common accessibility failure in a styled app */
*:focus { outline: none; }
/* ✅ Remove it for mouse users only, and give keyboard users something visible */
:focus-visible {
outline: 2px solid var(--focus-color, #2563eb);
outline-offset: 2px;
border-radius: 2px;
}
The focus indicator needs 3:1 contrast against its background — check it in dark mode too.
{{-- First focusable element in the layout --}}
<a href="#main" class="sr-only focus:not-sr-only focus:absolute focus:top-2 focus:left-2 focus:z-50 focus:px-4 focus:py-2 focus:bg-white focus:text-black">
Skip to main content
</a>
…
<main id="main" tabindex="-1">…</main>
Never use a positive tabindex. tabindex="0" puts a custom control in natural order;
tabindex="-1" makes an element focusable by script only. A positive value fights the
document and breaks the moment the layout changes.
{{-- ✅ Label associated, error announced, invalid state exposed --}}
<div>
<label for="email">Email address</label>
<input
type="email"
id="email"
wire:model.blur="email"
autocomplete="email"
required
aria-describedby="email-hint @error('email') email-error @enderror"
@error('email') aria-invalid="true" @enderror
>
<p id="email-hint" class="text-sm text-gray-600">We only use this for receipts.</p>
@error('email')
<p id="email-error" role="alert" class="text-sm text-red-700">{{ $message }}</p>
@enderror
</div>
| Rule | Why |
|---|---|
Every input has a <label for> — or aria-label where no visible label exists | Placeholder is not a label: it disappears on typing and often fails contrast |
Errors linked with aria-describedby and marked aria-invalid | Otherwise the input is announced with no indication it failed |
role="alert" on the error message | Announces the error when it appears, without moving focus |
| Never colour alone for state | Add an icon, text, or a border change — see WCAG 1.4.1 |
autocomplete on personal fields | WCAG 1.3.5, and it is a real convenience win |
required and aria-required on mandatory fields | Announced before the user commits to typing |
| Fieldset + legend for radio and checkbox groups | Otherwise the group question is never announced |
| Error summary at the top on submit, focused | On a long form, per-field errors alone leave the user hunting |
Group inputs properly:
<fieldset>
<legend>Delivery method</legend>
<label><input type="radio" name="delivery" value="post" wire:model="delivery"> Post</label>
<label><input type="radio" name="delivery" value="pickup" wire:model="delivery"> Pickup</label>
</fieldset>
WCAG 2.1 AA minimums:
| Content | Ratio |
|---|---|
| Body text | 4.5:1 |
| Large text (18pt / 14pt bold and above) | 3:1 |
| UI components, icons, borders, focus rings | 3:1 |
| Disabled controls | Exempt, but still make them legible |
Check both themes. A palette tuned in light mode routinely fails in dark — grey-on-grey secondary text is the usual casualty. Test with the actual rendered values, not the design file.
# Quick check while iterating
npx @adobe/leonardo-contrast-colors --help
# Or the browser: devtools → inspect an element → the contrast ratio is in the colour picker
Never encode meaning in colour alone (WCAG 1.4.1). A red border on an invalid field is invisible to a colourblind user and to a screen reader — add the message and the icon. A status chart needs labels or patterns, not just hues.
Respect the user's system settings:
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
Also support 200% zoom and 320px width without horizontal scrolling (WCAG 1.4.10) — use relative units and let content reflow rather than fixing pixel widths.
Livewire's asynchronous updates are invisible to a screen reader unless you announce them, and re-renders can throw focus away mid-task.
{{-- Announce async results without stealing focus --}}
<div aria-live="polite" aria-atomic="true" class="sr-only">
@if($saved) Changes saved. @endif
@if($results) {{ count($results) }} results found. @endif
</div>
{{-- Loading state announced, not just a spinner --}}
<div wire:loading role="status">
<span class="sr-only">Loading results…</span>
<x-spinner aria-hidden="true" />
</div>
{{-- Disable a control while its action is in flight --}}
<button wire:click="save" wire:loading.attr="disabled" wire:target="save">
Save
</button>
aria-live value | Use for |
|---|---|
polite | Almost everything — search results, save confirmations, counts |
assertive | Errors and time-critical warnings only. It interrupts |
off | Default; the region is not announced |
Live-region rules that trip people up:
wire:key so Livewire does not replace the
node.{{-- Preserve focus across a re-render --}}
<input type="search" wire:model.live.debounce.400ms="query" wire:key="search-input">
wire:key so Livewire patches rather than replaces them — a replaced
node loses focus and the caret position mid-typing.<body>.Flux UI handles roles, aria-expanded, focus trapping and Escape for its primitives. Your
job is the part it cannot infer:
flux:buttonflux:field + flux:label pairing for every input, not a bare flux:inputflux:modal — it becomes the dialog's accessible nameVerify rather than assume: Tab through the rendered component and read the DOM. A component library gets you most of the way; it does not get you all of it.
# Automated — catches roughly a third of issues
npx @axe-core/cli http://localhost:8000 --tags wcag2a,wcag2aa
npx pa11y http://localhost:8000 --standard WCAG2AA
npx lighthouse http://localhost:8000 --only-categories=accessibility
Then do what the tools cannot:
Cmd+F5 on macOS) or NVDA on Windows. Tab
through one form and one data table and listen to what is announced.| Rationalization | Reality |
|---|---|
| "The axe scan is clean, we're accessible" | Automated tools catch about a third of WCAG failures. They cannot judge focus order, a wrong accessible name, or whether the keyboard path makes sense. |
| "Our users don't use screen readers" | You do not know that, and you never will — it is not something users announce. Keyboard-only use is also common after an injury, on a trackpad-less desk, and among power users. |
| "I'll add ARIA to make it accessible" | ARIA changes what is announced, never what works. role="button" on a <div> still does not respond to Space or receive focus. Use <button>. |
| "The placeholder says what the field is" | Placeholders vanish on the first keystroke, usually fail contrast, and are not reliably announced. It is not a label. |
| "We'll do accessibility in a later phase" | Retrofitting means rewriting components. Written in, it costs nothing; bolted on, it costs a sprint. |
| "The focus ring ruins the design" | Then design a better one. outline: none with no replacement makes the interface unusable for keyboard users — that is a bigger design failure. |
| "Red text is obviously an error" | Not to a colourblind user, and not to a screen reader. Colour is an enhancement, never the only signal. |
| "Flux handles accessibility for us" | Flux handles the primitives. It cannot supply an accessible name for your icon button or decide your focus order. Verify. |
| "It's an internal admin tool" | Staff have disabilities, and internal tools are exactly where people spend eight hours a day. |
| "The div works fine when I click it" | You are testing with a mouse. The failure is only visible when you put it down. |
outline: none or *:focus { outline: none } with no :focus-visible replacement<div> or <span> with wire:click, onclick, or a .btn classaria-label and no sr-only text<input> with only a placeholder and no <label>tabindex value<h1>s on one pagealt="image", alt="icon", alt="photo", or an alt that is a filenamearia-live added at the same moment as the content it should announcewire:key, losing focus mid-typingprefers-reduced-motion guardaria-describedby, marked aria-invalid, and announcedaria-hidden<h1>wire:key and keep focus across re-rendersprefers-reduced-motion is respectednpx @axe-core/cli --tags wcag2a,wcag2aa reports no violations| File | Read When |
|---|---|
references/wcag-checklist.md | Running a full WCAG 2.1 AA audit — criterion by criterion, with the check for each |
references/flux-accessibility.md | Building or fixing Livewire/Flux components — patterns for modals, dropdowns, tables, tabs and toasts |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
43 skills in this plugin
/business-cardSVG business card designer that takes contact details and brand preferences, then produces 12 front design concepts with optional back designs, interactive HTML preview galleries, individual card showcases with front/back flip animation, and print-ready SVG exports with bleed area and crop marks. Supports horizontal and vertical orientations, six layout styles (minimal, corporate, creative, elegant, bold, tech), multiple color schemes, QR code placeholders, social media icons, and logo integration. Use this skill whenever the user asks to design a business card, create a name card, make visiting cards, or says "design business card", "buat kad bisnes", "create name card", "reka kad perniagaan", "design kad nama", "I need a business card for X".
/ci-cd-pipelineCI/CD pipeline builder for Laravel projects — extends Kickoff's existing GitHub Actions CI with continuous deployment pipelines (staging/production), Docker containerisation, secret management, and failure notifications. Generates Dockerfiles, docker-compose.yml, deployment configs for VPS via SSH, container registry push workflows, and leverages Kickoff's /bin scripts (deploy.sh, backup.sh, setup.sh) in automated workflows. Use this skill whenever the user asks to set up deployment pipelines, containerise a Laravel app, configure CD for staging or production, push Docker images to a registry, manage deployment secrets, add failure notifications to CI, or integrate /bin scripts with GitHub Actions. Triggers for requests like "set up CD pipeline", "deploy to staging automatically", "dockerise my Laravel app", "add Docker to my project", "push image to registry", "manage secrets in CI", "notify on failure", "extend CI with deployment", "setup deploy pipeline", "nak deploy guna GitHub Actions", "tambah Docker dalam project", "setup CD untuk staging", "nak auto deploy ke production", "dockerise Laravel app aku", "tambah notification kalau CI fail", "macam mana nak manage secrets dalam GitHub Actions", or "integrate bin scripts dengan CI". Assumes Laravel Kickoff as the baseline — GitHub Actions CI (Pint, PHPStan, Rector, Pest) and /bin scripts (deploy.sh, backup.sh) are already configured. This skill extends that baseline with CD, Docker, and deployment automation.
/code-qualityPHP and Laravel code quality toolchain — static analysis with Larastan/PHPStan, code style enforcement with Pint, automated refactoring with Rector, baseline management for legacy codebases, and CI pipeline integration via GitHub Actions. Use this skill whenever the user asks to check code quality, fix linting errors, run static analysis, modernise PHP code, set up CI quality gates, manage PHPStan baselines, configure Pint presets, or apply Rector rules. Triggers for requests like "run quality check", "fix my code style", "analyse with larastan", "update phpstan baseline", "modernise my PHP code", "set up CI for quality", "check code quality", "pint tak jalan", "nak fix phpstan error", "setup rector", "betulkan code style", "tambah quality gate dalam CI", or "baseline phpstan untuk legacy code". Assumes Laravel Kickoff as the baseline — PHPStan, Pint, Rector, and GitHub Actions CI are already configured. This skill extends and customises that baseline.
/courseware-builderInteractive HTML courseware builder — turns any technical topic, flow, or process into a CD-Courseware-style interactive slide deck with animated diagrams, step-by-step simulation, syntax-highlighted code examples, and key points panels. Use this skill whenever the user wants to create teaching materials, interactive slides, animated flow diagrams, or step-by-step technical walkthroughs — even if they say "buatkan slides untuk topik X", "jadikan courseware", "buat interactive tutorial", or "create a lesson on X". Also triggers for "convert my diagram to interactive slides" or "build a visual walkthrough for my training".
/debuggingSystematic debugging and error recovery for Laravel and PHP projects — a five-step triage that goes reproduce, localise, reduce, fix, guard. Covers reading a stack trace properly, bisecting with git, isolating a failure to the smallest reproducer, telling a symptom apart from a root cause, and closing every fix with a regression test. Includes Laravel-specific traps: N+1 masked as a timeout, queue jobs failing silently on the wrong connection, cache and config caches serving stale values, Livewire state desync, and eloquent/model events firing in unexpected order. Use this skill whenever the user reports something broken, failing, flaky, slow-then-erroring, or behaving differently in production than locally — including "this test is flaky", "why is this failing", "debug this error", "it works locally but not on staging", "find the root cause", "this exception makes no sense", "the queue job never runs", "bisect this regression", "kenapa error ni", "tolong debug", "test ni kejap pass kejap fail", "cari punca sebenar", "jalan kat local tapi tak jalan kat production", or "job queue tak jalan". Pairs with kickoff-pest-testing for the regression test and log-monitor for production-log-driven investigations.
/deploy-appDeploys a Kickoff-based Laravel application to its host by running `bin/deploy` over SSH, then verifies the release and knows what each way it can stop means. Use this skill whenever the user asks to deploy an app, push the latest code to production, check what commit production is running, bring a site back up after a failed deploy, or roll back — "deploy latest", "deploy the app", "tolong deploy", "deploy latest dulu", "push to production", "apa commit dekat production", "site down after deploy", "keluarkan maintenance mode", "rollback production", "kenapa 503". Covers the deploy command and its flags, the post-deploy verification checklist, the recovery path for each failure mode, and the production traps that have already cost time. Does NOT cover provisioning a new host from bare metal (`bin/provision-host`), CI/CD pipeline design (`ci-cd-pipeline`), or writing deploy operations.
npx claudepluginhub nasrulhazim/claude --plugin claude-toolkitOther plugins' skills for the same job