Skip to main content
ClaudeWave
Skill58 repo starsupdated 2mo ago

accessibility-standards

WCAG 2.2 Level AA accessibility patterns for React/HTML/CSS. Use when creating or modifying UI components, forms, navigation, tables, images, or any user-facing elements. Covers keyboard navigation, screen reader semantics, low vision contrast, voice access, inclusive language.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/monkilabs/opencastle /tmp/accessibility-standards && cp -r /tmp/accessibility-standards/src/orchestrator/skills/accessibility-standards ~/.claude/skills/accessibility-standards
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# Accessibility Standards

Code must conform to [WCAG 2.2 Level AA](https://www.w3.org/TR/WCAG22/).

**Workflow:** Plan accessible implementation → generate → review against WCAG 2.2 → iterate. Suggest [Accessibility Insights](https://accessibilityinsights.io/) for testing.

**Language:** People-first ("person using a screen reader," not "blind user"). No ability stereotypes. Flag uncertain implementations with reasoning.

## Cognitive

Plain language; consistent landmarks, nav order across pages; minimal distractions.

## Keyboard

- All interactive elements keyboard-navigable with visible focus in reading order.
- No `tabindex` on static elements; `tabindex="-1"` only for elements receiving programmatic focus.
- Hidden elements must not be focusable.

**Composite components** + detailed complex patterns moved to REFERENCE.md to keep this skill focused. See REFERENCE.md for roving tabindex, `aria-activedescendant`, composite widget examples.

### Validation checkpoints (run-fix-repeat)

- Run automated audit: `npx axe-core` or integrate `axe-core`/`axe-playwright` in CI — fix high/critical findings.
- Verify keyboard tab order manually: `Tab` through page, ensure logical order, visible focus.
- Confirm contrast ratios (spot-check key pages): use `axe`, `pa11y`, or `contrast` tools; ensure ≥4.5:1 for body text.
- Fix; re-run audits; repeat until no high/critical a11y issues remain.

**Skip link** (first focusable element):

```html
<a href="#maincontent" class="sr-only">Skip to main</a>
<main id="maincontent"></main>
```

```css
.sr-only:not(:focus):not(:active) { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
```

| Key | Action |
|-----|--------|
| `Tab` | Next interactive element |
| `Arrow` | Navigate within composite component |
| `Enter` | Activate focused control |
| `Escape` | Close dialogs/menus |

## Low Vision

| Rule | Requirement |
|------|-------------|
| Text contrast | ≥4.5:1 (≥3:1 for large text: 18.5px bold / 24px) |
| Graphics/controls | ≥3:1 with adjacent colors |
| State indicators (pressed, focus, checked) | ≥3:1 |
| Color | Never the sole conveyor of information |

## Screen Reader

- Correct semantics (name, role, value, states). Prefer native HTML; ARIA only when necessary.
- Landmarks: `<header>`, `<nav>`, `<main>`, `<footer>`.
- One `<h1>` per page; `<h1>`–`<h6>` introduce sections; no skipping levels.

## Voice Access

- Interactive element accessible name must contain its visible label text.
- `aria-label` must include visible label.

## Forms

- Labels accurately describe control purpose.
- Required fields: asterisk in label + `aria-required="true"`.
- Errors: `aria-invalid="true"` + `aria-describedby` pointing to error message.
- Don't disable submit — show errors instead; focus first invalid field on submit.

## Images

| Type | Pattern |
|------|---------|
| Informative | `alt="[meaning]"` on `<img>`; `role="img"` + `aria-label` on `<svg>` / icon fonts |
| Decorative | `alt=""` on `<img>`; `aria-hidden="true"` on `role="img"` |

## Input Labels

- `<label for="id">` for form inputs; all interactive elements need visible labels.
- Disambiguate repeated labels (e.g., "Remove") with `aria-label`.
- Help text via `aria-describedby`.

## Navigation

```html
<nav><ul>
  <li><button aria-expanded="false" tabindex="0">Section 1</button>
    <ul hidden><li><a href="..." tabindex="-1">Link 1</a></li></ul>
  </li>
</ul></nav>
```

- Use `<nav>` + `<ul>`, NOT `menu`/`menubar` roles.
- Toggle `aria-expanded` on expand/collapse; `Escape` closes menus.
- Roving tabindex across main items; arrow down into sub-menus.

## Page Title

- `<title>` describes page purpose, unique per page.
- Front-load unique info: `"[Page] - [Section] - [Site]"`.

## Tables & Grids

- Column headers: `<th>` in first `<tr>`; row headers: `<th>` in each row.
- `role="gridcell"` nested within `role="row"`.
- `<table>` for static data; `role="grid"` for interactive (date pickers, calendars).
astro-frameworkSkill

Creates pages/layouts, defines content collections, configures hydration directives, and wires integrations. Use when adding or modifying Astro pages, layouts, components, or content collections. Trigger terms: Astro, content collection, client:load, client:visible, astro:content

browser-testingSkill

Drive real browsers via Chrome DevTools MCP: navigate pages, capture snapshots, run responsive checks, and collect console/perf traces. Use when the user mentions: 'validate UI change in Chrome', 'capture a screenshot', 'run responsive checks', or 'collect console logs'. Trigger terms: browser testing, DevTools, console logs, screenshot, responsive testing

cloudflare-platformSkill

Creates and deploys Cloudflare Workers, configures wrangler.toml bindings, sets up KV/D1/R2 storage and Durable Objects, manages Pages deployments, and implements edge function patterns. Use when building or deploying Cloudflare Workers, setting up Pages, working with KV/D1/R2 storage, configuring wrangler.toml, or deploying edge applications.

contentful-cmsSkill

Creates Contentful content types, queries entries via GraphQL/REST, runs CLI migrations, and manages assets and locales. Use when building or modifying Contentful content models, writing queries, or migrating content.

convex-databaseSkill

Convex reactive database patterns, schema design, real-time queries, mutations, actions, authentication, migrations, performance optimization, and component creation. Use when designing Convex schemas, writing queries/mutations, managing the Convex backend, setting up auth, migrating data, optimizing performance, or building Convex components.

coolify-deploymentSkill

Deploys applications, databases, and services on self-hosted Coolify instances, manages environments and env vars, runs infrastructure diagnostics, and performs batch operations. Use when deploying apps to Coolify, managing Coolify servers, debugging deployment issues, setting up databases, or managing Coolify infrastructure.

cypress-testingSkill

Writes Cypress E2E/component tests, configures `cy.intercept()` and `cy.session()`, authors custom commands, and wires CI artifacts. Use when creating E2E specs, component tests, or CI test pipelines. Trigger terms: cypress, e2e, component test, cy.intercept, cy.session

drizzle-ormSkill

Drizzle ORM schema definition, type-safe queries, relational queries, CRUD operations, transactions, migrations with drizzle-kit, and database setup for PostgreSQL, MySQL, and SQLite. Use when defining database schemas, writing queries or joins, managing migrations, setting up a new Drizzle project, or working with drizzle-kit.