@sylix/coworker 2.0.11 → 2.0.14

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 (169) hide show
  1. package/dist/commands/slash/config.d.ts.map +1 -1
  2. package/dist/commands/slash/config.js +22 -4
  3. package/dist/commands/slash/config.js.map +1 -1
  4. package/dist/core/CoWorkerAgent.d.ts.map +1 -1
  5. package/dist/core/CoWorkerAgent.js +6 -3
  6. package/dist/core/CoWorkerAgent.js.map +1 -1
  7. package/dist/skills/defaults/accessibility/screen-reader-testing.md +545 -0
  8. package/dist/skills/defaults/accessibility/wcag-audit-patterns.md +555 -0
  9. package/dist/skills/defaults/ai-ml/rag.md +276 -0
  10. package/dist/skills/defaults/backend-development/api-design-principles.md +528 -0
  11. package/dist/skills/defaults/backend-development/api-design.md +285 -0
  12. package/dist/skills/defaults/backend-development/architecture-patterns.md +494 -0
  13. package/dist/skills/defaults/backend-development/async-python.md +237 -0
  14. package/dist/skills/defaults/backend-development/auth-implementation-patterns.md +638 -0
  15. package/dist/skills/defaults/backend-development/bazel-build-optimization.md +387 -0
  16. package/dist/skills/defaults/backend-development/billing-automation/SKILL.md +566 -0
  17. package/dist/skills/defaults/backend-development/code-review-excellence.md +538 -0
  18. package/dist/skills/defaults/backend-development/cqrs-implementation.md +554 -0
  19. package/dist/skills/defaults/backend-development/database-design.md +305 -0
  20. package/dist/skills/defaults/backend-development/debugging-strategies.md +536 -0
  21. package/dist/skills/defaults/backend-development/e2e-testing-patterns.md +544 -0
  22. package/dist/skills/defaults/backend-development/error-handling-patterns.md +641 -0
  23. package/dist/skills/defaults/backend-development/fastapi-templates.md +559 -0
  24. package/dist/skills/defaults/backend-development/fastapi.md +309 -0
  25. package/dist/skills/defaults/backend-development/git-advanced-workflows.md +405 -0
  26. package/dist/skills/defaults/backend-development/microservices-patterns.md +595 -0
  27. package/dist/skills/defaults/backend-development/microservices.md +284 -0
  28. package/dist/skills/defaults/backend-development/monorepo-management.md +623 -0
  29. package/dist/skills/defaults/backend-development/nodejs-backend-patterns.md +1048 -0
  30. package/dist/skills/defaults/backend-development/nx-workspace-patterns.md +457 -0
  31. package/dist/skills/defaults/backend-development/paypal-integration/SKILL.md +478 -0
  32. package/dist/skills/defaults/backend-development/pci-compliance/SKILL.md +480 -0
  33. package/dist/skills/defaults/backend-development/python-anti-patterns.md +349 -0
  34. package/dist/skills/defaults/backend-development/python-background-jobs.md +364 -0
  35. package/dist/skills/defaults/backend-development/python-code-style.md +360 -0
  36. package/dist/skills/defaults/backend-development/python-configuration.md +368 -0
  37. package/dist/skills/defaults/backend-development/python-design-patterns.md +296 -0
  38. package/dist/skills/defaults/backend-development/python-error-handling.md +323 -0
  39. package/dist/skills/defaults/backend-development/python-packaging.md +887 -0
  40. package/dist/skills/defaults/backend-development/python-performance-optimization.md +874 -0
  41. package/dist/skills/defaults/backend-development/python-project-structure.md +252 -0
  42. package/dist/skills/defaults/backend-development/python-resilience.md +376 -0
  43. package/dist/skills/defaults/backend-development/python-resource-management.md +421 -0
  44. package/dist/skills/defaults/backend-development/python-type-safety.md +428 -0
  45. package/dist/skills/defaults/backend-development/sql-optimization-patterns.md +509 -0
  46. package/dist/skills/defaults/backend-development/stripe-integration/SKILL.md +522 -0
  47. package/dist/skills/defaults/backend-development/turborepo-caching.md +376 -0
  48. package/dist/skills/defaults/blockchain/defi-protocol-templates.md +430 -0
  49. package/dist/skills/defaults/blockchain/nft-standards.md +364 -0
  50. package/dist/skills/defaults/blockchain/solidity-security.md +514 -0
  51. package/dist/skills/defaults/blockchain/web3-testing.md +360 -0
  52. package/dist/skills/defaults/business/competitive-landscape/SKILL.md +527 -0
  53. package/dist/skills/defaults/business/market-sizing-analysis/SKILL.md +451 -0
  54. package/dist/skills/defaults/business/startup-financial-modeling/SKILL.md +494 -0
  55. package/dist/skills/defaults/business/startup-metrics-framework/SKILL.md +564 -0
  56. package/dist/skills/defaults/business/team-composition-analysis.md +437 -0
  57. package/dist/skills/defaults/compliance/employment-contract-templates/SKILL.md +527 -0
  58. package/dist/skills/defaults/compliance/gdpr-data-handling/SKILL.md +630 -0
  59. package/dist/skills/defaults/data-engineering/airflow-dag-patterns.md +436 -0
  60. package/dist/skills/defaults/data-engineering/airflow.md +519 -0
  61. package/dist/skills/defaults/data-engineering/data-quality.md +583 -0
  62. package/dist/skills/defaults/data-engineering/dbt-transformation-patterns.md +482 -0
  63. package/dist/skills/defaults/data-engineering/dbt.md +556 -0
  64. package/dist/skills/defaults/data-engineering/ml-pipeline-workflow/SKILL.md +247 -0
  65. package/dist/skills/defaults/data-engineering/spark-optimization.md +348 -0
  66. package/dist/skills/defaults/data-engineering/spark.md +411 -0
  67. package/dist/skills/defaults/database/postgresql.md +202 -0
  68. package/dist/skills/defaults/debugging/systematic-debugging.md +249 -0
  69. package/dist/skills/defaults/devops/architecture-decision-records.md +448 -0
  70. package/dist/skills/defaults/devops/changelog-automation.md +580 -0
  71. package/dist/skills/defaults/devops/cicd.md +314 -0
  72. package/dist/skills/defaults/devops/cloud.md +263 -0
  73. package/dist/skills/defaults/devops/code-review-excellence.md +299 -0
  74. package/dist/skills/defaults/devops/cost-optimization.md +295 -0
  75. package/dist/skills/defaults/devops/deployment-pipeline-design.md +356 -0
  76. package/dist/skills/defaults/devops/docker.md +281 -0
  77. package/dist/skills/defaults/devops/git-workflows.md +205 -0
  78. package/dist/skills/defaults/devops/github-actions.md +311 -0
  79. package/dist/skills/defaults/devops/gitlab-ci-patterns.md +266 -0
  80. package/dist/skills/defaults/devops/hybrid-cloud-networking.md +241 -0
  81. package/dist/skills/defaults/devops/istio-traffic-management.md +327 -0
  82. package/dist/skills/defaults/devops/kubernetes.md +339 -0
  83. package/dist/skills/defaults/devops/linkerd-patterns.md +311 -0
  84. package/dist/skills/defaults/devops/multi-cloud-architecture.md +181 -0
  85. package/dist/skills/defaults/devops/observability.md +243 -0
  86. package/dist/skills/defaults/devops/openapi-spec-generation.md +1024 -0
  87. package/dist/skills/defaults/devops/postmortem-writing.md +396 -0
  88. package/dist/skills/defaults/devops/prometheus-configuration.md +265 -0
  89. package/dist/skills/defaults/devops/secrets-management.md +341 -0
  90. package/dist/skills/defaults/devops/service-mesh-observability.md +385 -0
  91. package/dist/skills/defaults/devops/terraform-module-library.md +244 -0
  92. package/dist/skills/defaults/finance/backtesting-frameworks/SKILL.md +663 -0
  93. package/dist/skills/defaults/finance/risk-metrics-calculation/SKILL.md +557 -0
  94. package/dist/skills/defaults/frontend/accessibility-compliance.md +420 -0
  95. package/dist/skills/defaults/frontend/design-system-patterns.md +337 -0
  96. package/dist/skills/defaults/frontend/interaction-design.md +327 -0
  97. package/dist/skills/defaults/frontend/javascript.md +311 -0
  98. package/dist/skills/defaults/frontend/modern-javascript-patterns.md +927 -0
  99. package/dist/skills/defaults/frontend/react-native-design.md +440 -0
  100. package/dist/skills/defaults/frontend/react.md +345 -0
  101. package/dist/skills/defaults/frontend/responsive-design.md +472 -0
  102. package/dist/skills/defaults/frontend/tailwind-design-system.md +337 -0
  103. package/dist/skills/defaults/frontend/typescript-advanced-types.md +724 -0
  104. package/dist/skills/defaults/frontend/typescript.md +334 -0
  105. package/dist/skills/defaults/frontend/visual-design-foundations.md +326 -0
  106. package/dist/skills/defaults/frontend/web-component-design.md +279 -0
  107. package/dist/skills/defaults/game-development/godot-gdscript-patterns.md +188 -0
  108. package/dist/skills/defaults/game-development/unity-ecs-patterns.md +594 -0
  109. package/dist/skills/defaults/kubernetes/gitops-workflow.md +285 -0
  110. package/dist/skills/defaults/kubernetes/gitops.md +280 -0
  111. package/dist/skills/defaults/kubernetes/helm-chart-scaffolding.md +553 -0
  112. package/dist/skills/defaults/kubernetes/helm.md +343 -0
  113. package/dist/skills/defaults/kubernetes/k8s-manifest-generator.md +501 -0
  114. package/dist/skills/defaults/kubernetes/k8s-security-policies.md +342 -0
  115. package/dist/skills/defaults/kubernetes/manifests.md +330 -0
  116. package/dist/skills/defaults/kubernetes/security.md +337 -0
  117. package/dist/skills/defaults/llm-application/embedding-strategies.md +608 -0
  118. package/dist/skills/defaults/llm-application/hybrid-search-implementation.md +570 -0
  119. package/dist/skills/defaults/llm-application/hybrid-search.md +570 -0
  120. package/dist/skills/defaults/llm-application/langchain-architecture.md +666 -0
  121. package/dist/skills/defaults/llm-application/langchain.md +259 -0
  122. package/dist/skills/defaults/llm-application/llm-evaluation.md +695 -0
  123. package/dist/skills/defaults/llm-application/prompt-engineering-patterns.md +449 -0
  124. package/dist/skills/defaults/llm-application/prompt-engineering.md +219 -0
  125. package/dist/skills/defaults/llm-application/rag-implementation.md +434 -0
  126. package/dist/skills/defaults/llm-application/similarity-search-patterns.md +560 -0
  127. package/dist/skills/defaults/llm-application/similarity-search.md +560 -0
  128. package/dist/skills/defaults/llm-application/vector-index-tuning.md +523 -0
  129. package/dist/skills/defaults/mobile/mobile-android-design.md +440 -0
  130. package/dist/skills/defaults/mobile/mobile-ios-design.md +266 -0
  131. package/dist/skills/defaults/monitoring/distributed-tracing.md +436 -0
  132. package/dist/skills/defaults/monitoring/grafana-dashboards.md +370 -0
  133. package/dist/skills/defaults/monitoring/prometheus-configuration.md +379 -0
  134. package/dist/skills/defaults/monitoring/slo-implementation.md +323 -0
  135. package/dist/skills/defaults/refactoring/code-refactoring.md +349 -0
  136. package/dist/skills/defaults/security/anti-reversing-techniques/SKILL.md +559 -0
  137. package/dist/skills/defaults/security/auditor.md +168 -0
  138. package/dist/skills/defaults/security/binary-analysis-patterns/SKILL.md +438 -0
  139. package/dist/skills/defaults/security/memory-forensics/SKILL.md +483 -0
  140. package/dist/skills/defaults/security/mtls-configuration.md +349 -0
  141. package/dist/skills/defaults/security/protocol-reverse-engineering/SKILL.md +520 -0
  142. package/dist/skills/defaults/security/sast-configuration.md +182 -0
  143. package/dist/skills/defaults/security/security.md +313 -0
  144. package/dist/skills/defaults/security/stride-analysis.md +273 -0
  145. package/dist/skills/defaults/security/threat-mitigation-mapping.md +290 -0
  146. package/dist/skills/defaults/systems/bash-defensive-patterns/SKILL.md +539 -0
  147. package/dist/skills/defaults/systems/bats-testing-patterns/SKILL.md +631 -0
  148. package/dist/skills/defaults/systems/go-concurrency-patterns.md +657 -0
  149. package/dist/skills/defaults/systems/memory-safety-patterns.md +605 -0
  150. package/dist/skills/defaults/systems/rust-async-patterns.md +519 -0
  151. package/dist/skills/defaults/systems/shellcheck-configuration/SKILL.md +456 -0
  152. package/dist/skills/defaults/team-collaboration/multi-reviewer-patterns.md +126 -0
  153. package/dist/skills/defaults/team-collaboration/parallel-feature-development.md +151 -0
  154. package/dist/skills/defaults/testing/javascript-testing-patterns.md +1021 -0
  155. package/dist/skills/defaults/testing/python-testing-patterns.md +351 -0
  156. package/dist/skills/defaults/testing/testing.md +332 -0
  157. package/dist/skills/defaults/workflows/context-driven-development.md +384 -0
  158. package/dist/skills/defaults/workflows/track-management.md +592 -0
  159. package/dist/skills/defaults/workflows/workflow-patterns.md +622 -0
  160. package/dist/skills/index.d.ts +11 -0
  161. package/dist/skills/index.d.ts.map +1 -0
  162. package/dist/skills/index.js +129 -0
  163. package/dist/skills/index.js.map +1 -0
  164. package/dist/utils/character.js +4 -4
  165. package/dist/utils/character.js.map +1 -1
  166. package/dist/utils/inputbar.d.ts.map +1 -1
  167. package/dist/utils/inputbar.js +7 -0
  168. package/dist/utils/inputbar.js.map +1 -1
  169. package/package.json +1 -1
