Command Palette

Search for a command to run...

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

accessibility-expert

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

Build interfaces usable by everyone: WCAG 2.2 conformance, semantic HTML, ARIA, keyboard navigation, screen readers and accessible forms. Use when the user…

personamanagmentlayerот personamanagmentlayer★ 46 звёзд на GitHub

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

Accessibility Expert

Accessibility is a property of the markup and the interaction model, not a layer added afterwards. Most of it is achieved by using the right element; the rest is focus, contrast and honest testing.

Core Concepts

The Four Principles

WCAG organises everything under POUR:

  • Perceivable — information must be available to at least one sense that works for the user: text alternatives, captions, sufficient contrast.
  • Operable — every function must be reachable and usable by keyboard, with enough time and no seizure triggers.
  • Understandable — predictable behaviour, readable text, errors that explain themselves.
  • Robust — valid markup and correct semantics, so assistive technology can interpret it.

Conformance levels: A (minimum), AA (the legal and practical target), AAA (specific contexts). Regulation generally requires AA — the European Accessibility Act applies from 28 June 2025 to consumer-facing digital products and services in the EU, and Section 508 applies to US federal procurement.

The Right Element Is Most of the Work

<!-- Not focusable, no role, no keyboard activation, invisible to screen readers -->
<div class="btn" onclick="submit()">Submit</div>

<!-- Focusable, announced as a button, responds to Enter and Space, free -->
<button type="submit">Submit</button>

Native elements bring focus behaviour, keyboard handling, state announcement and platform conventions. Recreating them with div and ARIA means reimplementing all of it, and the reimplementation is where the defects live.

ARIA's First Rule Is Not to Use It

Use ARIA only when no native element expresses the semantics. Incorrect ARIA is worse than none: it overrides what the browser would have reported correctly.

Keyboard

Everything achievable with a mouse must be achievable with a keyboard, in a sensible order, with a visible focus indicator.

/* Never remove focus indication without replacing it */
:focus-visible {
  outline: 3px solid #0b5fff;
  outline-offset: 2px;
}

/* This is a defect, not a style choice */
*:focus {
  outline: none;
}

WCAG 2.2 added 2.4.11 Focus Not Obscured: the focused element must not be hidden behind a sticky header or cookie banner. Test by tabbing through the page with the header visible.

Focus management

Focus must go somewhere sensible after a view change, and must be trapped inside a modal while it is open.

function openDialog(dialog, invoker) {
  dialog.showModal(); // <dialog> traps focus natively
  dialog.querySelector('[autofocus], button, [href], input')?.focus();

  dialog.addEventListener('close', () => invoker.focus(), { once: true });
}

Returning focus to the element that opened the dialog is what keeps a keyboard user oriented. Losing focus to <body> means starting the tab sequence again.

For single-page navigation, move focus to the new page's heading and announce the change:

function onRouteChange(title) {
  document.title = title;
  const heading = document.querySelector('main h1');
  heading.setAttribute('tabindex', '-1'); // focusable programmatically, not by tab
  heading.focus();
}

Skip links

<a class="skip-link" href="#main">Skip to main content</a>
…
<main id="main" tabindex="-1">…</main>
.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  position: fixed;
  z-index: 999;
}

Semantics and Structure

<header>
  <nav aria-label="Primary">…</nav>
</header>
<main id="main">
  <h1>Invoices</h1>
  <section aria-labelledby="overdue-heading">
    <h2 id="overdue-heading">Overdue</h2>
    …
  </section>
</main>
<footer>…</footer>
  • One <h1> per page, and headings that descend without skipping levels. Screen reader users navigate by heading; a broken outline is a broken map.
  • Label repeated landmarks — several <nav> elements need aria-label to be distinguishable.
  • Lists for lists, <table> for tabular data with <th scope> and a <caption>.

Images and Media

<!-- Informative: describe the information, not the picture -->
<img
  src="chart.png"
  alt="Revenue grew from €1.2M to €1.8M between January and June 2026"
/>

<!-- Decorative: hide it -->
<img src="divider.svg" alt="" />

<!-- Functional: describe the action -->
<button><img src="trash.svg" alt="Delete invoice INV-2026-0042" /></button>

An empty alt is correct for decoration; a missing alt makes the screen reader read the filename. Never write "image of" — the role is already announced.

Video needs captions (1.2.2) and audio description where visual information is not in the soundtrack (1.2.5). Auto-generated captions are a starting point, not conformance.

Forms

Forms are where accessibility failures cost the most, because they block completion.

<div class="field">
  <label for="vat">VAT number</label>
  <input
    id="vat"
Полный SKILL.md на GitHub

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

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

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

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

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

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

Read
Write
Edit
Bash(npm:*, npx:*, node:*)
Grep
Glob

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

references/COMPONENTS.md

FAQ

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

Build interfaces usable by everyone: WCAG 2.2 conformance, semantic HTML, ARIA, keyboard navigation, screen readers and accessible forms. Use when the user mentions accessibility, a11y, WCAG, ARIA, screen readers, keyboard navigation, colour contrast, focus management, the European Accessibility Act or Section 508, or when the task involves making a component, form, modal or data table usable without a mouse or with assistive technology.

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

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

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

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

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

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