agentsclimarketplace

Wcag accessibility

Skill LeahyCC/claude-skills/skills/wcag-accessibility

Production-grade Claude Code skills verified against official specifications. Zero dependencies. Complete domain coverage.

Install
npx -y skills add LeahyCC/claude-skills --skill wcag-accessibility

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use when building UI components, reviewing color contrast, adding ARIA attributes, handling keyboard navigation, writing alt text, creating forms, or ensuring WCAG 2.2 AA compliance. Covers color contrast ratios, semantic HTML, focus management, screen reader support, motion preferences, and accessibility auditing.

SKILL.md

13.9 KB, as published. Nobody here has run it

WCAG 2.2 AA Accessibility

Comprehensive accessibility guidance for web applications targeting WCAG 2.2 Level AA conformance.

Architecture Overview

[Component Authoring]
    ├── Semantic HTML (landmarks, headings, lists)
    ├── ARIA attributes (roles, states, properties)
    ├── Keyboard interaction (focus, tab order, shortcuts)
    └── Visual design (contrast, spacing, motion)
              ↓
[Automated Testing]
    ├── axe-core / jest-axe (unit)
    ├── Lighthouse CI (integration)
    └── pa11y (page-level)
              ↓
[Manual Testing]
    ├── Keyboard-only navigation
    ├── Screen reader walkthrough (VoiceOver, NVDA)
    └── Zoom to 200% / reflow check
              ↓
[Continuous Compliance]
    ├── CI gate (axe failures block merge)
    ├── Design token enforcement (contrast-safe palette)
    └── Periodic audit (quarterly full review)

Quick Reference

Need to...See
Fix color contrast failuresColor Contrast
Add keyboard support to custom componentsKeyboard Navigation
Choose correct ARIA roles and landmarksSemantic HTML
Build accessible forms with validationForms and Inputs
Write good alt text, handle mediaImages and Media
Handle animations and motion safelyMotion and Animation
Set up page lang, titles, reflow, zoomPage Structure
Fix links, nav consistency, predictabilityLinks and Navigation
Support drag alternatives, touch targetsPointer and Touch
Handle timeouts, auth, CAPTCHAsTiming and Authentication
Set up automated a11y testingTesting and Auditing

Decision Matrix

Text Contrast Requirements (WCAG 1.4.3 / 1.4.6)

Text TypeAA MinimumAAA TargetHow to Check
Normal text (<18px)4.5:17:1Foreground vs background color
Large text (>=18px)3:14.5:1Foreground vs background color
Bold text (>=14px)3:14.5:1Counts as "large"
UI components / icons3:1N/AAgainst adjacent colors
Decorative / disabledNo reqNo reqMust look obviously disabled
Placeholder text4.5:17:1Treated as normal text by WCAG

Common Tailwind Opacity Pitfalls

Opacity modifiers on semantic color tokens (e.g., text-muted-foreground/60) reduce contrast below WCAG thresholds. Common failures:

PatternTypical RatioVerdictFix
text-foreground15:1+Passes AANo change needed
text-muted-foreground5-6:1Passes AANo change needed
text-muted-foreground/804-5:1BorderlineUse text-muted-foreground
text-muted-foreground/703.5-4:1Fails AAUse text-muted-foreground
text-muted-foreground/602.5-3:1Fails AAUse text-muted-foreground
text-muted-foreground/502-2.5:1Fails AAUse text-muted-foreground
text-muted-foreground/401.5-2:1Fails AAUse text-muted-foreground
placeholder:text-*/401.5-2:1Fails AAUse full text-muted-foreground

Rule of thumb: Never apply opacity below /80 to text tokens. If you need visual hierarchy below text-muted-foreground, the design system's contrast floor has been reached — use size, weight, or spacing instead.

Interactive Element Requirements

