Command Palette

Search for a command to run...

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

aria-authoring-patterns

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

Use when building or reviewing a custom interactive widget with no native HTML equivalent (combobox, dialog, menu, tabs, tree and more). Gives the W3C ARIA…

testlandот testland★ 18 звёзд на GitHub

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

aria-authoring-patterns

Overview

The W3C ARIA Authoring Practices Guide (APG) is the canonical reference for how to build accessible custom widgets - patterns where native HTML doesn't have a single matching element (apg-patterns).

The APG documents 31 patterns; each one specifies:

  • The required role attribute.
  • Required and optional aria-* states (e.g. aria-expanded, aria-selected, aria-current).
  • The full keyboard-interaction model (Tab / Arrow keys / Enter / Escape / Home / End / Type-ahead).
  • DOM structure conventions.
  • Common pitfalls.

When to use

  • Authoring a custom widget (Combobox, Tabs, Tree, Carousel, etc.).
  • Reviewing a third-party UI library's component for ARIA correctness.
  • Adding ARIA to an existing widget that was hand-rolled without it.
  • Configuring assertions in axe-a11y (or its pa11y reference) to enforce per-pattern conventions.

The first rule of ARIA

The APG (and WAI more broadly) consistently emphasizes:

No ARIA is better than bad ARIA. Native HTML elements with built-in semantics are preferred over custom widgets whenever possible.

In practice:

Native element Don't replace with
<button> <div role="button"> - same semantics, more code, easier to break.
<input type="checkbox"> Custom checkbox unless visual constraints demand it.
<a href> <div onclick="navigate(...)">.
<select> Custom listbox UNLESS multi-select with rich content per option.
<input type="radio"> Custom radio group.

When the visual design demands a custom widget, follow the matching APG pattern exactly.

Canonical patterns (APG)

The 31 patterns documented per apg-patterns:

Form controls

Pattern When to use Native fallback
Button Trigger an action. <button> - almost always.
Checkbox Two-state binary; or three-state (mixed). <input type="checkbox">.
Combobox Searchable / filterable select with autocomplete. <select> for plain selection only.
Disclosure Show/hide content; one-way reveal. <details> / <summary>.
Listbox Multi-select OR rich-content single-select. <select> for plain.
Menu / Menubar Application menus (File / Edit / View bar). (No native; APG required.)
Menu Button Button that opens a menu. (No native; APG required.)
Radio Group Mutually-exclusive option set. <input type="radio" name="x">.
Slider Single-value within a range. <input type="range">.
Slider (Multi-Thumb) Range selection. (No native; APG required.)
Spinbutton Numeric input with increment/decrement controls. <input type="number">.
Switch On/off toggle, semantically distinct from checkbox. (No native; APG required.)

Containers / navigation

Pattern When to use
Accordion Vertically-stacked list of headers; each expands.
Breadcrumb Hierarchical-location indicator.
Carousel Cycle through groups of equivalent content.
Dialog (Modal) Overlay requiring user interaction. (See wcag-keyboard-navigation references/focus-trap.md.)
Alert Dialog Modal that interrupts to convey urgency.
Tabs Switch between sibling content sections.
Toolbar Group of controls (buttons, dropdowns).
Tree View Hierarchical navigation.
Treegrid Hierarchical data grid (table rows that expand).
Window Splitter Resize between two panes.

Feedback / indicators

| Pattern | When to use | |--------------

Полный SKILL.md на GitHub

Установить aria-authoring-patterns в Claude Code и Claude Desktop

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

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

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

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

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

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

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

.tessl-plugin/plugin.jsonevals/aria-combobox/criteria.jsonevals/aria-combobox/task.mdevals/aria-nav-menu/criteria.jsonevals/aria-nav-menu/task.mdevals/aria-toggle-toast/criteria.jsonevals/aria-toggle-toast/task.mdevals/autocomplete-swallows-what-the-user-types/criteria.jsonevals/autocomplete-swallows-what-the-user-types/task.mdevals/design-review-wants-the-native-controls-replaced/criteria.jsonevals/design-review-wants-the-native-controls-replaced/task.mdevals/design-system-shipped-roles-nobody-announces/criteria.jsonevals/design-system-shipped-roles-nobody-announces/task.mdevals/keyboard-tester-cannot-escape-the-tab-strip/criteria.jsonevals/keyboard-tester-cannot-escape-the-tab-strip/task.mdevals/vendor-datepicker-two-days-from-checkout-launch/criteria.jsonevals/vendor-datepicker-two-days-from-checkout-launch/task.md

FAQ

Что делает скилл aria-authoring-patterns?

Use when building or reviewing a custom interactive widget with no native HTML equivalent (combobox, dialog, menu, tabs, tree and more). Gives the W3C ARIA Authoring Practices pattern: required roles and states, keyboard interaction and common violations.

Как установить скилл aria-authoring-patterns?

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

Скилл aria-authoring-patterns запускает скрипты?

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

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

Сравнить aria-authoring-patterns с