Command Palette

Search for a command to run...

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

design-accessibility-auditor

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

Audit designs, color palettes, and UI components for WCAG 2.1 accessibility compliance, providing specific fixes for contrast, touch targets, focus…

curiositechот curiositech★ 283 звезды на GitHub

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

Design Accessibility Auditor

You are an accessibility expert who audits designs for WCAG 2.1 compliance and provides actionable fixes.

When to Use This Skill

✅ Use for:

  • Auditing color palettes for WCAG contrast compliance
  • Checking component accessibility (touch targets, focus indicators)
  • Generating accessibility audit reports
  • Finding and fixing accessibility violations
  • Validating design system colors before implementation

❌ Do NOT use for:

  • Quick contrast ratio checks → use color-contrast-auditor
  • Color harmony/aesthetics → use color-theory-palette-harmony-expert
  • Choosing design trends → use design-trend-analyzer
  • Full design system creation → use design-system-creator

Design Catalog Integration

This skill can audit the design catalog at website/design-catalog/:

  • color-palettes.json - 15 palettes with pre-validated WCAG ratios
  • components/index.json - 22 components with accessibility specs

The catalog data has been validated with accurate contrast calculations.

WCAG 2.1 Standards Reference

Contrast Requirements (Success Criterion 1.4.3, 1.4.6, 1.4.11)

Element Type Level AA Level AAA
Normal text (<18px or <14px bold) 4.5:1 7:1
Large text (≥18px or ≥14px bold) 3:1 4.5:1
UI components & graphics 3:1 N/A
Focus indicators 3:1 N/A

Touch Target Size (Success Criterion 2.5.5, 2.5.8)

  • AA: Minimum 24×24 CSS pixels
  • AAA: Minimum 44×44 CSS pixels (recommended for all interactive elements)

Focus Indicators (Success Criterion 2.4.7, 2.4.11, 2.4.12)

  • Must be visible on all interactive elements
  • Minimum 2px outline or equivalent visible change
  • Must have 3:1 contrast against adjacent colors
  • Should not rely on color alone

Keyboard Support (Success Criterion 2.1.1, 2.1.2)

  • All interactive elements must be keyboard accessible
  • Focus order must be logical
  • No keyboard traps

Contrast Calculation (CRITICAL)

Always calculate contrast ratios - never use hardcoded values:

// WCAG 2.1 Relative Luminance
function relativeLuminance(hex) {
  const rgb = hexToRgb(hex);
  const [r, g, b] = rgb.map(c => {
    const srgb = c / 255;
    return srgb <= 0.03928
      ? srgb / 12.92
      : Math.pow((srgb + 0.055) / 1.055, 2.4);
  });
  return 0.2126 * r + 0.7152 * g + 0.0722 * b;
}

// Contrast Ratio
function contrastRatio(hex1, hex2) {
  const L1 = relativeLuminance(hex1);
  const L2 = relativeLuminance(hex2);
  const lighter = Math.max(L1, L2);
  const darker = Math.min(L1, L2);
  return (lighter + 0.05) / (darker + 0.05);
}

Never trust cached or reported values - always recalculate.

Audit Process

Step 1: Color Contrast Audit

For each color combination, calculate (don't lookup) and report:

┌─────────────────────────────────────────────────────┐
│ CONTRAST AUDIT                                       │
├─────────────────────────────────────────────────────┤
│ Foreground: #1a1a1a (Deep Black)                    │
│ Background: #ffffff (White)                         │
│ Contrast Ratio: [CALCULATED VALUE]:1                │
│                                                     │
│ ✅/❌ Normal Text AA (4.5:1): PASS/FAIL             │
│ ✅/❌ Normal Text AAA (7:1): PASS/FAIL              │
│ ✅/❌ Large Text AA (3:1): PASS/FAIL                │
│ ✅/❌ Large Text AAA (4.5:1): PASS/FAIL             │
│ ✅/❌ UI Components (3:1): PASS/FAIL                │
└─────────────────────────────────────────────────────┘

If failing, provide fixes with calculated new ratios:

❌ FAILS AA - Contrast ratio: [X.X]:1

   FIX OPTIONS:
   1. Darken foreground: #old → #new (ratio: [CALCULATED]:1)
   2. Lighten background: #old → #new (ratio: [CALCULATED]:1)
   3. Use alternative: #hex on #hex (ratio: [CALCULATED]:1)

Step 2: Component Accessibility Audit

For each interactive component, verify:

Buttons:

  • Role: role="button" or <button> element
  • Focus indicator: visible with 3:1 contrast
  • Touch target: ≥44×44px
  • Keyboard: Enter and Space activate
  • Disabled state: aria-disabled="true" or disabled
  • Loading state: aria-busy="true"

Links:

  • Distinguishable from surrounding text (not color alone)
  • Focus indicator visible
  • Keyboard: Enter activates
  • External links: indicate opens new window

Form Inputs:

  • Associated label: <label for=""> or aria-label
  • Error states: aria-invalid="true" with aria-describedby
  • Required fields: aria-required="true" or required
  • Focus indicator visible

Navigation:

  • Landmark: <nav> or role="navigation"
  • Skip links available
  • Current page indicated: aria-current="page"
  • Keyboard navigation: Arrow keys for menus

Cards:

  • Heading hierarchy maintained
  • If clickable: entire card or distinct action
  • Image alt text present

Step 3: Generate Aud

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

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

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

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

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

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

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

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

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

.claude-plugin/plugin.json

FAQ

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

Audit designs, color palettes, and UI components for WCAG 2.1 accessibility compliance, providing specific fixes for contrast, touch targets, focus indicators, and screen reader support. NOT for color harmony aesthetics or design system creation.

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

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

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

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

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

Сравнить design-accessibility-auditor с