ElementKeyboardFocus RingARIAContrast
ButtonEnter/SpaceRequiredbutton role4.5:1 text, 3:1 boundary
LinkEnterRequired<a> or link role4.5:1 + distinguishable
Menu / DropdownArrow keysRequiredmenu, menuitem4.5:1
TabArrow keysRequiredtablist, tab, tabpanel4.5:1
Modal / DialogTrap focusRequireddialog, aria-modal4.5:1
Toggle / SwitchSpaceRequiredswitch or checkbox3:1 boundary
AccordionEnter/SpaceRequiredregion, button4.5:1
Form inputTabRequired<label> + error3:1 boundary
Custom widgetFollows WAI-ARIA patternRequiredMatch closest patternAll ratios

Screen Reader Essentials

// Visually hidden but screen-reader accessible
<span className="sr-only">Close dialog</span>

// Live regions for dynamic content
<div aria-live="polite" aria-atomic="true">
  {statusMessage}
</div>

// Assertive for errors
<div aria-live="assertive" role="alert">
  {errorMessage}
</div>

Core Principles

  1. Perceivable — Content must be presentable in ways all users can perceive (contrast, alt text, captions)
  2. Operable — UI must be operable via keyboard, with enough time, no seizure triggers
  3. Understandable — Content and UI behavior must be understandable (labels, errors, consistent navigation)
  4. Robust — Content must be interpreted reliably by assistive technologies (semantic HTML, valid ARIA)

Hover/Focus Content (WCAG 1.4.13)

Tooltips, popovers, and any content triggered by hover or focus must be:

// Dismissible — user can close without moving pointer (Escape key)
// Hoverable — user can move pointer over the tooltip without it disappearing
// Persistent — stays visible until user dismisses, moves focus, or info becomes invalid

// PASS — Radix UI Tooltip handles all three requirements
<Tooltip>
  <TooltipTrigger>Hover me</TooltipTrigger>
  <TooltipContent>
    This tooltip is dismissible, hoverable, and persistent
  </TooltipContent>
</Tooltip>

// FAIL — disappears when pointer moves away from trigger
<div
  onMouseEnter={() => setShow(true)}
  onMouseLeave={() => setShow(false)}  // Can't hover the tooltip content
>
  {show && <div className="absolute">Tooltip content</div>}
</div>

// PASS — tooltip stays visible when hovering its content
<div
  onMouseEnter={() => setShow(true)}
  onMouseLeave={() => setShow(false)}
>
  Trigger
  {show && (
    <div
      onMouseEnter={() => setShow(true)}   // Keep open when hovering content
      onMouseLeave={() => setShow(false)}
    >
      Tooltip content
    </div>
  )}
</div>

Status Messages (WCAG 4.1.3)

Dynamic status updates must be announced to screen readers without receiving focus:

// Toast notifications
<div role="status" aria-live="polite">
  {toast && <p>{toast.message}</p>}
</div>

// Search result counts
<div role="status" aria-live="polite" aria-atomic="true">
  {results.length} listings found
</div>

// Form submission success
<div role="status">Listing saved successfully</div>

// Error alerts (urgent — use assertive)
<div role="alert">Payment failed. Please try again.</div>

// Loading progress
<div role="status" aria-live="polite">
  Uploading... {progress}% complete
</div>
SituationRolearia-liveWhen
Success messagestatuspoliteAfter form submit
Error messagealertassertiveOn validation/server error
Search results countstatuspoliteAfter search completes
Loading indicatorstatuspoliteWhen async operation starts
Toast notificationstatuspoliteOn transient messages
Chat message receivedlogpoliteNew messages in feed

WCAG 2.2 Complete Success Criteria Coverage

All 50 Level A + AA success criteria are covered across the skill resources:

Principle 1: Perceivable

#NameLevelResource
1.1.1Non-text ContentAimages-and-media
1.2.1Audio-only/Video-onlyAimages-and-media
1.2.2Captions (Prerecorded)Aimages-and-media
1.2.3Audio Description or AlternativeAimages-and-media
1.2.4Captions (Live)AAimages-and-media
1.2.5Audio Description (Prerecorded)AAimages-and-media
1.3.1Info and RelationshipsAsemantic-html
1.3.2Meaningful SequenceApage-structure
1.3.3Sensory CharacteristicsApage-structure
1.3.4OrientationAApage-structure
1.3.5Identify Input PurposeAAforms-and-inputs
1.4.1Use of ColorAlinks-and-navigation
1.4.2Audio ControlAtiming-and-authentication
1.4.3Contrast (Minimum)AAcolor-contrast
1.4.4Resize TextAApage-structure
1.4.5Images of TextAAimages-and-media
1.4.10ReflowAApage-structure
1.4.11Non-text ContrastAAcolor-contrast
1.4.12Text SpacingAApage-structure
1.4.13Content on Hover or FocusAASKILL.md (above)