@@ -0,0 +1,555 @@
1
+ ---
2
+ name: wcag-audit-patterns
3
+ description: Conduct WCAG 2.2 accessibility audits with automated testing, manual verification, and remediation guidance. Use when auditing websites for accessibility, fixing WCAG violations, or implementing accessible design patterns.
4
+ ---
5
+
6
+ # WCAG Audit Patterns
7
+
8
+ Comprehensive guide to auditing web content against WCAG 2.2 guidelines with actionable remediation strategies.
9
+
10
+ ## When to Use This Skill
11
+
12
+ - Conducting accessibility audits
13
+ - Fixing WCAG violations
14
+ - Implementing accessible components
15
+ - Preparing for accessibility lawsuits
16
+ - Meeting ADA/Section 508 requirements
17
+ - Achieving VPAT compliance
18
+
19
+ ## Core Concepts
20
+
21
+ ### 1. WCAG Conformance Levels
22
+
23
+ | Level | Description | Required For |
24
+ | ------- | ---------------------- | ----------------- |
25
+ | **A** | Minimum accessibility | Legal baseline |
26
+ | **AA** | Standard conformance | Most regulations |
27
+ | **AAA** | Enhanced accessibility | Specialized needs |
28
+
29
+ ### 2. POUR Principles
30
+
31
+ ```
32
+ Perceivable: Can users perceive the content?
33
+ Operable: Can users operate the interface?
34
+ Understandable: Can users understand the content?
35
+ Robust: Does it work with assistive tech?
36
+ ```
37
+
38
+ ### 3. Common Violations by Impact
39
+
40
+ ```
41
+ Critical (Blockers):
42
+ ├── Missing alt text for functional images
43
+ ├── No keyboard access to interactive elements
44
+ ├── Missing form labels
45
+ └── Auto-playing media without controls
46
+
47
+ Serious:
48
+ ├── Insufficient color contrast
49
+ ├── Missing skip links
50
+ ├── Inaccessible custom widgets
51
+ └── Missing page titles
52
+
53
+ Moderate:
54
+ ├── Missing language attribute
55
+ ├── Unclear link text
56
+ ├── Missing landmarks
57
+ └── Improper heading hierarchy
58
+ ```
59
+
60
+ ## Audit Checklist
61
+
62
+ ### Perceivable (Principle 1)
63
+
64
+ ````markdown
65
+ ## 1.1 Text Alternatives
66
+
67
+ ### 1.1.1 Non-text Content (Level A)
68
+
69
+ - [ ] All images have alt text
70
+ - [ ] Decorative images have alt=""
71
+ - [ ] Complex images have long descriptions
72
+ - [ ] Icons with meaning have accessible names
73
+ - [ ] CAPTCHAs have alternatives
74
+
75
+ Check:
76
+
77
+ ```html
78
+ <!-- Good -->
79
+ <img src="chart.png" alt="Sales increased 25% from Q1 to Q2" />
80
+ <img src="decorative-line.png" alt="" />
81
+
82
+ <!-- Bad -->
83
+ <img src="chart.png" />
84
+ <img src="decorative-line.png" alt="decorative line" />
85
+ ```
86
+ ````
87
+
88
+ ## 1.2 Time-based Media
89
+
90
+ ### 1.2.1 Audio-only and Video-only (Level A)
91
+
92
+ - [ ] Audio has text transcript
93
+ - [ ] Video has audio description or transcript
94
+
95
+ ### 1.2.2 Captions (Level A)
96
+
97
+ - [ ] All video has synchronized captions
98
+ - [ ] Captions are accurate and complete
99
+ - [ ] Speaker identification included
100
+
101
+ ### 1.2.3 Audio Description (Level A)
102
+
103
+ - [ ] Video has audio description for visual content
104
+
105
+ ## 1.3 Adaptable
106
+
107
+ ### 1.3.1 Info and Relationships (Level A)
108
+
109
+ - [ ] Headings use proper tags (h1-h6)
110
+ - [ ] Lists use ul/ol/dl
111
+ - [ ] Tables have headers
112
+ - [ ] Form inputs have labels
113
+ - [ ] ARIA landmarks present
114
+
115
+ Check:
116
+
117
+ ```html
118
+ <!-- Heading hierarchy -->
119
+ <h1>Page Title</h1>
120
+ <h2>Section</h2>
121
+ <h3>Subsection</h3>
122
+ <h2>Another Section</h2>
123
+
124
+ <!-- Table headers -->
125
+ <table>
126
+ <thead>
127
+ <tr>
128
+ <th scope="col">Name</th>
129
+ <th scope="col">Price</th>
130
+ </tr>
131
+ </thead>
132
+ </table>
133
+ ```
134
+
135
+ ### 1.3.2 Meaningful Sequence (Level A)
136
+
137
+ - [ ] Reading order is logical
138
+ - [ ] CSS positioning doesn't break order
139
+ - [ ] Focus order matches visual order
140
+
141
+ ### 1.3.3 Sensory Characteristics (Level A)
142
+
143
+ - [ ] Instructions don't rely on shape/color alone
144
+ - [ ] "Click the red button" → "Click Submit (red button)"
145
+
146
+ ## 1.4 Distinguishable
147
+
148
+ ### 1.4.1 Use of Color (Level A)
149
+
150
+ - [ ] Color is not only means of conveying info
151
+ - [ ] Links distinguishable without color
152
+ - [ ] Error states not color-only
153
+
154
+ ### 1.4.3 Contrast (Minimum) (Level AA)
155
+
156
+ - [ ] Text: 4.5:1 contrast ratio
157
+ - [ ] Large text (18pt+): 3:1 ratio
158
+ - [ ] UI components: 3:1 ratio
159
+
160
+ Tools: WebAIM Contrast Checker, axe DevTools
161
+
162
+ ### 1.4.4 Resize Text (Level AA)
163
+
164
+ - [ ] Text resizes to 200% without loss
165
+ - [ ] No horizontal scrolling at 320px
166
+ - [ ] Content reflows properly
167
+
168
+ ### 1.4.10 Reflow (Level AA)
169
+
170
+ - [ ] Content reflows at 400% zoom
171
+ - [ ] No two-dimensional scrolling
172
+ - [ ] All content accessible at 320px width
173
+
174
+ ### 1.4.11 Non-text Contrast (Level AA)
175
+
176
+ - [ ] UI components have 3:1 contrast
177
+ - [ ] Focus indicators visible
178
+ - [ ] Graphical objects distinguishable
179
+
180
+ ### 1.4.12 Text Spacing (Level AA)
181
+
182
+ - [ ] No content loss with increased spacing
183
+ - [ ] Line height 1.5x font size
184
+ - [ ] Paragraph spacing 2x font size
185
+ - [ ] Letter spacing 0.12x font size
186
+ - [ ] Word spacing 0.16x font size
187
+
188
+ ````
189
+
190
+ ### Operable (Principle 2)
191
+
192
+ ```markdown
193
+ ## 2.1 Keyboard Accessible
194
+
195
+ ### 2.1.1 Keyboard (Level A)
196
+ - [ ] All functionality keyboard accessible
197
+ - [ ] No keyboard traps
198
+ - [ ] Tab order is logical
199
+ - [ ] Custom widgets are keyboard operable
200
+
201
+ Check:
202
+ ```javascript
203
+ // Custom button must be keyboard accessible
204
+ <div role="button" tabindex="0"
205
+ onkeydown="if(event.key === 'Enter' || event.key === ' ') activate()">
206
+ ````
207
+
208
+ ### 2.1.2 No Keyboard Trap (Level A)
209
+
210
+ - [ ] Focus can move away from all components
211
+ - [ ] Modal dialogs trap focus correctly
212
+ - [ ] Focus returns after modal closes
213
+
214
+ ## 2.2 Enough Time
215
+
216
+ ### 2.2.1 Timing Adjustable (Level A)
217
+
218
+ - [ ] Session timeouts can be extended
219
+ - [ ] User warned before timeout
220
+ - [ ] Option to disable auto-refresh
221
+
222
+ ### 2.2.2 Pause, Stop, Hide (Level A)
223
+
224
+ - [ ] Moving content can be paused
225
+ - [ ] Auto-updating content can be paused
226
+ - [ ] Animations respect prefers-reduced-motion
227
+
228
+ ```css
229
+ @media (prefers-reduced-motion: reduce) {
230
+ * {
231
+ animation: none !important;
232
+ transition: none !important;
233
+ }
234
+ }
235
+ ```
236
+
237
+ ## 2.3 Seizures and Physical Reactions
238
+
239
+ ### 2.3.1 Three Flashes (Level A)
240
+
241
+ - [ ] No content flashes more than 3 times/second
242
+ - [ ] Flashing area is small (<25% viewport)
243
+
244
+ ## 2.4 Navigable
245
+
246
+ ### 2.4.1 Bypass Blocks (Level A)
247
+
248
+ - [ ] Skip to main content link present
249
+ - [ ] Landmark regions defined
250
+ - [ ] Proper heading structure
251
+
252
+ ```html
253
+ <a href="#main" class="skip-link">Skip to main content</a>
254
+ <main id="main">...</main>
255
+ ```
256
+
257
+ ### 2.4.2 Page Titled (Level A)
258
+
259
+ - [ ] Unique, descriptive page titles
260
+ - [ ] Title reflects page content
261
+
262
+ ### 2.4.3 Focus Order (Level A)
263
+
264
+ - [ ] Focus order matches visual order
265
+ - [ ] tabindex used correctly
266
+
267
+ ### 2.4.4 Link Purpose (In Context) (Level A)
268
+
269
+ - [ ] Links make sense out of context
270
+ - [ ] No "click here" or "read more" alone
271
+
272
+ ```html
273
+ <!-- Bad -->
274
+ <a href="report.pdf">Click here</a>
275
+
276
+ <!-- Good -->
277
+ <a href="report.pdf">Download Q4 Sales Report (PDF)</a>
278
+ ```
279
+
280
+ ### 2.4.6 Headings and Labels (Level AA)
281
+
282
+ - [ ] Headings describe content
283
+ - [ ] Labels describe purpose
284
+
285
+ ### 2.4.7 Focus Visible (Level AA)
286
+
287
+ - [ ] Focus indicator visible on all elements
288
+ - [ ] Custom focus styles meet contrast
289
+
290
+ ```css
291
+ :focus {
292
+ outline: 3px solid #005fcc;
293
+ outline-offset: 2px;
294
+ }
295
+ ```
296
+
297
+ ### 2.4.11 Focus Not Obscured (Level AA) - WCAG 2.2
298
+
299
+ - [ ] Focused element not fully hidden
300
+ - [ ] Sticky headers don't obscure focus
301
+
302
+ ````
303
+
304
+ ### Understandable (Principle 3)
305
+
306
+ ```markdown
307
+ ## 3.1 Readable
308
+
309
+ ### 3.1.1 Language of Page (Level A)
310
+ - [ ] HTML lang attribute set
311
+ - [ ] Language correct for content
312
+
313
+ ```html
314
+ <html lang="en">
315
+ ````
316
+
317
+ ### 3.1.2 Language of Parts (Level AA)
318
+
319
+ - [ ] Language changes marked
320
+
321
+ ```html
322
+ <p>The French word <span lang="fr">bonjour</span> means hello.</p>
323
+ ```
324
+
325
+ ## 3.2 Predictable
326
+
327
+ ### 3.2.1 On Focus (Level A)
328
+
329
+ - [ ] No context change on focus alone
330
+ - [ ] No unexpected popups on focus
331
+
332
+ ### 3.2.2 On Input (Level A)
333
+
334
+ - [ ] No automatic form submission
335
+ - [ ] User warned before context change
336
+
337
+ ### 3.2.3 Consistent Navigation (Level AA)
338
+
339
+ - [ ] Navigation consistent across pages
340
+ - [ ] Repeated components same order
341
+
342
+ ### 3.2.4 Consistent Identification (Level AA)
343
+
344
+ - [ ] Same functionality = same label
345
+ - [ ] Icons used consistently
346
+
347
+ ## 3.3 Input Assistance
348
+
349
+ ### 3.3.1 Error Identification (Level A)
350
+
351
+ - [ ] Errors clearly identified
352
+ - [ ] Error message describes problem
353
+ - [ ] Error linked to field
354
+
355
+ ```html
356
+ <input aria-describedby="email-error" aria-invalid="true" />
357
+ <span id="email-error" role="alert">Please enter valid email</span>
358
+ ```
359
+
360
+ ### 3.3.2 Labels or Instructions (Level A)
361
+
362
+ - [ ] All inputs have visible labels
363
+ - [ ] Required fields indicated
364
+ - [ ] Format hints provided
365
+
366
+ ### 3.3.3 Error Suggestion (Level AA)
367
+
368
+ - [ ] Errors include correction suggestion
369
+ - [ ] Suggestions are specific
370
+
371
+ ### 3.3.4 Error Prevention (Level AA)
372
+
373
+ - [ ] Legal/financial forms reversible
374
+ - [ ] Data checked before submission
375
+ - [ ] User can review before submit
376
+
377
+ ````
378
+
379
+ ### Robust (Principle 4)
380
+
381
+ ```markdown
382
+ ## 4.1 Compatible
383
+
384
+ ### 4.1.1 Parsing (Level A) - Obsolete in WCAG 2.2
385
+ - [ ] Valid HTML (good practice)
386
+ - [ ] No duplicate IDs
387
+ - [ ] Complete start/end tags
388
+
389
+ ### 4.1.2 Name, Role, Value (Level A)
390
+ - [ ] Custom widgets have accessible names
391
+ - [ ] ARIA roles correct
392
+ - [ ] State changes announced
393
+
394
+ ```html
395
+ <!-- Accessible custom checkbox -->
396
+ <div role="checkbox"
397
+ aria-checked="false"
398
+ tabindex="0"
399
+ aria-labelledby="label">
400
+ </div>
401
+ <span id="label">Accept terms</span>
402
+ ````
403
+
404
+ ### 4.1.3 Status Messages (Level AA)
405
+
406
+ - [ ] Status updates announced
407
+ - [ ] Live regions used correctly
408
+
409
+ ```html
410
+ <div role="status" aria-live="polite">3 items added to cart</div>
411
+
412
+ <div role="alert" aria-live="assertive">Error: Form submission failed</div>
413
+ ```
414
+
415
+ ````
416
+
417
+ ## Automated Testing
418
+
419
+ ```javascript
420
+ // axe-core integration
421
+ const axe = require('axe-core');
422
+
423
+ async function runAccessibilityAudit(page) {
424
+ await page.addScriptTag({ path: require.resolve('axe-core') });
425
+
426
+ const results = await page.evaluate(async () => {
427
+ return await axe.run(document, {
428
+ runOnly: {
429
+ type: 'tag',
430
+ values: ['wcag2a', 'wcag2aa', 'wcag21aa', 'wcag22aa']
431
+ }
432
+ });
433
+ });
434
+
435
+ return {
436
+ violations: results.violations,
437
+ passes: results.passes,
438
+ incomplete: results.incomplete
439
+ };
440
+ }
441
+
442
+ // Playwright test example
443
+ test('should have no accessibility violations', async ({ page }) => {
444
+ await page.goto('/');
445
+ const results = await runAccessibilityAudit(page);
446
+
447
+ expect(results.violations).toHaveLength(0);
448
+ });
449
+ ```
450
+
451
+ ```bash
452
+ # CLI tools
453
+ npx @axe-core/cli https://example.com
454
+ npx pa11y https://example.com
455
+ lighthouse https://example.com --only-categories=accessibility
456
+ ```
457
+
458
+ ## Remediation Patterns
459
+
460
+ ### Fix: Missing Form Labels
461
+
462
+ ```html
463
+ <!-- Before -->
464
+ <input type="email" placeholder="Email" />
465
+
466
+ <!-- After: Option 1 - Visible label -->
467
+ <label for="email">Email address</label>
468
+ <input id="email" type="email" />
469
+
470
+ <!-- After: Option 2 - aria-label -->
471
+ <input type="email" aria-label="Email address" />
472
+
473
+ <!-- After: Option 3 - aria-labelledby -->
474
+ <span id="email-label">Email</span>
475
+ <input type="email" aria-labelledby="email-label" />
476
+ ```
477
+
478
+ ### Fix: Insufficient Color Contrast
479
+
480
+ ```css
481
+ /* Before: 2.5:1 contrast */
482
+ .text {
483
+ color: #767676;
484
+ }
485
+
486
+ /* After: 4.5:1 contrast */
487
+ .text {
488
+ color: #595959;
489
+ }
490
+
491
+ /* Or add background */
492
+ .text {
493
+ color: #767676;
494
+ background: #000;
495
+ }
496
+ ```
497
+
498
+ ### Fix: Keyboard Navigation
499
+
500
+ ```javascript
501
+ // Make custom element keyboard accessible
502
+ class AccessibleDropdown extends HTMLElement {
503
+ connectedCallback() {
504
+ this.setAttribute("tabindex", "0");
505
+ this.setAttribute("role", "combobox");
506
+ this.setAttribute("aria-expanded", "false");
507
+
508
+ this.addEventListener("keydown", (e) => {
509
+ switch (e.key) {
510
+ case "Enter":
511
+ case " ":
512
+ this.toggle();
513
+ e.preventDefault();
514
+ break;
515
+ case "Escape":
516
+ this.close();
517
+ break;
518
+ case "ArrowDown":
519
+ this.focusNext();
520
+ e.preventDefault();
521
+ break;
522
+ case "ArrowUp":
523
+ this.focusPrevious();
524
+ e.preventDefault();
525
+ break;
526
+ }
527
+ });
528
+ }
529
+ }
530
+ ```
531
+
532
+ ## Best Practices
533
+
534
+ ### Do's
535
+
536
+ - **Start early** - Accessibility from design phase
537
+ - **Test with real users** - Disabled users provide best feedback
538
+ - **Automate what you can** - 30-50% issues detectable
539
+ - **Use semantic HTML** - Reduces ARIA needs
540
+ - **Document patterns** - Build accessible component library
541
+
542
+ ### Don'ts
543
+
544
+ - **Don't rely only on automated testing** - Manual testing required
545
+ - **Don't use ARIA as first solution** - Native HTML first
546
+ - **Don't hide focus outlines** - Keyboard users need them
547
+ - **Don't disable zoom** - Users need to resize
548
+ - **Don't use color alone** - Multiple indicators needed
549
+
550
+ ## Resources
551
+
552
+ - [WCAG 2.2 Guidelines](https://www.w3.org/TR/WCAG22/)
553
+ - [WebAIM](https://webaim.org/)
554
+ - [A11y Project Checklist](https://www.a11yproject.com/checklist/)
555
+ - [axe DevTools](https://www.deque.com/axe/)