Generate a comprehensive web design reference sheet (docs/design/design-reference.md) and its companion enforcement skill (.agents/skills/{project-slug}/SKILL.md) for any website project. Extracts tokens from CSS files, validates completeness against a JSON schema scratchpad, inspects existing components, and produces a 12-section living document covering colours, typography, spacing, layout, borders, shadows, motion, component patterns, accessibility, dark mode, and Figma sync notes. Use when starting a new project, onboarding a design system, creating a Figma reference sheet, porting design tokens, or auditing existing styles. Triggers on: "create a design reference", "generate a style guide", "document the design tokens", "make a brand reference sheet", "create design docs", "port design tokens", "audit existing styles".
97
100%
Does it follow best practices?
Impact
89%
2.61xAverage score across 3 eval scenarios
Passed
No known issues
Accessibility ensures that web content is usable by people with disabilities — visual, auditory, motor, and cognitive. It is both a legal requirement in many jurisdictions and a quality indicator for all users.
The primary standard is WCAG (Web Content Accessibility Guidelines), published by the W3C. The current version is WCAG 2.2. Most legal requirements reference WCAG 2.1 AA.
All WCAG success criteria are organised under four principles:
Perceivable — Information must be presentable in ways users can perceive.
Operable — UI components must be operable by all users.
Understandable — Information and operation must be understandable.
Robust — Content must be robust enough to be interpreted by assistive technologies.
The most commonly failed WCAG criterion in web design.
| Content type | WCAG AA | WCAG AAA |
|---|---|---|
| Normal text (< 18pt or < 14pt bold) | 4.5:1 | 7:1 |
| Large text (≥ 18pt or ≥ 14pt bold) | 3:1 | 4.5:1 |
| UI components (buttons, inputs, icons) | 3:1 | — |
| Decorative elements | No requirement | — |
| Logos | No requirement | — |
Checking tools:
#999 on #fff = 2.85:1 — FAILS)All interactive elements must be reachable and operable via keyboard alone.
outline: none or outline: 0 without providing a custom focus indicator:focus-visible is preferred over :focus for pointer devices (avoids showing focus ring
on mouse click while preserving it for keyboard)| Component | Keys |
|---|---|
| Button | Enter / Space to activate |
| Link | Enter to activate |
| Checkbox | Space to toggle |
| Radio group | Arrow keys to move between options |
| Select/Dropdown | Arrow keys to move; Enter to select |
| Modal | Escape to close; Tab/Shift+Tab cycles within |
| Accordion | Enter/Space to toggle; arrows to move between headers |
| Menu | Arrow keys to navigate; Escape to close; Enter to select |
Sufficient size for users with motor impairments or those on mobile devices.
| Standard | Minimum target size |
|---|---|
| WCAG 2.2 SC 2.5.8 (AA) | 24×24 CSS pixels (with spacing) |
| WCAG 2.2 SC 2.5.5 (AAA) | 44×44 CSS pixels |
| Apple HIG | 44×44 points |
| Google Material | 48×48dp |
Practical guidance: Aim for 44×44px as a minimum for all interactive elements. If a smaller
visual element is required, increase the hit area using padding, ::after, or a transparent
overlay — not by increasing the visible element.
Spacing: Touch targets should have at least 8px of non-interactive space between them.
Use the correct HTML element for the correct purpose. Semantic HTML provides free accessibility without requiring ARIA.
| Correct | Avoid |
|---|---|
<button> for actions | <div onclick> for actions |
<a href> for navigation | <span onclick> for links |
<h1>–<h6> for headings | <div class="heading"> for headings |
<nav> for navigation landmarks | <div class="nav"> |
<main>, <header>, <footer> | Non-semantic containers |
<ul>, <ol>, <li> for lists | <div> lists |
<table> with <th scope> for tabular data | CSS-faked tables |
<form>, <label for>, <fieldset> | Custom form widgets without ARIA |
Heading structure:
<h1> per page — the primary page titleARIA attributes supplement semantic HTML when HTML alone cannot convey the required semantics.
First rule of ARIA: don't use it if you don't need it. Native HTML semantics are always preferred.
aria-label — provides a text label when visible text is absent:
<button aria-label="Close dialog">×</button>aria-labelledby — links to an existing element's text as the label:
<section aria-labelledby="section-heading">
<h2 id="section-heading">Our Services</h2>aria-describedby — links to additional descriptive text:
<input aria-describedby="email-hint" type="email">
<span id="email-hint">We'll never share your email.</span>aria-hidden="true" — hides decorative elements from screen readers:
<span aria-hidden="true">🎉</span> Success!aria-live — announces dynamic content updates:
<div aria-live="polite" aria-atomic="true"><!-- toast messages --></div>role — provides semantic role when HTML element doesn't:
<div role="alert">Your session has expired.</div>role="banner" → <header>role="navigation" → <nav>role="main" → <main>role="contentinfo" → <footer>role="search" → search form containerrole="complementary" → <aside>Descriptive alt text:
<!-- Informative image -->
<img src="team-photo.jpg" alt="The Design & Bloom team gathered around a table">
<!-- Decorative image (no information conveyed) -->
<img src="background-squiggle.svg" alt="">
<!-- Functional image (button/link) -->
<a href="/home"><img src="logo.svg" alt="Design & Bloom — return to homepage"></a>Rules for alt text:
alt="" for decorative images — never omit the attribute entirelyVideo and audio:
Some users have vestibular disorders; animations can cause nausea, dizziness, and distress.
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}prefers-reduced-motion: reduceOften overlooked but critically important.
Clear language:
Predictable patterns:
Error prevention and recovery:
Timeouts:
| Criterion | Requirement |
|---|---|
| 1.1.1 Non-text Content | Alt text for all informative images |
| 1.3.1 Info and Relationships | Semantic HTML for structure |
| 1.4.1 Use of Colour | Colour not the sole differentiator |
| 1.4.3 Contrast (Minimum) | 4.5:1 text, 3:1 large text/UI |
| 1.4.4 Resize Text | 200% zoom without loss of content |
| 1.4.10 Reflow | Content reflows at 320px width |
| 2.1.1 Keyboard | All functionality keyboard accessible |
| 2.4.3 Focus Order | Logical tab order |
| 2.4.7 Focus Visible | Keyboard focus always visible |
| 3.1.1 Language of Page | <html lang> set correctly |
| 3.3.1 Error Identification | Form errors described in text |
| 3.3.2 Labels or Instructions | All inputs have visible labels |
| 4.1.2 Name, Role, Value | All UI components have ARIA semantics |