Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

ui-accessibility

БесплатноБез исполняемых скриптовНе проверен

WCAG 2.1 AA accessibility for Laravel, Livewire and Flux UI interfaces — auditing existing screens and building new ones that work with a keyboard, a screen…

nasrulhazimот nasrulhazim★ 26 звёзд на GitHub

Об этом скилле

UI Accessibility

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 Reference

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

When to Use

  • Building any form, modal, dropdown, tab set, table or data view
  • Auditing an existing screen before launch or a compliance review
  • A government, education, healthcare or enterprise deliverable where WCAG 2.1 AA is contractual
  • Someone reports they cannot use a feature with a keyboard or a screen reader
  • Adding dark mode — contrast that passes in light mode routinely fails in dark

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.


1. Semantics First

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.


2. Accessible Names

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>
  • Decorative icons get 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.
  • Never alt="image", alt="icon", or the filename.
  • Link text must make sense out of context — screen reader users list links. "Read more" five times on a page is five identical links. Use "Read the Q3 report" or an 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.


3. The Keyboard Walk

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 gro
Полный SKILL.md на GitHub

Установить ui-accessibility в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/flux-accessibility.mdreferences/wcag-checklist.md

FAQ

Что делает скилл ui-accessibility?

WCAG 2.1 AA accessibility for Laravel, Livewire and Flux UI interfaces — auditing existing screens and building new ones that work with a keyboard, a screen reader and at 200% zoom. Covers semantic HTML over div soup, accessible names and labels, colour contrast in both light and dark mode, visible focus and logical focus order, keyboard traps, modal and dropdown focus management, form errors announced rather than only coloured, live regions for Livewire's asynchronous updates, reduced-motion support, and touch target sizing. Use this skill whenever the user asks to audit or fix accessibility, mentions WCAG, screen readers, keyboard navigation, colour contrast, focus states, ARIA, or alt text, or is building a form, modal, dropdown, table or data view that people must be able to operate without a mouse — including "is this accessible", "run an a11y audit", "check contrast", "add ARIA labels", "make this keyboard navigable", "fix the focus states", "screen reader support", "WCAG compliance", "semak aksesibiliti", "boleh guna keyboard tak", "tambah label untuk screen reader", "warna ni cukup kontras ke", or "buat form ni accessible". Pairs with livewire-flux for the component implementation and frontend-design for the aesthetic direction.

Как установить скилл ui-accessibility?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл ui-accessibility запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить ui-accessibility с