design-system

Validate design system tokens against WCAG AA/AAA contrast and focus requirements.

Updated Jan 29, 2025
One-click install
npx skills add https://github.com/ryan0122/a11ypros --skill design-system-ryan0122
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: design-system
Source: https://github.com/ryan0122/a11ypros/tree/main/.github/skills/design-system
Command: npx skills add https://github.com/ryan0122/a11ypros --skill design-system-ryan0122

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the critical accessibility issue of ensuring design tokens (colors, spacing, focus indicators) meet WCAG AA/AAA contrast and size requirements before they are implemented in UI, preventing costly redesigns and ensuring compliance.

Core Features & Use Cases

  • Contrast Ratio Computation: Calculates WCAG contrast ratios for color pairs.
  • Token Path Mapping: Identifies relevant token paths in popular frameworks (Tailwind, MUI, Chakra, shadcn/ui, Style Dictionary).
  • Focus Indicator Validation: Audits focus ring implementation against WCAG 2.4.13 requirements.
  • Use Case: Before releasing a new design system, use this Skill to automatically audit all color pairs against WCAG AA contrast thresholds and verify that focus rings are at least 2px wide and have sufficient contrast against their background.

Quick Start

Use the design-system skill to validate the contrast ratio between the color tokens '#6B7280' and '#FFFFFF'.

Frequently Asked Questions about design-system

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate design tokens for WCAG AA contrast ratios?

To validate design tokens for WCAG AA contrast ratios, use this Skill to compute the exact contrast ratio between your color pairs and verify they meet accessibility thresholds before implementation.

Can I check WCAG focus indicator compliance for Tailwind and shadcn/ui?

Yes, you can check WCAG focus indicator compliance for Tailwind and shadcn/ui by mapping framework-specific token paths and auditing focus ring implementations against WCAG 2.4.13 size and contrast requirements.

What is the best way to audit color contrast in a design system?

The best way to audit color contrast in a design system is to automatically evaluate all color token pairs against WCAG AA and AAA thresholds using JavaScript for accurate contrast computation and severity classification.

Does this tool support MUI and Chakra token path mapping?

Yes, this tool supports MUI and Chakra token path mapping by identifying relevant token paths in popular frameworks to ensure accurate accessibility validation across your design system.

How do I verify focus ring width meets WCAG 2.4.13 requirements?

To verify focus ring width meets WCAG 2.4.13 requirements, use this Skill to audit your focus ring implementations and ensure they are at least 2px wide with sufficient contrast against their background.

Why do my design tokens fail WCAG accessibility standards?

Your design tokens fail WCAG accessibility standards when color pairs lack sufficient contrast ratios or focus indicators do not meet size and appearance requirements, which this Skill identifies through severity classification.