cfsa-antigravity 2.19.1 → 2.19.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/package.json +1 -1
  2. package/template/.agent/kit-sync.md +3 -3
  3. package/template/.claude/skills/accessibility/SKILL.md +522 -0
  4. package/template/.claude/skills/accessibility/references/WCAG.md +162 -0
  5. package/template/.claude/skills/accessibility/references/ia-spec-checklist.md +35 -0
  6. package/template/.claude/skills/adversarial-review/SKILL.md +90 -0
  7. package/template/.claude/skills/antigravity-workflows/SKILL.md +81 -0
  8. package/template/.claude/skills/antigravity-workflows/resources/implementation-playbook.md +36 -0
  9. package/template/.claude/skills/api-design-principles/SKILL.md +169 -0
  10. package/template/.claude/skills/api-design-principles/assets/api-design-checklist.md +155 -0
  11. package/template/.claude/skills/api-design-principles/assets/rest-api-template.py +182 -0
  12. package/template/.claude/skills/api-design-principles/references/graphql-schema-design.md +583 -0
  13. package/template/.claude/skills/api-design-principles/references/rest-best-practices.md +408 -0
  14. package/template/.claude/skills/api-design-principles/resources/implementation-playbook.md +513 -0
  15. package/template/.claude/skills/api-versioning/SKILL.md +166 -0
  16. package/template/.claude/skills/api-versioning/references/typescript.md +157 -0
  17. package/template/.claude/skills/architecture-mapping/SKILL.md +219 -0
  18. package/template/.claude/skills/bootstrap-agents/SKILL.md +258 -0
  19. package/template/.claude/skills/brainstorming/SKILL.md +177 -0
  20. package/template/.claude/skills/brand-guidelines/SKILL.md +44 -0
  21. package/template/.claude/skills/clean-code/SKILL.md +196 -0
  22. package/template/.claude/skills/clean-code/references/typescript.md +126 -0
  23. package/template/.claude/skills/code-review-pro/SKILL.md +152 -0
  24. package/template/.claude/skills/concise-planning/SKILL.md +107 -0
  25. package/template/.claude/skills/cross-layer-consistency/SKILL.md +117 -0
  26. package/template/.claude/skills/database-schema-design/SKILL.md +205 -0
  27. package/template/.claude/skills/database-schema-design/references/relational.md +228 -0
  28. package/template/.claude/skills/deployment-procedures/SKILL.md +241 -0
  29. package/template/.claude/skills/design-anti-cliche/SKILL.md +159 -0
  30. package/template/.claude/skills/design-direction/SKILL.md +45 -0
  31. package/template/.claude/skills/error-handling-patterns/SKILL.md +226 -0
  32. package/template/.claude/skills/error-handling-patterns/references/go.md +162 -0
  33. package/template/.claude/skills/error-handling-patterns/references/python.md +262 -0
  34. package/template/.claude/skills/error-handling-patterns/references/rust.md +112 -0
  35. package/template/.claude/skills/error-handling-patterns/references/typescript.md +178 -0
  36. package/template/.claude/skills/find-skills/SKILL.md +145 -0
  37. package/template/.claude/skills/git-advanced/SKILL.md +972 -0
  38. package/template/.claude/skills/git-workflow/SKILL.md +420 -0
  39. package/template/.claude/skills/idea-extraction/SKILL.md +644 -0
  40. package/template/.claude/skills/logging-best-practices/SKILL.md +192 -0
  41. package/template/.claude/skills/logging-best-practices/references/go.md +49 -0
  42. package/template/.claude/skills/logging-best-practices/references/python.md +52 -0
  43. package/template/.claude/skills/logging-best-practices/references/typescript.md +215 -0
  44. package/template/.claude/skills/migration-management/SKILL.md +200 -0
  45. package/template/.claude/skills/migration-management/references/relational.md +214 -0
  46. package/template/.claude/skills/minimalist-surgical-development/SKILL.md +135 -0
  47. package/template/.claude/skills/parallel-agents/SKILL.md +165 -0
  48. package/template/.claude/skills/parallel-debugging/SKILL.md +135 -0
  49. package/template/.claude/skills/parallel-feature-development/SKILL.md +157 -0
  50. package/template/.claude/skills/performance-budgeting/SKILL.md +144 -0
  51. package/template/.claude/skills/pipeline-rubrics/SKILL.md +51 -0
  52. package/template/.claude/skills/pipeline-rubrics/references/architecture-rubric.md +19 -0
  53. package/template/.claude/skills/pipeline-rubrics/references/be-rubric.md +21 -0
  54. package/template/.claude/skills/pipeline-rubrics/references/fe-rubric.md +20 -0
  55. package/template/.claude/skills/pipeline-rubrics/references/ia-rubric.md +19 -0
  56. package/template/.claude/skills/pipeline-rubrics/references/scoring.md +32 -0
  57. package/template/.claude/skills/pipeline-rubrics/references/vision-rubric.md +12 -0
  58. package/template/.claude/skills/prd-templates/SKILL.md +107 -0
  59. package/template/.claude/skills/prd-templates/references/architecture-completeness-checklist.md +28 -0
  60. package/template/.claude/skills/prd-templates/references/architecture-design-template.md +88 -0
  61. package/template/.claude/skills/prd-templates/references/be-spec-classification.md +41 -0
  62. package/template/.claude/skills/prd-templates/references/be-spec-template.md +107 -0
  63. package/template/.claude/skills/prd-templates/references/bootstrap-verification-protocol.md +50 -0
  64. package/template/.claude/skills/prd-templates/references/constraint-exploration.md +41 -0
  65. package/template/.claude/skills/prd-templates/references/data-placement-template.md +74 -0
  66. package/template/.claude/skills/prd-templates/references/decision-confirmation-protocol.md +68 -0
  67. package/template/.claude/skills/prd-templates/references/decision-propagation.md +121 -0
  68. package/template/.claude/skills/prd-templates/references/decomposition-templates.md +226 -0
  69. package/template/.claude/skills/prd-templates/references/deep-ideation-loading-protocol.md +114 -0
  70. package/template/.claude/skills/prd-templates/references/design-system-decisions.md +198 -0
  71. package/template/.claude/skills/prd-templates/references/design-system-prerequisite-check.md +18 -0
  72. package/template/.claude/skills/prd-templates/references/domain-exhaustion-criteria.md +37 -0
  73. package/template/.claude/skills/prd-templates/references/engagement-tier-protocol.md +58 -0
  74. package/template/.claude/skills/prd-templates/references/engineering-standards-template.md +126 -0
  75. package/template/.claude/skills/prd-templates/references/evolution-layer-guidance.md +91 -0
  76. package/template/.claude/skills/prd-templates/references/expansion-modes.md +27 -0
  77. package/template/.claude/skills/prd-templates/references/fe-classification-procedures.md +47 -0
  78. package/template/.claude/skills/prd-templates/references/fe-spec-template.md +90 -0
  79. package/template/.claude/skills/prd-templates/references/feature-ledger-protocol.md +149 -0
  80. package/template/.claude/skills/prd-templates/references/folder-seeding-protocol.md +77 -0
  81. package/template/.claude/skills/prd-templates/references/fractal-cx-template.md +58 -0
  82. package/template/.claude/skills/prd-templates/references/fractal-feature-template.md +93 -0
  83. package/template/.claude/skills/prd-templates/references/fractal-node-index-template.md +55 -0
  84. package/template/.claude/skills/prd-templates/references/gate-applicability.md +92 -0
  85. package/template/.claude/skills/prd-templates/references/ideation-crosscut-template.md +36 -0
  86. package/template/.claude/skills/prd-templates/references/ideation-index-template.md +111 -0
  87. package/template/.claude/skills/prd-templates/references/ideation-meta-template.md +126 -0
  88. package/template/.claude/skills/prd-templates/references/infrastructure-report-template.md +71 -0
  89. package/template/.claude/skills/prd-templates/references/input-classification.md +23 -0
  90. package/template/.claude/skills/prd-templates/references/map-guard-protocol.md +65 -0
  91. package/template/.claude/skills/prd-templates/references/operational-templates.md +116 -0
  92. package/template/.claude/skills/prd-templates/references/persona-completeness-gate.md +20 -0
  93. package/template/.claude/skills/prd-templates/references/placeholder-guard-template.md +21 -0
  94. package/template/.claude/skills/prd-templates/references/placeholder-workflow-mapping.md +50 -0
  95. package/template/.claude/skills/prd-templates/references/shard-boundary-analysis.md +103 -0
  96. package/template/.claude/skills/prd-templates/references/shard-split-remediation.md +157 -0
  97. package/template/.claude/skills/prd-templates/references/skill-loading-protocol.md +36 -0
  98. package/template/.claude/skills/prd-templates/references/slice-completion-gates.md +29 -0
  99. package/template/.claude/skills/prd-templates/references/spec-coverage-sweep.md +44 -0
  100. package/template/.claude/skills/prd-templates/references/surface-model.md +61 -0
  101. package/template/.claude/skills/prd-templates/references/tdd-testing-policy.md +39 -0
  102. package/template/.claude/skills/prd-templates/references/vision-template.md +57 -0
  103. package/template/.claude/skills/prd-templates/references/workflow-checkpoint-protocol.md +112 -0
  104. package/template/.claude/skills/prd-templates/references/write-verification-protocol.md +57 -0
  105. package/template/.claude/skills/prompt-engineer/SKILL.md +203 -0
  106. package/template/.claude/skills/regex-patterns/SKILL.md +333 -0
  107. package/template/.claude/skills/regex-patterns/references/go.md +44 -0
  108. package/template/.claude/skills/regex-patterns/references/javascript.md +63 -0
  109. package/template/.claude/skills/regex-patterns/references/python.md +77 -0
  110. package/template/.claude/skills/regex-patterns/references/rust.md +43 -0
  111. package/template/.claude/skills/resolve-ambiguity/SKILL.md +278 -0
  112. package/template/.claude/skills/security-scanning-security-hardening/SKILL.md +231 -0
  113. package/template/.claude/skills/session-continuity/SKILL.md +732 -0
  114. package/template/.claude/skills/session-continuity/protocols/01-session-resumption.md +38 -0
  115. package/template/.claude/skills/session-continuity/protocols/02-progress-generation.md +85 -0
  116. package/template/.claude/skills/session-continuity/protocols/03-progress-update.md +70 -0
  117. package/template/.claude/skills/session-continuity/protocols/04-pattern-extraction.md +60 -0
  118. package/template/.claude/skills/session-continuity/protocols/05-session-close.md +37 -0
  119. package/template/.claude/skills/session-continuity/protocols/06-decision-analysis.md +84 -0
  120. package/template/.claude/skills/session-continuity/protocols/07-spec-pipeline-generation.md +48 -0
  121. package/template/.claude/skills/session-continuity/protocols/08-spec-pipeline-update.md +55 -0
  122. package/template/.claude/skills/session-continuity/protocols/09-parallel-claim.md +122 -0
  123. package/template/.claude/skills/session-continuity/protocols/10-placeholder-verification-gate.md +83 -0
  124. package/template/.claude/skills/session-continuity/protocols/11-parallel-synthesis.md +21 -0
  125. package/template/.claude/skills/session-continuity/protocols/ambiguity-gates.md +48 -0
  126. package/template/.claude/skills/skill-creator/SKILL.md +203 -0
  127. package/template/.claude/skills/skill-creator/references/.gitkeep +0 -0
  128. package/template/.claude/skills/skill-creator/scripts/.gitkeep +0 -0
  129. package/template/.claude/skills/spec-writing/SKILL.md +110 -0
  130. package/template/.claude/skills/systematic-debugging/CREATION-LOG.md +119 -0
  131. package/template/.claude/skills/systematic-debugging/SKILL.md +297 -0
  132. package/template/.claude/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  133. package/template/.claude/skills/systematic-debugging/condition-based-waiting.md +115 -0
  134. package/template/.claude/skills/systematic-debugging/defense-in-depth.md +122 -0
  135. package/template/.claude/skills/systematic-debugging/find-polluter.sh +63 -0
  136. package/template/.claude/skills/systematic-debugging/root-cause-tracing.md +169 -0
  137. package/template/.claude/skills/systematic-debugging/test-academic.md +14 -0
  138. package/template/.claude/skills/systematic-debugging/test-pressure-1.md +58 -0
  139. package/template/.claude/skills/systematic-debugging/test-pressure-2.md +68 -0
  140. package/template/.claude/skills/systematic-debugging/test-pressure-3.md +69 -0
  141. package/template/.claude/skills/tdd-workflow/SKILL.md +186 -0
  142. package/template/.claude/skills/tdd-workflow/references/typescript.md +231 -0
  143. package/template/.claude/skills/tech-stack-catalog/SKILL.md +49 -0
  144. package/template/.claude/skills/tech-stack-catalog/references/constraint-questions.md +237 -0
  145. package/template/.claude/skills/tech-stack-catalog/references/dev-tooling-decisions.md +37 -0
  146. package/template/.claude/skills/tech-stack-catalog/references/surface-decision-tables.md +69 -0
  147. package/template/.claude/skills/technical-writer/SKILL.md +242 -0
  148. package/template/.claude/skills/testing-strategist/SKILL.md +319 -0
  149. package/template/.claude/skills/testing-strategist/references/typescript.md +328 -0
  150. package/template/.claude/skills/verification-before-completion/SKILL.md +97 -0
  151. package/template/.claude/skills/workflow-automation/SKILL.md +166 -0
  152. package/template/.claude/skills/workflow-automation/references/inngest.md +88 -0
  153. package/template/.claude/skills/workflow-automation/references/temporal.md +64 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cfsa-antigravity",
