opencode-metis 0.1.0

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 (156) hide show
  1. package/README.md +140 -0
  2. package/dist/cli.cjs +63 -0
  3. package/dist/mcp-server.cjs +51 -0
  4. package/dist/plugin.cjs +4 -0
  5. package/dist/worker.cjs +224 -0
  6. package/opencode/agent/the-analyst/feature-prioritization.md +66 -0
  7. package/opencode/agent/the-analyst/market-research.md +77 -0
  8. package/opencode/agent/the-analyst/project-coordination.md +81 -0
  9. package/opencode/agent/the-analyst/requirements-analysis.md +77 -0
  10. package/opencode/agent/the-architect/compatibility-review.md +138 -0
  11. package/opencode/agent/the-architect/complexity-review.md +137 -0
  12. package/opencode/agent/the-architect/quality-review.md +67 -0
  13. package/opencode/agent/the-architect/security-review.md +127 -0
  14. package/opencode/agent/the-architect/system-architecture.md +119 -0
  15. package/opencode/agent/the-architect/system-documentation.md +83 -0
  16. package/opencode/agent/the-architect/technology-research.md +85 -0
  17. package/opencode/agent/the-chief.md +79 -0
  18. package/opencode/agent/the-designer/accessibility-implementation.md +101 -0
  19. package/opencode/agent/the-designer/design-foundation.md +74 -0
  20. package/opencode/agent/the-designer/interaction-architecture.md +75 -0
  21. package/opencode/agent/the-designer/user-research.md +70 -0
  22. package/opencode/agent/the-meta-agent.md +155 -0
  23. package/opencode/agent/the-platform-engineer/ci-cd-pipelines.md +109 -0
  24. package/opencode/agent/the-platform-engineer/containerization.md +106 -0
  25. package/opencode/agent/the-platform-engineer/data-architecture.md +81 -0
  26. package/opencode/agent/the-platform-engineer/dependency-review.md +144 -0
  27. package/opencode/agent/the-platform-engineer/deployment-automation.md +81 -0
  28. package/opencode/agent/the-platform-engineer/infrastructure-as-code.md +107 -0
  29. package/opencode/agent/the-platform-engineer/performance-tuning.md +82 -0
  30. package/opencode/agent/the-platform-engineer/pipeline-engineering.md +81 -0
  31. package/opencode/agent/the-platform-engineer/production-monitoring.md +105 -0
  32. package/opencode/agent/the-qa-engineer/exploratory-testing.md +66 -0
  33. package/opencode/agent/the-qa-engineer/performance-testing.md +81 -0
  34. package/opencode/agent/the-qa-engineer/quality-assurance.md +77 -0
  35. package/opencode/agent/the-qa-engineer/test-execution.md +66 -0
  36. package/opencode/agent/the-software-engineer/api-development.md +78 -0
  37. package/opencode/agent/the-software-engineer/component-development.md +79 -0
  38. package/opencode/agent/the-software-engineer/concurrency-review.md +141 -0
  39. package/opencode/agent/the-software-engineer/domain-modeling.md +66 -0
  40. package/opencode/agent/the-software-engineer/performance-optimization.md +113 -0
  41. package/opencode/command/analyze.md +149 -0
  42. package/opencode/command/constitution.md +178 -0
  43. package/opencode/command/debug.md +194 -0
  44. package/opencode/command/document.md +178 -0
  45. package/opencode/command/implement.md +225 -0
  46. package/opencode/command/refactor.md +207 -0
  47. package/opencode/command/review.md +229 -0
  48. package/opencode/command/simplify.md +267 -0
  49. package/opencode/command/specify.md +191 -0
  50. package/opencode/command/validate.md +224 -0
  51. package/opencode/skill/accessibility-design/SKILL.md +566 -0
  52. package/opencode/skill/accessibility-design/checklists/wcag-checklist.md +435 -0
  53. package/opencode/skill/agent-coordination/SKILL.md +224 -0
  54. package/opencode/skill/api-contract-design/SKILL.md +550 -0
  55. package/opencode/skill/api-contract-design/templates/graphql-schema-template.md +818 -0
  56. package/opencode/skill/api-contract-design/templates/rest-api-template.md +417 -0
  57. package/opencode/skill/architecture-design/SKILL.md +160 -0
  58. package/opencode/skill/architecture-design/examples/architecture-examples.md +170 -0
  59. package/opencode/skill/architecture-design/template.md +749 -0
  60. package/opencode/skill/architecture-design/validation.md +99 -0
  61. package/opencode/skill/architecture-selection/SKILL.md +522 -0
  62. package/opencode/skill/architecture-selection/examples/adrs/001-example-adr.md +71 -0
  63. package/opencode/skill/architecture-selection/examples/architecture-patterns.md +239 -0
  64. package/opencode/skill/bug-diagnosis/SKILL.md +235 -0
  65. package/opencode/skill/code-quality-review/SKILL.md +337 -0
  66. package/opencode/skill/code-quality-review/examples/anti-patterns.md +629 -0
  67. package/opencode/skill/code-quality-review/reference.md +322 -0
  68. package/opencode/skill/code-review/SKILL.md +363 -0
  69. package/opencode/skill/code-review/reference.md +450 -0
  70. package/opencode/skill/codebase-analysis/SKILL.md +139 -0
  71. package/opencode/skill/codebase-navigation/SKILL.md +227 -0
  72. package/opencode/skill/codebase-navigation/examples/exploration-patterns.md +263 -0
  73. package/opencode/skill/coding-conventions/SKILL.md +178 -0
  74. package/opencode/skill/coding-conventions/checklists/accessibility-checklist.md +176 -0
  75. package/opencode/skill/coding-conventions/checklists/performance-checklist.md +154 -0
  76. package/opencode/skill/coding-conventions/checklists/security-checklist.md +127 -0
  77. package/opencode/skill/constitution-validation/SKILL.md +315 -0
  78. package/opencode/skill/constitution-validation/examples/CONSTITUTION.md +202 -0
  79. package/opencode/skill/constitution-validation/reference/rule-patterns.md +328 -0
  80. package/opencode/skill/constitution-validation/template.md +115 -0
  81. package/opencode/skill/context-preservation/SKILL.md +445 -0
  82. package/opencode/skill/data-modeling/SKILL.md +385 -0
  83. package/opencode/skill/data-modeling/templates/schema-design-template.md +268 -0
  84. package/opencode/skill/deployment-pipeline-design/SKILL.md +579 -0
  85. package/opencode/skill/deployment-pipeline-design/templates/pipeline-template.md +633 -0
  86. package/opencode/skill/documentation-extraction/SKILL.md +259 -0
  87. package/opencode/skill/documentation-sync/SKILL.md +431 -0
  88. package/opencode/skill/domain-driven-design/SKILL.md +509 -0
  89. package/opencode/skill/domain-driven-design/examples/ddd-patterns.md +688 -0
  90. package/opencode/skill/domain-driven-design/reference.md +465 -0
  91. package/opencode/skill/drift-detection/SKILL.md +383 -0
  92. package/opencode/skill/drift-detection/reference.md +340 -0
  93. package/opencode/skill/error-recovery/SKILL.md +162 -0
  94. package/opencode/skill/error-recovery/examples/error-patterns.md +484 -0
  95. package/opencode/skill/feature-prioritization/SKILL.md +419 -0
  96. package/opencode/skill/feature-prioritization/examples/rice-template.md +139 -0
  97. package/opencode/skill/feature-prioritization/reference.md +256 -0
  98. package/opencode/skill/git-workflow/SKILL.md +453 -0
  99. package/opencode/skill/implementation-planning/SKILL.md +215 -0
  100. package/opencode/skill/implementation-planning/examples/phase-examples.md +217 -0
  101. package/opencode/skill/implementation-planning/template.md +220 -0
  102. package/opencode/skill/implementation-planning/validation.md +88 -0
  103. package/opencode/skill/implementation-verification/SKILL.md +272 -0
  104. package/opencode/skill/knowledge-capture/SKILL.md +265 -0
  105. package/opencode/skill/knowledge-capture/reference/knowledge-capture.md +402 -0
  106. package/opencode/skill/knowledge-capture/reference.md +444 -0
  107. package/opencode/skill/knowledge-capture/templates/domain-template.md +325 -0
  108. package/opencode/skill/knowledge-capture/templates/interface-template.md +255 -0
  109. package/opencode/skill/knowledge-capture/templates/pattern-template.md +144 -0
  110. package/opencode/skill/observability-design/SKILL.md +291 -0
  111. package/opencode/skill/observability-design/references/monitoring-patterns.md +461 -0
  112. package/opencode/skill/pattern-detection/SKILL.md +171 -0
  113. package/opencode/skill/pattern-detection/examples/common-patterns.md +359 -0
  114. package/opencode/skill/performance-analysis/SKILL.md +266 -0
  115. package/opencode/skill/performance-analysis/references/profiling-tools.md +499 -0
  116. package/opencode/skill/requirements-analysis/SKILL.md +139 -0
  117. package/opencode/skill/requirements-analysis/examples/good-prd.md +66 -0
  118. package/opencode/skill/requirements-analysis/template.md +177 -0
  119. package/opencode/skill/requirements-analysis/validation.md +69 -0
  120. package/opencode/skill/requirements-elicitation/SKILL.md +518 -0
  121. package/opencode/skill/requirements-elicitation/examples/interview-questions.md +226 -0
  122. package/opencode/skill/requirements-elicitation/examples/user-stories.md +414 -0
  123. package/opencode/skill/safe-refactoring/SKILL.md +312 -0
  124. package/opencode/skill/safe-refactoring/reference/code-smells.md +347 -0
  125. package/opencode/skill/security-assessment/SKILL.md +421 -0
  126. package/opencode/skill/security-assessment/checklists/security-review-checklist.md +285 -0
  127. package/opencode/skill/specification-management/SKILL.md +143 -0
  128. package/opencode/skill/specification-management/readme-template.md +32 -0
  129. package/opencode/skill/specification-management/reference.md +115 -0
  130. package/opencode/skill/specification-management/spec.py +229 -0
  131. package/opencode/skill/specification-validation/SKILL.md +397 -0
  132. package/opencode/skill/specification-validation/reference/3cs-framework.md +306 -0
  133. package/opencode/skill/specification-validation/reference/ambiguity-detection.md +132 -0
  134. package/opencode/skill/specification-validation/reference/constitution-validation.md +301 -0
  135. package/opencode/skill/specification-validation/reference/drift-detection.md +383 -0
  136. package/opencode/skill/task-delegation/SKILL.md +607 -0
  137. package/opencode/skill/task-delegation/examples/file-coordination.md +495 -0
  138. package/opencode/skill/task-delegation/examples/parallel-research.md +337 -0
  139. package/opencode/skill/task-delegation/examples/sequential-build.md +504 -0
  140. package/opencode/skill/task-delegation/reference.md +825 -0
  141. package/opencode/skill/tech-stack-detection/SKILL.md +89 -0
  142. package/opencode/skill/tech-stack-detection/references/framework-signatures.md +598 -0
  143. package/opencode/skill/technical-writing/SKILL.md +190 -0
  144. package/opencode/skill/technical-writing/templates/adr-template.md +205 -0
  145. package/opencode/skill/technical-writing/templates/system-doc-template.md +380 -0
  146. package/opencode/skill/test-design/SKILL.md +464 -0
  147. package/opencode/skill/test-design/examples/test-pyramid.md +724 -0
  148. package/opencode/skill/testing/SKILL.md +213 -0
  149. package/opencode/skill/testing/examples/test-pyramid.md +724 -0
  150. package/opencode/skill/user-insight-synthesis/SKILL.md +576 -0
  151. package/opencode/skill/user-insight-synthesis/templates/research-plan-template.md +217 -0
  152. package/opencode/skill/user-research/SKILL.md +508 -0
  153. package/opencode/skill/user-research/examples/interview-questions.md +265 -0
  154. package/opencode/skill/user-research/examples/personas.md +267 -0
  155. package/opencode/skill/vibe-security/SKILL.md +654 -0
  156. package/package.json +45 -0