Principle 2: Operable

#NameLevelResource
2.1.1KeyboardAkeyboard-navigation
2.1.2No Keyboard TrapAkeyboard-navigation
2.1.4Character Key ShortcutsAtiming-and-authentication
2.2.1Timing AdjustableAtiming-and-authentication
2.2.2Pause, Stop, HideAmotion-and-animation
2.3.1Three FlashesAmotion-and-animation
2.4.1Bypass BlocksAkeyboard-navigation
2.4.2Page TitledApage-structure
2.4.3Focus OrderAkeyboard-navigation
2.4.4Link Purpose (In Context)Alinks-and-navigation
2.4.5Multiple WaysAAlinks-and-navigation
2.4.6Headings and LabelsAAsemantic-html, forms-and-inputs
2.4.7Focus VisibleAAkeyboard-navigation
2.4.11Focus Not ObscuredAAkeyboard-navigation [NEW 2.2]
2.5.1Pointer GesturesApointer-and-touch
2.5.2Pointer CancellationApointer-and-touch
2.5.3Label in NameAlinks-and-navigation
2.5.4Motion ActuationApointer-and-touch
2.5.7Dragging MovementsAApointer-and-touch [NEW 2.2]
2.5.8Target Size (Minimum)AApointer-and-touch [NEW 2.2]

Principle 3: Understandable

#NameLevelResource
3.1.1Language of PageApage-structure
3.1.2Language of PartsAApage-structure
3.2.1On FocusAlinks-and-navigation
3.2.2On InputAlinks-and-navigation
3.2.3Consistent NavigationAAlinks-and-navigation
3.2.4Consistent IdentificationAAlinks-and-navigation
3.2.6Consistent HelpAlinks-and-navigation [NEW 2.2]
3.3.1Error IdentificationAforms-and-inputs
3.3.2Labels or InstructionsAforms-and-inputs
3.3.3Error SuggestionAAforms-and-inputs
3.3.4Error PreventionAAtiming-and-authentication
3.3.7Redundant EntryAtiming-and-authentication [NEW 2.2]
3.3.8Accessible AuthenticationAAtiming-and-authentication [NEW 2.2]

Principle 4: Robust

#NameLevelResource
4.1.2Name, Role, ValueAsemantic-html
4.1.3Status MessagesAASKILL.md (above)

Note: 4.1.1 Parsing was removed in WCAG 2.2 and is no longer required.

When Reviewing Code

Run this checklist on every component:

  • Color contrast meets 4.5:1 for text, 3:1 for UI components
  • No information conveyed by color alone (use icons, patterns, or text too)
  • All interactive elements reachable and operable by keyboard
  • Focus order is logical and visible
  • Images have meaningful alt text (or alt="" + aria-hidden if decorative)
  • Form inputs have associated <label> elements
  • Error messages are programmatically associated with inputs (aria-describedby)
  • Dynamic content updates announced via aria-live regions
  • No content flashes more than 3 times per second
  • Page works at 200% zoom without horizontal scrolling
  • Content reflows at 320px width without horizontal scrolling
  • Touch targets are at least 24x24 CSS pixels (44x44 preferred)
  • Drag operations have single-pointer alternatives
  • Tooltips/popovers are dismissible, hoverable, and persistent
  • <html lang> is set correctly
  • Page has unique, descriptive <title>
  • DOM order matches visual reading order
  • Links have descriptive text (no "click here")
  • Navigation is consistent across pages
  • Paste is not blocked on password/code fields
  • prefers-reduced-motion is respected for all animations

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.