3
- "version": "2.19.1",
3
+ "version": "2.19.2",
4
4
  "description": "CFSA Pipeline — Constraint-First Specification Architecture for AI agents. Production-grade from line one.",
5
5
  "scripts": {
6
6
  "changeset": "changeset",
@@ -1,6 +1,6 @@
1
1
  # Kit Sync State
2
2
 
3
3
  upstream: https://github.com/RepairYourTech/cfsa-antigravity
4
- last_synced_commit: a2e6e1ec54cf844b2cf7383630c50ed16dfedf03
5
- last_synced_at: 2026-04-06T05:05:51Z
6
- kit_version: 2.19.1
4
+ last_synced_commit: 15665e628973ef08a1dae1c96a9567c4170f4f66
5
+ last_synced_at: 2026-04-06T05:36:53Z
6
+ kit_version: 2.19.2
@@ -0,0 +1,522 @@
1
+ ---
2
+ name: accessibility
3
+ description: Audit and improve web accessibility following WCAG 2.1 guidelines. Use when asked to "improve accessibility", "a11y audit", "WCAG compliance", "screen reader support", "keyboard navigation", or "make accessible".
4
+ license: MIT
5
+ metadata:
6
+ author: web-quality-skills
7
+ version: "1.0"
8
+ ---
9
+
10
+ # Accessibility (a11y)
11
+
12
+ Comprehensive accessibility guidelines based on WCAG 2.1 and Lighthouse accessibility audits. Goal: make content usable by everyone, including people with disabilities.
13
+
14
+ ## WCAG Principles: POUR
15
+
16
+ | Principle | Description |
17
+ |-----------|-------------|
18
+ | **P**erceivable | Content can be perceived through different senses |
19
+ | **O**perable | Interface can be operated by all users |
20
+ | **U**nderstandable | Content and interface are understandable |
21
+ | **R**obust | Content works with assistive technologies |
22
+
23
+ ## Conformance levels
24
+
25
+ | Level | Requirement | Target |
26
+ |-------|-------------|--------|
27
+ | **A** | Minimum accessibility | Must pass |
28
+ | **AA** | Standard compliance | Should pass (legal requirement in many jurisdictions) |
29
+ | **AAA** | Enhanced accessibility | Nice to have |
30
+
31
+ ---
32
+
33
+ ## Perceivable
34
+
35
+ ### Text alternatives (1.1)
36
+
37
+ **Images require alt text:**
38
+ ```html
39
+ <!-- ❌ Missing alt -->
40
+ <img src="chart.png">
41
+
42
+ <!-- ✅ Descriptive alt -->
43
+ <img src="chart.png" alt="Bar chart showing 40% increase in Q3 sales">
44
+
45
+ <!-- ✅ Decorative image (empty alt) -->
46
+ <img src="decorative-border.png" alt="" role="presentation">
47
+
48
+ <!-- ✅ Complex image with longer description -->
49
+ <figure>
50
+ <img src="infographic.png" alt="2024 market trends infographic"
51
+ aria-describedby="infographic-desc">
52
+ <figcaption id="infographic-desc">
53
+ <!-- Detailed description -->
54
+ </figcaption>
55
+ </figure>
56
+ ```
57
+
58
+ **Icon buttons need accessible names:**
59
+ ```html
60
+ <!-- ❌ No accessible name -->
61
+ <button><svg><!-- menu icon --></svg></button>
62
+
63
+ <!-- ✅ Using aria-label -->
64
+ <button aria-label="Open menu">
65
+ <svg aria-hidden="true"><!-- menu icon --></svg>
66
+ </button>
67
+
68
+ <!-- ✅ Using visually hidden text -->
69
+ <button>
70
+ <svg aria-hidden="true"><!-- menu icon --></svg>
71
+ <span class="visually-hidden">Open menu</span>
72
+ </button>
73
+ ```
74
+
75
+ **Visually hidden class:**
76
+ ```css
77
+ .visually-hidden {
78
+ position: absolute;
79
+ width: 1px;
80
+ height: 1px;
81
+ padding: 0;
82
+ margin: -1px;
83
+ overflow: hidden;
84
+ clip: rect(0, 0, 0, 0);
85
+ white-space: nowrap;
86
+ border: 0;
87
+ }
88
+ ```
89
+
90
+ ### Color contrast (1.4.3, 1.4.6)
91
+
92
+ | Text Size | AA minimum | AAA enhanced |
93
+ |-----------|------------|--------------|
94
+ | Normal text (< 18px / < 14px bold) | 4.5:1 | 7:1 |
95
+ | Large text (≥ 18px / ≥ 14px bold) | 3:1 | 4.5:1 |
96
+ | UI components & graphics | 3:1 | 3:1 |
97
+
98
+ ```css
99
+ /* ❌ Low contrast (2.5:1) */
100
+ .low-contrast {
101
+ color: #999;
102
+ background: #fff;
103
+ }
104
+
105
+ /* ✅ Sufficient contrast (7:1) */
106
+ .high-contrast {
107
+ color: #333;
108
+ background: #fff;
109
+ }
110
+
111
+ /* ✅ Focus states need contrast too */
112
+ :focus-visible {
113
+ outline: 2px solid #005fcc;
114
+ outline-offset: 2px;
115
+ }
116
+ ```
117
+
118
+ **Don't rely on color alone:**
119
+ ```html
120
+ <!-- ❌ Only color indicates error -->
121
+ <input class="error-border">
122
+ <style>.error-border { border-color: red; }</style>
123
+
124
+ <!-- ✅ Color + icon + text -->
125
+ <div class="field-error">
126
+ <input aria-invalid="true" aria-describedby="email-error">
127
+ <span id="email-error" class="error-message">
128
+ <svg aria-hidden="true"><!-- error icon --></svg>
129
+ Please enter a valid email address
130
+ </span>
131
+ </div>
132
+ ```
133
+
134
+ ### Media alternatives (1.2)
135
+
136
+ ```html
137
+ <!-- Video with captions -->
138
+ <video controls>
139
+ <source src="video.mp4" type="video/mp4">
140
+ <track kind="captions" src="captions.vtt" srclang="en" label="English" default>
141
+ <track kind="descriptions" src="descriptions.vtt" srclang="en" label="Descriptions">
142
+ </video>
143
+
144
+ <!-- Audio with transcript -->
145
+ <audio controls>
146
+ <source src="podcast.mp3" type="audio/mp3">
147
+ </audio>
148
+ <details>
149
+ <summary>Transcript</summary>
150
+ <p>Full transcript text...</p>
151
+ </details>
152
+ ```
153
+
154
+ ---
155
+
156
+ ## Operable
157
+
158
+ ### Keyboard accessible (2.1)
159
+
160
+ **All functionality must be keyboard accessible:**
161
+ ```javascript
162
+ // ❌ Only handles click
163
+ element.addEventListener('click', handleAction);
164
+
165
+ // ✅ Handles both click and keyboard
166
+ element.addEventListener('click', handleAction);
167
+ element.addEventListener('keydown', (e) => {
168
+ if (e.key === 'Enter' || e.key === ' ') {
169
+ e.preventDefault();
170
+ handleAction();
171
+ }
172
+ });
173
+ ```
174
+
175
+ **No keyboard traps:**
176
+ ```javascript
177
+ // Modal focus management
178
+ function openModal(modal) {
179
+ const focusableElements = modal.querySelectorAll(
180
+ 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
181
+ );
182
+ const firstElement = focusableElements[0];
183
+ const lastElement = focusableElements[focusableElements.length - 1];
184
+
185
+ // Trap focus within modal
186
+ modal.addEventListener('keydown', (e) => {
187
+ if (e.key === 'Tab') {
188
+ if (e.shiftKey && document.activeElement === firstElement) {
189
+ e.preventDefault();
190
+ lastElement.focus();
191
+ } else if (!e.shiftKey && document.activeElement === lastElement) {
192
+ e.preventDefault();
193
+ firstElement.focus();
194
+ }
195
+ }
196
+ if (e.key === 'Escape') {
197
+ closeModal();
198
+ }
199
+ });
200
+
201
+ firstElement.focus();
202
+ }
203
+ ```
204
+
205
+ ### Focus visible (2.4.7)
206
+
207
+ ```css
208
+ /* ❌ Never remove focus outlines */
209
+ *:focus { outline: none; }
210
+
211
+ /* ✅ Use :focus-visible for keyboard-only focus */
212
+ :focus {
213
+ outline: none;
214
+ }
215
+
216
+ :focus-visible {
217
+ outline: 2px solid #005fcc;
218
+ outline-offset: 2px;
219
+ }
220
+
221
+ /* ✅ Or custom focus styles */
222
+ button:focus-visible {
223
+ box-shadow: 0 0 0 3px rgba(0, 95, 204, 0.5);
224
+ }
225
+ ```
226
+
227
+ ### Skip links (2.4.1)
228
+
229
+ ```html
230
+ <body>
231
+ <a href="#main-content" class="skip-link">Skip to main content</a>
232
+ <header><!-- navigation --></header>
233
+ <main id="main-content" tabindex="-1">
234
+ <!-- main content -->
235
+ </main>
236
+ </body>
237
+ ```
238
+
239
+ ```css
240
+ .skip-link {
241
+ position: absolute;
242
+ top: -40px;
243
+ left: 0;
244
+ background: #000;
245
+ color: #fff;
246
+ padding: 8px 16px;
247
+ z-index: 100;
248
+ }
249
+
250
+ .skip-link:focus {
251
+ top: 0;
252
+ }
253
+ ```
254
+
255
+ ### Timing (2.2)
256
+
257
+ ```javascript
258
+ // Allow users to extend time limits
259
+ function showSessionWarning() {
260
+ const modal = createModal({
261
+ title: 'Session Expiring',
262
+ content: 'Your session will expire in 2 minutes.',
263
+ actions: [
264
+ { label: 'Extend session', action: extendSession },
265
+ { label: 'Log out', action: logout }
266
+ ],
267
+ timeout: 120000 // 2 minutes to respond
268
+ });
269
+ }
270
+ ```
271
+
272
+ ### Motion (2.3)
273
+
274
+ ```css
275
+ /* Respect reduced motion preference */
276
+ @media (prefers-reduced-motion: reduce) {
277
+ *,
278
+ *::before,
279
+ *::after {
280
+ animation-duration: 0.01ms !important;
281
+ animation-iteration-count: 1 !important;
282
+ transition-duration: 0.01ms !important;
283
+ scroll-behavior: auto !important;
284
+ }
285
+ }
286
+ ```
287
+
288
+ ---
289
+
290
+ ## Understandable
291
+
292
+ ### Page language (3.1.1)
293
+
294
+ ```html
295
+ <!-- ❌ No language specified -->
296
+ <html>
297
+
298
+ <!-- ✅ Language specified -->
299
+ <html lang="en">
300
+
301
+ <!-- ✅ Language changes within page -->
302
+ <p>The French word for hello is <span lang="fr">bonjour</span>.</p>
303
+ ```
304
+
305
+ ### Consistent navigation (3.2.3)
306
+
307
+ ```html
308
+ <!-- Navigation should be consistent across pages -->
309
+ <nav aria-label="Main">
310
+ <ul>
311
+ <li><a href="/" aria-current="page">Home</a></li>
312
+ <li><a href="/products">Products</a></li>
313
+ <li><a href="/about">About</a></li>
314
+ </ul>
315
+ </nav>
316
+ ```
317
+
318
+ ### Form labels (3.3.2)
319
+
320
+ ```html
321
+ <!-- ❌ No label association -->
322
+ <input type="email" placeholder="Email">
323
+
324
+ <!-- ✅ Explicit label -->
325
+ <label for="email">Email address</label>
326
+ <input type="email" id="email" name="email"
327
+ autocomplete="email" required>
328
+
329
+ <!-- ✅ Implicit label -->
330
+ <label>
331
+ Email address
332
+ <input type="email" name="email" autocomplete="email" required>
333
+ </label>
334
+
335
+ <!-- ✅ With instructions -->
336
+ <label for="password">Password</label>
337
+ <input type="password" id="password"
338
+ aria-describedby="password-requirements">
339
+ <p id="password-requirements">
340
+ Must be at least 8 characters with one number.
341
+ </p>
342
+ ```
343
+
344
+ ### Error handling (3.3.1, 3.3.3)
345
+
346
+ ```html
347
+ <!-- Announce errors to screen readers -->
348
+ <form novalidate>
349
+ <div class="field" aria-live="polite">
350
+ <label for="email">Email</label>
351
+ <input type="email" id="email"
352
+ aria-invalid="true"
353
+ aria-describedby="email-error">
354
+ <p id="email-error" class="error" role="alert">
355
+ Please enter a valid email address (e.g., name@example.com)
356
+ </p>
357
+ </div>
358
+ </form>
359
+ ```
360
+
361
+ ```javascript
362
+ // Focus first error on submit
363
+ form.addEventListener('submit', (e) => {
364
+ const firstError = form.querySelector('[aria-invalid="true"]');
365
+ if (firstError) {
366
+ e.preventDefault();
367
+ firstError.focus();
368
+
369
+ // Announce error summary
370
+ const errorSummary = document.getElementById('error-summary');
371
+ errorSummary.textContent = `${errors.length} errors found. Please fix them and try again.`;
372
+ errorSummary.focus();
373
+ }
374
+ });
375
+ ```
376
+
377
+ ---
378
+
379
+ ## Robust
380
+
381
+ ### Valid HTML (4.1.1)
382
+
383
+ ```html
384
+ <!-- ❌ Duplicate IDs -->
385
+ <div id="content">...</div>
386
+ <div id="content">...</div>
387
+
388
+ <!-- ❌ Invalid nesting -->
389
+ <a href="/"><button>Click</button></a>
390
+
391
+ <!-- ✅ Unique IDs -->
392
+ <div id="main-content">...</div>
393
+ <div id="sidebar-content">...</div>
394
+
395
+ <!-- ✅ Proper nesting -->
396
+ <a href="/" class="button-link">Click</a>
397
+ ```
398
+
399
+ ### ARIA usage (4.1.2)
400
+
401
+ **Prefer native elements:**
402
+ ```html
403
+ <!-- ❌ ARIA role on div -->
404
+ <div role="button" tabindex="0">Click me</div>
405
+
406
+ <!-- ✅ Native button -->
407
+ <button>Click me</button>
408
+
409
+ <!-- ❌ ARIA checkbox -->
410
+ <div role="checkbox" aria-checked="false">Option</div>
411
+
412
+ <!-- ✅ Native checkbox -->
413
+ <label><input type="checkbox"> Option</label>
414
+ ```
415
+
416
+ **When ARIA is needed:**
417
+ ```html
418
+ <!-- Custom tabs component -->
419
+ <div role="tablist" aria-label="Product information">
420
+ <button role="tab" id="tab-1" aria-selected="true"
421
+ aria-controls="panel-1">Description</button>
422
+ <button role="tab" id="tab-2" aria-selected="false"
423
+ aria-controls="panel-2" tabindex="-1">Reviews</button>
424
+ </div>
425
+ <div role="tabpanel" id="panel-1" aria-labelledby="tab-1">
426
+ <!-- Panel content -->
427
+ </div>
428
+ <div role="tabpanel" id="panel-2" aria-labelledby="tab-2" hidden>
429
+ <!-- Panel content -->
430
+ </div>
431
+ ```
432
+
433
+ ### Live regions (4.1.3)
434
+
435
+ ```html
436
+ <!-- Status updates -->
437
+ <div aria-live="polite" aria-atomic="true" class="status">
438
+ <!-- Content updates announced to screen readers -->
439
+ </div>
440
+
441
+ <!-- Urgent alerts -->
442
+ <div role="alert" aria-live="assertive">
443
+ <!-- Interrupts current announcement -->
444
+ </div>
445
+ ```
446
+
447
+ ```javascript
448
+ // Announce dynamic content changes
449
+ function showNotification(message, type = 'polite') {
450
+ const container = document.getElementById(`${type}-announcer`);
451
+ container.textContent = ''; // Clear first
452
+ requestAnimationFrame(() => {
453
+ container.textContent = message;
454
+ });
455
+ }
456
+ ```
457
+
458
+ ---
459
+
460
+ ## Testing checklist
461
+
462
+ ### Automated testing
463
+ ```bash
464
+ # Lighthouse accessibility audit
465
+ npx lighthouse https://example.com --only-categories=accessibility
466
+
467
+ # axe-core
468
+ npm install @axe-core/cli -g
469
+ axe https://example.com
470
+ ```
471
+
472
+ ### Manual testing
473
+
474
+ - [ ] **Keyboard navigation:** Tab through entire page, use Enter/Space to activate
475
+ - [ ] **Screen reader:** Test with VoiceOver (Mac), NVDA (Windows), or TalkBack (Android)
476
+ - [ ] **Zoom:** Content usable at 200% zoom
477
+ - [ ] **High contrast:** Test with Windows High Contrast Mode
478
+ - [ ] **Reduced motion:** Test with `prefers-reduced-motion: reduce`
479
+ - [ ] **Focus order:** Logical and follows visual order
480
+
481
+ ### Screen reader commands
482
+
483
+ | Action | VoiceOver (Mac) | NVDA (Windows) |
484
+ |--------|-----------------|----------------|
485
+ | Start/Stop | ⌘ + F5 | Ctrl + Alt + N |
486
+ | Next item | VO + → | ↓ |
487
+ | Previous item | VO + ← | ↑ |
488
+ | Activate | VO + Space | Enter |
489
+ | Headings list | VO + U, then arrows | H / Shift + H |
490
+ | Links list | VO + U | K / Shift + K |
491
+
492
+ ---
493
+
494
+ ## Common issues by impact
495
+
496
+ ### Critical (fix immediately)
497
+ 1. Missing form labels
498
+ 2. Missing image alt text
499
+ 3. Insufficient color contrast
500
+ 4. Keyboard traps
501
+ 5. No focus indicators
502
+
503
+ ### Serious (fix before launch)
504
+ 1. Missing page language
505
+ 2. Missing heading structure
506
+ 3. Non-descriptive link text
507
+ 4. Auto-playing media
508
+ 5. Missing skip links
509
+
510
+ ### Moderate (fix soon)
511
+ 1. Missing ARIA labels on icons
512
+ 2. Inconsistent navigation
513
+ 3. Missing error identification
514
+ 4. Timing without controls
515
+ 5. Missing landmark regions
516
+
517
+ ## References
518
+
519
+ - [WCAG 2.1 Quick Reference](https://www.w3.org/WAI/WCAG21/quickref/)
520
+ - [WAI-ARIA Authoring Practices](https://www.w3.org/WAI/ARIA/apg/)
521
+ - [Deque axe Rules](https://dequeuniversity.com/rules/axe/)
522
+ - [Web Quality Audit](../web-quality-audit/SKILL.md)
@@ -0,0 +1,162 @@
1
+ # WCAG 2.1 Quick Reference
2
+
3
+ ## Success criteria by level
4
+
5
+ ### Level A (minimum)
6
+
7
+ | Criterion | Description |
8
+ |-----------|-------------|
9
+ | **1.1.1** Non-text Content | All images, icons have text alternatives |
10
+ | **1.2.1** Audio-only/Video-only | Provide transcript or audio description |
11
+ | **1.2.2** Captions | Video with audio has captions |
12
+ | **1.2.3** Audio Description | Video has audio description |
13
+ | **1.3.1** Info and Relationships | Information conveyed through presentation is available programmatically |
14
+ | **1.3.2** Meaningful Sequence | Reading order is logical |
15
+ | **1.3.3** Sensory Characteristics | Instructions don't rely solely on shape, color, size, location, orientation, or sound |
16
+ | **1.4.1** Use of Color | Color is not the only visual means of conveying information |
17
+ | **1.4.2** Audio Control | Audio playing automatically can be paused/stopped |
18
+ | **2.1.1** Keyboard | All functionality available via keyboard |
19
+ | **2.1.2** No Keyboard Trap | Keyboard focus can be moved away from any component |
20
+ | **2.1.4** Character Key Shortcuts | Single-key shortcuts can be turned off or remapped |
21
+ | **2.2.1** Timing Adjustable | Time limits can be extended |
22
+ | **2.2.2** Pause, Stop, Hide | Moving/blinking content can be paused |
23
+ | **2.3.1** Three Flashes | Nothing flashes more than 3 times per second |
24
+ | **2.4.1** Bypass Blocks | Skip link or landmark navigation available |
25
+ | **2.4.2** Page Titled | Pages have descriptive titles |
26
+ | **2.4.3** Focus Order | Focus order preserves meaning |
27
+ | **2.4.4** Link Purpose | Link purpose clear from link text or context |
28
+ | **2.5.1** Pointer Gestures | Multi-point gestures have single-pointer alternatives |
29
+ | **2.5.2** Pointer Cancellation | Down-event doesn't trigger action (use up-event or click) |
30
+ | **2.5.3** Label in Name | Accessible name contains visible label text |
31
+ | **2.5.4** Motion Actuation | Motion-triggered functions have alternatives |
32
+ | **3.1.1** Language of Page | Default language specified in HTML |
33
+ | **3.2.1** On Focus | Focus doesn't trigger unexpected changes |
34
+ | **3.2.2** On Input | Input doesn't trigger unexpected changes |
35
+ | **3.3.1** Error Identification | Input errors clearly described |
36
+ | **3.3.2** Labels or Instructions | Form inputs have labels or instructions |
37
+ | **4.1.1** Parsing | HTML is well-formed (no duplicate IDs, proper nesting) |
38
+ | **4.1.2** Name, Role, Value | UI components have accessible names and correct roles |
39
+
40
+ ### Level AA (standard)
41
+
42
+ | Criterion | Description |
43
+ |-----------|-------------|
44
+ | **1.2.4** Captions (Live) | Live audio has captions |
45
+ | **1.2.5** Audio Description | Pre-recorded video has audio description |
46
+ | **1.3.4** Orientation | Content doesn't restrict orientation |
47
+ | **1.3.5** Identify Input Purpose | Input purpose can be programmatically determined |
48
+ | **1.4.3** Contrast (Minimum) | 4.5:1 for normal text, 3:1 for large text |
49
+ | **1.4.4** Resize Text | Text can be resized to 200% without loss of functionality |
50
+ | **1.4.5** Images of Text | Text used instead of images of text |
51
+ | **1.4.10** Reflow | Content reflows at 320px width without horizontal scroll |
52
+ | **1.4.11** Non-text Contrast | UI components have 3:1 contrast |
53
+ | **1.4.12** Text Spacing | Content adapts to text spacing changes |
54
+ | **1.4.13** Content on Hover/Focus | Additional content is dismissible, hoverable, persistent |
55
+ | **2.4.5** Multiple Ways | Multiple ways to find pages |
56
+ | **2.4.6** Headings and Labels | Headings and labels are descriptive |
57
+ | **2.4.7** Focus Visible | Focus indicator is visible |
58
+ | **3.1.2** Language of Parts | Language changes are marked |
59
+ | **3.2.3** Consistent Navigation | Navigation is consistent across pages |
60
+ | **3.2.4** Consistent Identification | Same functionality uses same labels |
61
+ | **3.3.3** Error Suggestion | Error corrections suggested when known |
62
+ | **3.3.4** Error Prevention (Legal) | Actions can be reversed or confirmed |
63
+ | **4.1.3** Status Messages | Status messages announced to screen readers |
64
+
65
+ ### Level AAA (enhanced)
66
+
67
+ | Criterion | Description |
68
+ |-----------|-------------|
69
+ | **1.4.6** Contrast (Enhanced) | 7:1 for normal text, 4.5:1 for large text |
70
+ | **1.4.8** Visual Presentation | Foreground/background colors can be selected |
71
+ | **1.4.9** Images of Text (No Exception) | No images of text |
72
+ | **2.1.3** Keyboard (No Exception) | All functionality keyboard accessible |
73
+ | **2.2.3** No Timing | No time limits |
74
+ | **2.2.4** Interruptions | Interruptions can be postponed |
75
+ | **2.2.5** Re-authenticating | Data preserved on re-authentication |
76
+ | **2.2.6** Timeouts | Users warned about data loss from inactivity |
77
+ | **2.3.2** Three Flashes | No content flashes more than 3 times |
78
+ | **2.3.3** Animation from Interactions | Motion animation can be disabled |
79
+ | **2.4.8** Location | User location within site is available |
80
+ | **2.4.9** Link Purpose (Link Only) | Link purpose clear from link text alone |
81
+ | **2.4.10** Section Headings | Sections have headings |
82
+ | **3.1.3** Unusual Words | Definitions available for unusual words |
83
+ | **3.1.4** Abbreviations | Abbreviations expanded |
84
+ | **3.1.5** Reading Level | Alternative content for complex text |
85
+ | **3.1.6** Pronunciation | Pronunciation available where needed |
86
+ | **3.2.5** Change on Request | Changes initiated only by user |
87
+ | **3.3.5** Help | Context-sensitive help available |
88
+ | **3.3.6** Error Prevention (All) | All form submissions can be reviewed |
89
+
90
+ ## Common ARIA patterns
91
+
92
+ ### Buttons
93
+ ```html
94
+ <button>Label</button>
95
+ <!-- or -->
96
+ <button aria-label="Close dialog">×</button>
97
+ ```
98
+
99
+ ### Links
100
+ ```html
101
+ <a href="/page">Descriptive link text</a>
102
+ <!-- External links -->
103
+ <a href="https://external.com" target="_blank" rel="noopener">
104
+ External site
105
+ <span class="visually-hidden">(opens in new tab)</span>
106
+ </a>
107
+ ```
108
+
109
+ ### Form fields
110
+ ```html
111
+ <label for="email">Email address</label>
112
+ <input type="email" id="email" aria-describedby="email-hint">
113
+ <p id="email-hint">We'll never share your email.</p>
114
+ ```
115
+
116
+ ### Error states
117
+ ```html
118
+ <label for="email">Email</label>
119
+ <input type="email" id="email" aria-invalid="true" aria-describedby="email-error">
120
+ <p id="email-error" role="alert">Please enter a valid email address.</p>
121
+ ```
122
+
123
+ ### Navigation
124
+ ```html
125
+ <nav aria-label="Main">
126
+ <ul>
127
+ <li><a href="/" aria-current="page">Home</a></li>
128
+ <li><a href="/about">About</a></li>
129
+ </ul>
130
+ </nav>
131
+ ```
132
+
133
+ ### Modals
134
+ ```html
135
+ <div role="dialog" aria-modal="true" aria-labelledby="dialog-title">
136
+ <h2 id="dialog-title">Confirm Action</h2>
137
+ <!-- content -->
138
+ </div>
139
+ ```
140
+
141
+ ### Live regions
142
+ ```html
143
+ <!-- Polite (waits for pause in speech) -->
144
+ <div aria-live="polite">Status update here</div>
145
+
146
+ <!-- Assertive (interrupts immediately) -->
147
+ <div aria-live="assertive" role="alert">Error message here</div>
148
+
149
+ <!-- Status (polite, implicit) -->
150
+ <div role="status">Loading complete</div>
151
+ ```
152
+
153
+ ## Testing tools
154
+
155
+ | Tool | Type | URL |
156
+ |------|------|-----|
157
+ | axe DevTools | Browser extension | [deque.com/axe](https://www.deque.com/axe/) |
158
+ | WAVE | Browser extension | [wave.webaim.org](https://wave.webaim.org/) |
159
+ | Lighthouse | Built into Chrome | DevTools → Lighthouse |
160
+ | NVDA | Screen reader (Windows) | [nvaccess.org](https://www.nvaccess.org/) |
161
+ | VoiceOver | Screen reader (Mac) | Built into macOS |
162
+ | Colour Contrast Analyser | Desktop app | [tpgi.com](https://www.tpgi.com/color-contrast-checker/) |