SkillOpen

web-accessibility

Use this skill whenever building or modifying any user-facing UI surface — pages, forms, modals, buttons, navigation, image galleries, video players, or any element a human will perceive or interact with. Apply when the work touches color choices, focus states, keyboard navigation, screen-reader semantics, contrast ratios, motion preferences, form labels, error messaging, or any interaction whose

Front matter
name: web-accessibility
description: Use this skill whenever building or modifying any user-facing UI surface — pages, forms, modals, buttons, navigation, image galleries, video players, or any element a human will perceive or interact with. Apply when the work touches color choices, focus states, keyboard navigation, screen-reader semantics, contrast ratios, motion preferences, form labels, error messaging, or any interaction whose failure would lock out a person using assistive technology. Especially relevant on customer-facing pages (restaurant menus, booking flows, contact forms, e-commerce checkouts) where accessibility failures translate directly to lost customers and legal exposure. Treat WCAG 2.2 AA as the baseline floor, not the ceiling.
license: MIT

web-accessibility — accessibility-by-default for every user-facing surface

When this skill activates, apply the following discipline to whatever UI work is in flight. Do not wait to be asked.

1. Inputs and forms

  • Every input has a <label for=""> paired by id, or aria-label if visually hidden by design.
  • Every required field has required + a aria-required="true" + visible-and-screen-reader-readable "required" indicator (not color alone).
  • Errors are announced via aria-live="polite" (form-level) or aria-invalid="true" (per-field) — never displayed in red without a non-color cue.
  • Placeholders are NOT used as labels (they vanish on input).

2. Color + contrast

  • Body text contrast >= 4.5:1 against background. Large text (18pt+/14pt+bold) >= 3:1.
  • Interactive elements (buttons, links) >= 3:1 against adjacent colors AND >= 4.5:1 against their own background for text.
  • Never rely on color alone to convey meaning (error state, required field, status). Always pair with text or icon.
  • Test with: WebAIM contrast checker, axe DevTools, Lighthouse accessibility audit.

3. Keyboard navigation

  • Every interactive element reachable via Tab in logical order (DOM order matches visual order).
  • Focus ring visible (:focus-visible styled distinctly; never outline: none without replacement).
  • Modals + drawers trap focus; Escape closes; focus returns to the trigger on close.
  • Skip-link present at top of page: "Skip to main content" → focuses <main>.

4. Screen reader semantics

  • Use semantic HTML first (<button>, <nav>, <main>, <article>, <header>, <footer>). ARIA is the fallback, not the default.
  • <img> has meaningful alt; decorative images have alt="".
  • Icon-only buttons have aria-label.
  • Heading hierarchy is sequential (<h1> → <h2> → <h3> — never skip levels).
  • Landmark regions (<main>, <nav>, <aside>, <footer>) are present on every page.

5. Motion + preferences

  • Animations respect @media (prefers-reduced-motion: reduce) — disable or shorten significantly.
  • Auto-playing video/animation longer than 5s has a pause control.
  • Carousels have prev/next controls + pause + accessible-named slide indicators.

6. Mobile + touch

  • Touch targets >= 44×44 px (Apple HIG / Material baseline).
  • Pinch-zoom NOT disabled (viewport meta tag does not include user-scalable=no).
  • Form inputs use appropriate inputmode + autocomplete to surface the right mobile keyboard.

7. Canonical references (cite these in implementation comments when relevant)

  • WCAG 2.2 Quick Reference: https://www.w3.org/WAI/WCAG22/quickref/
  • A11y Project Checklist: https://www.a11yproject.com/checklist/
  • WAI-ARIA Authoring Practices Guide: https://www.w3.org/WAI/ARIA/apg/
  • Deque axe rules: https://dequeuniversity.com/rules/axe/
  • WebAIM contrast checker: https://webaim.org/resources/contrastchecker/
  • HTML5 Accessibility (caniuse-style): https://html5accessibility.com/

8. Pre-ship checklist (run before declaring any UI "done")

  1. Tab through the full surface — does every interactive element receive visible focus in logical order?
  2. Run axe DevTools — zero critical or serious violations?
  3. Color contrast pass on every text/background pair?
  4. Resize browser to 400% zoom — does content reflow without horizontal scroll?
  5. Use screen reader (VoiceOver on macOS, NVDA on Windows) on the primary user flow — can you complete it?
  6. Disable CSS — does the page still convey meaning and let the user complete the primary task?

If any check fails: fix before ship. Accessibility is not optional.

When NOT to apply

This skill applies to ANY user-facing surface. There is no UI work where accessibility is out of scope. If you find yourself thinking "skip a11y, this is internal-only," remember: internal tools are still used by humans, some of whom rely on assistive technology.

Source: written by One Giant Leap.

Related entries

There are more like this in the members library

The Claude Code library holds 13,843 entries. Members can search all of them by meaning and read every one in full.