@@ -0,0 +1,566 @@
1
+ ---
2
+ name: accessibility-design
3
+ description: WCAG 2.1 AA compliance patterns, screen reader compatibility, keyboard navigation, and ARIA best practices. Use when implementing accessible interfaces, reviewing UI components, or auditing accessibility compliance. Covers semantic HTML, focus management, color contrast, and assistive technology testing.
4
+ license: MIT
5
+ compatibility: opencode
6
+ metadata:
7
+ category: design
8
+ version: "1.0"
9
+ ---
10
+
11
+ # Accessibility Design
12
+
13
+ Roleplay as an accessibility specialist providing comprehensive guidance for implementing WCAG 2.1 AA compliance across digital products. Establishes patterns for semantic markup, assistive technology compatibility, and inclusive interaction design.
14
+
15
+ AccessibilityDesign {
16
+ Activation {
17
+ Implementing accessible user interfaces
18
+ Reviewing UI components for accessibility compliance
19
+ Auditing WCAG 2.1 AA compliance
20
+ Designing keyboard navigation patterns
21
+ Implementing ARIA for custom widgets
22
+ Testing with screen readers and assistive technologies
23
+ Ensuring color contrast and visual accessibility
24
+ }
25
+
26
+ Constraints {
27
+ 1. Semantic HTML first - ARIA should enhance, never replace proper markup
28
+ 2. Use native HTML elements whenever possible
29
+ 3. Never remove focus indicators entirely
30
+ 4. Never rely on color alone to convey information
31
+ 5. All functionality must be keyboard accessible
32
+ 6. Maintain logical heading order without skipping levels
33
+ }
34
+
35
+ POURFramework {
36
+ Description: "All accessibility work follows the four POUR principles"
37
+
38
+ Perceivable {
39
+ Provide text alternatives for non-text content
40
+ Create content adaptable to different presentations
41
+ Make content distinguishable (color, contrast, audio control)
42
+ }
43
+
44
+ Operable {
45
+ Make all functionality keyboard accessible
46
+ Provide sufficient time to read and use content
47
+ Avoid content that causes seizures or physical reactions
48
+ Help users navigate, find content, and determine location
49
+ }
50
+
51
+ Understandable {
52
+ Make text readable and understandable
53
+ Make pages appear and operate predictably
54
+ Help users avoid and correct mistakes
55
+ }
56
+
57
+ Robust {
58
+ Maximize compatibility with current and future assistive technologies
59
+ Use valid, semantic markup
60
+ Ensure programmatic access to all functionality
61
+ }
62
+ }
63
+
64
+ SemanticHTMLFirst {
65
+ Correct {
66
+ ```html
67
+ <button type="submit">Submit Form</button>
68
+ ```
69
+ }
70
+
71
+ Incorrect {
72
+ ```html
73
+ <div role="button" tabindex="0" onclick="submit()">Submit Form</div>
74
+ ```
75
+ }
76
+
77
+ NativeElements {
78
+ `<button>` for actions
79
+ `<a href>` for navigation
80
+ `<input>`, `<select>`, `<textarea>` for form controls
81
+ `<nav>`, `<main>`, `<aside>`, `<header>`, `<footer>` for landmarks
82
+ `<h1>` through `<h6>` for heading hierarchy
83
+ }
84
+ }
85
+
86
+ ProgressiveEnhancement {
87
+ 1. Semantic HTML provides baseline accessibility
88
+ 2. CSS enhances presentation without breaking structure
89
+ 3. JavaScript adds interactivity while maintaining keyboard access
90
+ 4. ARIA fills gaps for complex widgets not covered by HTML
91
+ }
92
+
93
+ ImplementationPatterns {
94
+ DocumentStructure {
95
+ ```html
96
+ <!DOCTYPE html>
97
+ <html lang="en">
98
+ <head>
99
+ <meta charset="UTF-8">
100
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
101
+ <title>Descriptive Page Title - Site Name</title>
102
+ </head>
103
+ <body>
104
+ <a href="#main-content" class="skip-link">Skip to main content</a>
105
+
106
+ <header role="banner">
107
+ <nav aria-label="Main navigation">
108
+ <!-- Navigation content -->
109
+ </nav>
110
+ </header>
111
+
112
+ <main id="main-content" role="main">
113
+ <h1>Page Heading</h1>
114
+ <!-- Page content -->
115
+ </main>
116
+
117
+ <footer role="contentinfo">
118
+ <!-- Footer content -->
119
+ </footer>
120
+ </body>
121
+ </html>
122
+ ```
123
+ }
124
+
125
+ HeadingHierarchy {
126
+ ```html
127
+ <h1>Main Page Title</h1>
128
+ <h2>Section Title</h2>
129
+ <h3>Subsection Title</h3>
130
+ <h3>Another Subsection</h3>
131
+ <h2>Another Section</h2>
132
+ <h3>Subsection</h3>
133
+ <h4>Sub-subsection</h4>
134
+ ```
135
+ }
136
+
137
+ SkipLinks {
138
+ ```css
139
+ .skip-link {
140
+ position: absolute;
141
+ top: -40px;
142
+ left: 0;
143
+ padding: 8px 16px;
144
+ background: #000;
145
+ color: #fff;
146
+ z-index: 100;
147
+ }
148
+
149
+ .skip-link:focus {
150
+ top: 0;
151
+ }
152
+ ```
153
+ }
154
+ }
155
+
156
+ FocusManagement {
157
+ VisibleFocusIndicators {
158
+ ```css
159
+ :focus {
160
+ outline: 2px solid #005fcc;
161
+ outline-offset: 2px;
162
+ }
163
+
164
+ /* Enhanced focus for better visibility */
165
+ :focus-visible {
166
+ outline: 3px solid #005fcc;
167
+ outline-offset: 3px;
168
+ box-shadow: 0 0 0 6px rgba(0, 95, 204, 0.25);
169
+ }
170
+
171
+ /* Never remove focus indicators entirely */
172
+ :focus:not(:focus-visible) {
173
+ outline: 2px solid transparent;
174
+ box-shadow: 0 0 0 2px #005fcc;
175
+ }
176
+ ```
177
+ }
178
+
179
+ FocusTrappingForModals {
180
+ ```javascript
181
+ function trapFocus(element) {
182
+ const focusableElements = element.querySelectorAll(
183
+ 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
184
+ );
185
+ const firstFocusable = focusableElements[0];
186
+ const lastFocusable = focusableElements[focusableElements.length - 1];
187
+
188
+ element.addEventListener('keydown', (e) => {
189
+ if (e.key !== 'Tab') return;
190
+
191
+ if (e.shiftKey) {
192
+ if (document.activeElement === firstFocusable) {
193
+ lastFocusable.focus();
194
+ e.preventDefault();
195
+ }
196
+ } else {
197
+ if (document.activeElement === lastFocusable) {
198
+ firstFocusable.focus();
199
+ e.preventDefault();
200
+ }
201
+ }
202
+ });
203
+ }
204
+ ```
205
+ }
206
+ }
207
+
208
+ KeyboardNavigation {
209
+ StandardPatterns {
210
+ | Key | Action |
211
+ |-----|--------|
212
+ | Tab | Move focus to next focusable element |
213
+ | Shift+Tab | Move focus to previous focusable element |
214
+ | Enter/Space | Activate buttons and links |
215
+ | Arrow keys | Navigate within components (menus, tabs, radio groups) |
216
+ | Escape | Close modals, menus, dropdowns |
217
+ | Home/End | Move to first/last item in lists |
218
+ }
219
+
220
+ TabOrder {
221
+ ```html
222
+ <!-- Correct: Tab order matches visual order -->
223
+ <form>
224
+ <label for="name">Name</label>
225
+ <input id="name" type="text">
226
+
227
+ <label for="email">Email</label>
228
+ <input id="email" type="email">
229
+
230
+ <button type="submit">Submit</button>
231
+ </form>
232
+ ```
233
+
234
+ Rules {
235
+ Never use positive `tabindex` values
236
+ Use `tabindex="0"` to make non-interactive elements focusable
237
+ Use `tabindex="-1"` to make elements programmatically focusable but not in tab order
238
+ }
239
+ }
240
+ }
241
+
242
+ ARIAPatterns {
243
+ WhenToUseARIA {
244
+ Custom widgets: Tabs, accordions, carousels, tree views
245
+ Dynamic content: Live regions for updates
246
+ Relationships: Connecting labels to complex controls
247
+ States: Expanded/collapsed, selected, pressed
248
+ }
249
+
250
+ ARIARoles {
251
+ ```html
252
+ <!-- Tab pattern -->
253
+ <div role="tablist" aria-label="Settings tabs">
254
+ <button role="tab" aria-selected="true" aria-controls="panel1" id="tab1">
255
+ General
256
+ </button>
257
+ <button role="tab" aria-selected="false" aria-controls="panel2" id="tab2">
258
+ Security
259
+ </button>
260
+ </div>
261
+ <div role="tabpanel" id="panel1" aria-labelledby="tab1">
262
+ <!-- Panel content -->
263
+ </div>
264
+ <div role="tabpanel" id="panel2" aria-labelledby="tab2" hidden>
265
+ <!-- Panel content -->
266
+ </div>
267
+ ```
268
+ }
269
+
270
+ ARIAStatesAndProperties {
271
+ | Attribute | Purpose | Example |
272
+ |-----------|---------|---------|
273
+ | `aria-expanded` | Indicates expandable element state | `aria-expanded="false"` |
274
+ | `aria-selected` | Indicates selection state | `aria-selected="true"` |
275
+ | `aria-pressed` | Indicates toggle button state | `aria-pressed="mixed"` |
276
+ | `aria-hidden` | Hides content from assistive tech | `aria-hidden="true"` |
277
+ | `aria-live` | Announces dynamic content | `aria-live="polite"` |
278
+ | `aria-describedby` | References descriptive content | `aria-describedby="hint"` |
279
+ | `aria-labelledby` | References labeling content | `aria-labelledby="heading"` |
280
+ }
281
+
282
+ LiveRegions {
283
+ ```html
284
+ <!-- Polite: Announces when user is idle -->
285
+ <div aria-live="polite" aria-atomic="true">
286
+ Form saved successfully
287
+ </div>
288
+
289
+ <!-- Assertive: Interrupts immediately (use sparingly) -->
290
+ <div aria-live="assertive" role="alert">
291
+ Error: Please correct the highlighted fields
292
+ </div>
293
+
294
+ <!-- Status messages -->
295
+ <div role="status">
296
+ Loading... 50% complete
297
+ </div>
298
+ ```
299
+ }
300
+ }
301
+
302
+ FormAccessibility {
303
+ LabelsAndInstructions {
304
+ ```html
305
+ <!-- Explicit label association -->
306
+ <label for="username">Username</label>
307
+ <input type="text" id="username" name="username"
308
+ aria-describedby="username-hint">
309
+ <span id="username-hint">Must be 3-20 characters</span>
310
+
311
+ <!-- Grouped controls with fieldset -->
312
+ <fieldset>
313
+ <legend>Shipping Address</legend>
314
+ <label for="street">Street</label>
315
+ <input type="text" id="street">
316
+ <!-- More fields -->
317
+ </fieldset>
318
+ ```
319
+ }
320
+
321
+ ErrorHandling {
322
+ ```html
323
+ <label for="email">Email</label>
324
+ <input type="email" id="email"
325
+ aria-invalid="true"
326
+ aria-describedby="email-error">
327
+ <span id="email-error" role="alert">
328
+ Please enter a valid email address (example: user@domain.com)
329
+ </span>
330
+ ```
331
+
332
+ Requirements {
333
+ Identify the field in error
334
+ Describe what went wrong
335
+ Provide guidance for correction
336
+ Use `aria-invalid` on the field
337
+ Announce errors via live region or `role="alert"`
338
+ }
339
+ }
340
+
341
+ RequiredFields {
342
+ ```html
343
+ <label for="name">
344
+ Name <span aria-hidden="true">*</span>
345
+ <span class="sr-only">(required)</span>
346
+ </label>
347
+ <input type="text" id="name" required aria-required="true">
348
+ ```
349
+ }
350
+ }
351
+
352
+ ImagesAndMedia {
353
+ AlternativeText {
354
+ ```html
355
+ <!-- Informative image -->
356
+ <img src="chart.png" alt="Q3 revenue increased 15% compared to Q2">
357
+
358
+ <!-- Decorative image -->
359
+ <img src="divider.png" alt="" role="presentation">
360
+
361
+ <!-- Complex image with extended description -->
362
+ <figure>
363
+ <img src="flowchart.png" alt="User registration process"
364
+ aria-describedby="flowchart-desc">
365
+ <figcaption id="flowchart-desc">
366
+ The registration process begins with email verification,
367
+ followed by profile creation, and ends with account activation.
368
+ </figcaption>
369
+ </figure>
370
+ ```
371
+ }
372
+
373
+ VideoAndAudio {
374
+ ```html
375
+ <video controls>
376
+ <source src="video.mp4" type="video/mp4">
377
+ <track kind="captions" src="captions.vtt" srclang="en" label="English">
378
+ <track kind="descriptions" src="descriptions.vtt" srclang="en"
379
+ label="Audio descriptions">
380
+ </video>
381
+ ```
382
+ }
383
+ }
384
+
385
+ ColorAndContrast {
386
+ MinimumContrastRatios {
387
+ | Content Type | Minimum Ratio (AA) | Enhanced Ratio (AAA) |
388
+ |--------------|-------------------|---------------------|
389
+ | Normal text (< 18pt) | 4.5:1 | 7:1 |
390
+ | Large text (>= 18pt or 14pt bold) | 3:1 | 4.5:1 |
391
+ | UI components and graphics | 3:1 | N/A |
392
+ }
393
+
394
+ NeverRelyOnColorAlone {
395
+ ```html
396
+ <!-- Bad: Color only indicates error -->
397
+ <input style="border-color: red">
398
+
399
+ <!-- Good: Color plus icon and text -->
400
+ <input aria-invalid="true" aria-describedby="error">
401
+ <span id="error">
402
+ <svg aria-hidden="true"><!-- Error icon --></svg>
403
+ Invalid email format
404
+ </span>
405
+ ```
406
+ }
407
+ }
408
+
409
+ MotionAndAnimation {
410
+ RespectUserPreferences {
411
+ ```css
412
+ /* Reduce motion for users who prefer it */
413
+ @media (prefers-reduced-motion: reduce) {
414
+ *,
415
+ *::before,
416
+ *::after {
417
+ animation-duration: 0.01ms !important;
418
+ animation-iteration-count: 1 !important;
419
+ transition-duration: 0.01ms !important;
420
+ }
421
+ }
422
+ ```
423
+ }
424
+
425
+ AutoPlayingContent {
426
+ Avoid auto-playing video or audio
427
+ Provide controls to pause, stop, or hide moving content
428
+ Limit animations to under 5 seconds or provide stop mechanism
429
+ }
430
+ }
431
+
432
+ TestingMethodology {
433
+ AutomatedTesting {
434
+ Tools {
435
+ axe DevTools: Browser extension for page analysis
436
+ WAVE: Web accessibility evaluation tool
437
+ Lighthouse: Chrome DevTools accessibility audit
438
+ pa11y: Command-line accessibility testing
439
+ }
440
+
441
+ Note: "Automated testing catches approximately 30-40% of issues"
442
+ }
443
+
444
+ KeyboardTesting {
445
+ 1. Disconnect or disable mouse
446
+ 2. Navigate entire page using Tab/Shift+Tab
447
+ 3. Verify all interactive elements are reachable
448
+ 4. Verify focus indicators are visible
449
+ 5. Test all keyboard shortcuts
450
+ 6. Escape from all modals and menus
451
+ }
452
+
453
+ ScreenReaderTesting {
454
+ Platforms {
455
+ | Platform | Screen Reader | Browser |
456
+ |----------|---------------|---------|
457
+ | Windows | NVDA (free) | Firefox, Chrome |
458
+ | Windows | JAWS | Chrome, Edge |
459
+ | macOS | VoiceOver | Safari |
460
+ | iOS | VoiceOver | Safari |
461
+ | Android | TalkBack | Chrome |
462
+ }
463
+
464
+ Checklist {
465
+ All images have appropriate alt text
466
+ Headings convey page structure
467
+ Links and buttons have descriptive names
468
+ Form fields have labels
469
+ Error messages are announced
470
+ Dynamic content updates are announced
471
+ Tables have proper headers
472
+ Custom widgets announce state changes
473
+ }
474
+ }
475
+
476
+ VisualTesting {
477
+ Zoom to 200% and verify no horizontal scrolling
478
+ Test with high contrast mode enabled
479
+ Disable images and verify content is still understandable
480
+ Test with browser text size increased
481
+ }
482
+ }
483
+
484
+ CommonPatterns {
485
+ ModalDialog {
486
+ ```html
487
+ <div role="dialog" aria-modal="true" aria-labelledby="dialog-title">
488
+ <h2 id="dialog-title">Confirm Action</h2>
489
+ <p>Are you sure you want to proceed?</p>
490
+ <button type="button">Cancel</button>
491
+ <button type="button">Confirm</button>
492
+ </div>
493
+ ```
494
+
495
+ Requirements {
496
+ Focus moves to dialog when opened
497
+ Focus is trapped within dialog
498
+ Escape key closes dialog
499
+ Focus returns to trigger element on close
500
+ }
501
+ }
502
+
503
+ Accordion {
504
+ ```html
505
+ <div class="accordion">
506
+ <h3>
507
+ <button aria-expanded="true" aria-controls="section1">
508
+ Section 1
509
+ </button>
510
+ </h3>
511
+ <div id="section1" role="region" aria-labelledby="section1-heading">
512
+ <!-- Content -->
513
+ </div>
514
+ </div>
515
+ ```
516
+ }
517
+
518
+ NavigationMenu {
519
+ ```html
520
+ <nav aria-label="Main">
521
+ <ul>
522
+ <li><a href="/" aria-current="page">Home</a></li>
523
+ <li>
524
+ <button aria-expanded="false" aria-haspopup="true">
525
+ Products
526
+ </button>
527
+ <ul>
528
+ <li><a href="/products/a">Product A</a></li>
529
+ <li><a href="/products/b">Product B</a></li>
530
+ </ul>
531
+ </li>
532
+ </ul>
533
+ </nav>
534
+ ```
535
+ }
536
+
537
+ DataTable {
538
+ ```html
539
+ <table>
540
+ <caption>Q3 Sales by Region</caption>
541
+ <thead>
542
+ <tr>
543
+ <th scope="col">Region</th>
544
+ <th scope="col">Units Sold</th>
545
+ <th scope="col">Revenue</th>
546
+ </tr>
547
+ </thead>
548
+ <tbody>
549
+ <tr>
550
+ <th scope="row">North</th>
551
+ <td>1,234</td>
552
+ <td>$45,678</td>
553
+ </tr>
554
+ </tbody>
555
+ </table>
556
+ ```
557
+ }
558
+ }
559
+ }
560
+
561
+ ## Resources
562
+
563
+ - [WCAG 2.1 Guidelines](https://www.w3.org/WAI/WCAG21/quickref/)
564
+ - [WAI-ARIA Authoring Practices](https://www.w3.org/WAI/ARIA/apg/)
565
+ - [Inclusive Components](https://inclusive-components.design/)
566
+ - [A11y Project Checklist](https://www.a11yproject.com/checklist/)