@ericrisco/rsc 3.3.0 → 3.4.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 (56) hide show
  1. package/README.md +6 -3
  2. package/manifest.json +43 -22
  3. package/package.json +1 -1
  4. package/scripts/lib/default-skill-floor.js +5 -1
  5. package/scripts/lib/domains.js +2 -2
  6. package/scripts/lib/retired-skills.js +4 -0
  7. package/skills/design/SKILL.md +4 -3
  8. package/skills/design/evals/cases.yaml +2 -2
  9. package/skills/react/SKILL.md +2 -1
  10. package/skills/suggest/SKILL.md +12 -8
  11. package/skills/suggest/evals/cases.yaml +6 -0
  12. package/skills/ux/SKILL.md +149 -0
  13. package/skills/ux/THIRD_PARTY.md +32 -0
  14. package/skills/ux/evals/cases.yaml +40 -0
  15. package/skills/ux/references/flows.md +124 -0
  16. package/skills/ux/upstream/UPSTREAM.json +59 -0
  17. package/skills/ux/upstream/ux-designer/GUIDE.md +180 -0
  18. package/skills/ux/upstream/ux-designer/LICENSE +21 -0
  19. package/skills/ux/upstream/ux-designer/references/01-core-principles.md +251 -0
  20. package/skills/ux/upstream/ux-designer/references/02-laws-of-ux.md +330 -0
  21. package/skills/ux/upstream/ux-designer/references/03-accessibility.md +411 -0
  22. package/skills/ux/upstream/ux-designer/references/04-visual-design.md +433 -0
  23. package/skills/ux/upstream/ux-designer/references/05-information-architecture.md +432 -0
  24. package/skills/ux/upstream/ux-designer/references/06-interaction-design.md +495 -0
  25. package/skills/ux/upstream/ux-designer/references/07-forms-and-inputs.md +491 -0
  26. package/skills/ux/upstream/ux-designer/references/08-mobile-ux.md +539 -0
  27. package/skills/ux/upstream/ux-designer/references/09-ux-writing.md +493 -0
  28. package/skills/ux/upstream/ux-designer/references/10-user-research.md +533 -0
  29. package/skills/ux/upstream/ux-designer/references/11-design-systems.md +618 -0
  30. package/skills/ux/upstream/ux-designer/references/12a-presence-awareness.md +395 -0
  31. package/skills/ux/upstream/ux-designer/references/12b-conflict-resolution-sync.md +420 -0
  32. package/skills/ux/upstream/ux-designer/references/13a-canvas-navigation.md +388 -0
  33. package/skills/ux/upstream/ux-designer/references/13b-canvas-objects-performance.md +559 -0
  34. package/skills/ux/upstream/ux-designer/references/14-ai-ux-patterns.md +511 -0
  35. package/skills/ux/upstream/ux-designer/references/15-ethical-design.md +419 -0
  36. package/skills/ux/upstream/ux-designer/references/16-onboarding.md +430 -0
  37. package/skills/ux/upstream/ux-designer/references/17-notifications.md +461 -0
  38. package/skills/ux/upstream/ux-designer/references/18-data-visualization.md +453 -0
  39. package/skills/ux/upstream/ux-designer/references/19-search-ux.md +479 -0
  40. package/skills/ux/upstream/ux-designer/references/20-emotional-design.md +382 -0
  41. package/skills/ux/upstream/ux-designer/references/21-data-tables.md +629 -0
  42. package/skills/ux/upstream/ux-designer/references/22-performance-ux.md +626 -0
  43. package/skills/ux/upstream/ux-designer/references/23-internationalization.md +347 -0
  44. package/skills/ux/upstream/ux-designer/references/24-voice-and-multimodal.md +308 -0
  45. package/skills/ux/upstream/ux-designer/references/25a-barcode-camera-scanning.md +342 -0
  46. package/skills/ux/upstream/ux-designer/references/25b-barcode-scanner-workflows.md +412 -0
  47. package/skills/ux/upstream/ux-designer/references/25c-barcode-display.md +277 -0
  48. package/skills/ux/upstream/ux-usability-foundations/GUIDE.md +285 -0
  49. package/skills/ux/upstream/ux-usability-foundations/LICENSE +21 -0
  50. package/skills/ux/upstream/ux-usability-foundations/references/anti-patterns.md +267 -0
  51. package/skills/ux/upstream/ux-usability-foundations/references/checklists.md +130 -0
  52. package/skills/ux/upstream/ux-usability-foundations/references/decision-prompts.md +340 -0
  53. package/skills/ux/upstream/ux-usability-foundations/references/principle-cards.md +449 -0
  54. package/targets/clone-bootstrap.mjs +1 -1
  55. package/skills/ui-engineering/SKILL.md +0 -113
  56. package/skills/ui-engineering/evals/cases.yaml +0 -38
@@ -0,0 +1,411 @@
1
+ # Accessibility & WCAG 2.2
2
+
3
+ Accessibility ensures digital products are usable by people with disabilities. Beyond ethics and inclusion, it's increasingly a legal requirement.
4
+
5
+ ---
6
+
7
+ ## Contents
8
+
9
+ - WCAG 2.2 Overview
10
+ - New Success Criteria in WCAG 2.2
11
+ - Color and Contrast
12
+ - Keyboard Navigation
13
+ - Screen Reader Compatibility
14
+ - Forms Accessibility
15
+ - Motion and Animation
16
+ - Touch Accessibility
17
+ - Legal Requirements
18
+ - Testing Checklist
19
+ - Sources
20
+
21
+ ---
22
+
23
+ ## WCAG 2.2 Overview
24
+
25
+ **Web Content Accessibility Guidelines 2.2** is the latest W3C recommendation (October 2023, updated December 2024), now also an ISO standard (ISO/IEC 40500:2025).
26
+
27
+ **WCAG 3.0** is still a W3C Working Draft (latest: September 2026; Candidate Recommendation expected no earlier than late 2027). It replaces A/AA/AAA with outcome-based Bronze/Silver/Gold scoring. Do not target it for compliance — laws (EAA via EN 301 549, ADA case law, Section 508) reference WCAG 2.x. APCA contrast is likewise not normative; use WCAG 2.x contrast ratios for pass/fail and APCA only as an additional readability check.
28
+
29
+ ### Conformance Levels
30
+
31
+ | Level | Description | Requirement |
32
+ |-------|-------------|-------------|
33
+ | **A** | Minimum accessibility | Essential barriers removed |
34
+ | **AA** | Recommended standard | Most common target for compliance |
35
+ | **AAA** | Highest accessibility | Maximum inclusion (not always feasible) |
36
+
37
+ ### Four Principles (POUR)
38
+
39
+ 1. **Perceivable** - Information must be presentable in ways users can perceive
40
+ 2. **Operable** - Interface components must be operable
41
+ 3. **Understandable** - Information and operation must be understandable
42
+ 4. **Robust** - Content must be robust enough for various assistive technologies
43
+
44
+ ---
45
+
46
+ ## New Success Criteria in WCAG 2.2
47
+
48
+ ### Focus Not Obscured (Minimum) - 2.4.11 (AA)
49
+ When an element receives keyboard focus, it is not entirely hidden by other content.
50
+
51
+ ```css
52
+ /* Ensure focused elements aren't covered */
53
+ .modal {
54
+ /* Don't cover the element that triggered focus */
55
+ }
56
+
57
+ /* Sticky headers should not cover focused content */
58
+ .sticky-header {
59
+ /* Account for header height in scroll calculations */
60
+ }
61
+ ```
62
+
63
+ ### Focus Not Obscured (Enhanced) - 2.4.12 (AAA)
64
+ When focused, no part of the element is hidden by author-created content.
65
+
66
+ ### Focus Appearance - 2.4.13 (AAA)
67
+ Focus indicators must have sufficient size and contrast.
68
+
69
+ ### Dragging Movements - 2.5.7 (AA)
70
+ Functionality using dragging can be operated with a single pointer without dragging.
71
+
72
+ ```html
73
+ <!-- Provide alternative to drag-and-drop -->
74
+ <div draggable="true">Item</div>
75
+ <button>Move Up</button>
76
+ <button>Move Down</button>
77
+ ```
78
+
79
+ ### Target Size (Minimum) - 2.5.8 (AA)
80
+ Touch targets must be at least 24×24 CSS pixels, with exceptions for inline links, user agent controls, and essential presentations.
81
+
82
+ ### Accessible Authentication (Minimum) - 3.3.8 (AA)
83
+ Authentication processes don't require cognitive function tests (like remembering passwords) unless alternatives are provided.
84
+
85
+ ```
86
+ Compliant methods:
87
+ - Password managers (paste allowed)
88
+ - Email/SMS verification codes
89
+ - Biometric authentication
90
+ - OAuth/social login
91
+ ```
92
+
93
+ ### Accessible Authentication (Enhanced) - 3.3.9 (AAA)
94
+ No cognitive test required at all for authentication.
95
+
96
+ ### Redundant Entry - 3.3.7 (A)
97
+ Don't require users to re-enter information already provided in the same session.
98
+
99
+ ---
100
+
101
+ ## Color and Contrast
102
+
103
+ ### Contrast Requirements
104
+
105
+ | Content Type | Minimum Ratio (AA) | Enhanced (AAA) |
106
+ |--------------|-------------------|----------------|
107
+ | Normal text (< 18pt) | 4.5:1 | 7:1 |
108
+ | Large text (≥ 18pt or 14pt bold) | 3:1 | 4.5:1 |
109
+ | UI components & graphics | 3:1 | - |
110
+ | Focus indicators | 3:1 | - |
111
+
112
+ ### Testing Contrast
113
+ ```javascript
114
+ // Calculate contrast ratio
115
+ function getContrastRatio(l1, l2) {
116
+ const lighter = Math.max(l1, l2);
117
+ const darker = Math.min(l1, l2);
118
+ return (lighter + 0.05) / (darker + 0.05);
119
+ }
120
+ ```
121
+
122
+ **Tools:**
123
+ - WebAIM Contrast Checker
124
+ - Stark (Figma plugin)
125
+ - Chrome DevTools accessibility panel
126
+ - axe DevTools
127
+
128
+ ### Color Blindness
129
+ Approximately 8% of men and 0.5% of women have some form of color vision deficiency.
130
+
131
+ ```
132
+ Never rely on color alone to convey:
133
+ - Error states (add icons, text)
134
+ - Success/failure (add icons, patterns)
135
+ - Required fields (add asterisks)
136
+ - Link differentiation (add underline)
137
+ - Data visualization (add patterns, labels)
138
+ ```
139
+
140
+ ---
141
+
142
+ ## Keyboard Navigation
143
+
144
+ ### Requirements
145
+ All functionality must be accessible via keyboard.
146
+
147
+ ```html
148
+ <!-- Ensure logical tab order -->
149
+ <nav>
150
+ <a href="/">Home</a>
151
+ <a href="/about">About</a>
152
+ <a href="/contact">Contact</a>
153
+ </nav>
154
+
155
+ <!-- Use tabindex appropriately -->
156
+ <div tabindex="0" role="button">Custom Button</div>
157
+ <div tabindex="-1">Programmatically focusable only</div>
158
+ <!-- Never use tabindex > 0 -->
159
+ ```
160
+
161
+ ### Focus Management
162
+ ```css
163
+ /* Never hide focus outlines without replacement */
164
+ :focus {
165
+ outline: 2px solid #005fcc;
166
+ outline-offset: 2px;
167
+ }
168
+
169
+ /* For mouse users who don't need visible focus */
170
+ :focus:not(:focus-visible) {
171
+ outline: none;
172
+ }
173
+
174
+ :focus-visible {
175
+ outline: 2px solid #005fcc;
176
+ outline-offset: 2px;
177
+ }
178
+ ```
179
+
180
+ ### Keyboard Shortcuts
181
+ ```
182
+ Standard expectations:
183
+ - Tab: Move to next focusable element
184
+ - Shift+Tab: Move to previous element
185
+ - Enter/Space: Activate buttons
186
+ - Arrow keys: Navigate within widgets
187
+ - Escape: Close modals/popups
188
+ ```
189
+
190
+ ---
191
+
192
+ ## Screen Reader Compatibility
193
+
194
+ ### Semantic HTML
195
+ ```html
196
+ <!-- Use semantic elements -->
197
+ <header>...</header>
198
+ <nav>...</nav>
199
+ <main>...</main>
200
+ <article>...</article>
201
+ <aside>...</aside>
202
+ <footer>...</footer>
203
+
204
+ <!-- Not divs with roles -->
205
+ <div role="navigation">...</div> <!-- Less ideal -->
206
+ ```
207
+
208
+ ### ARIA (Accessible Rich Internet Applications)
209
+ ```html
210
+ <!-- Labels -->
211
+ <button aria-label="Close dialog">×</button>
212
+
213
+ <!-- Descriptions -->
214
+ <input aria-describedby="password-hint" />
215
+ <p id="password-hint">Must be at least 8 characters</p>
216
+
217
+ <!-- States -->
218
+ <button aria-expanded="false" aria-controls="menu">Menu</button>
219
+ <ul id="menu" aria-hidden="true">...</ul>
220
+
221
+ <!-- Live regions for dynamic content -->
222
+ <div aria-live="polite" aria-atomic="true">
223
+ <!-- Updates announced to screen readers -->
224
+ </div>
225
+ ```
226
+
227
+ ### Image Accessibility
228
+ ```html
229
+ <!-- Informative images -->
230
+ <img src="chart.png" alt="Sales increased 20% in Q4 2024" />
231
+
232
+ <!-- Decorative images -->
233
+ <img src="divider.png" alt="" role="presentation" />
234
+
235
+ <!-- Complex images -->
236
+ <figure>
237
+ <img src="diagram.png" alt="System architecture diagram" />
238
+ <figcaption>
239
+ Full description of the system architecture...
240
+ </figcaption>
241
+ </figure>
242
+ ```
243
+
244
+ ---
245
+
246
+ ## Forms Accessibility
247
+
248
+ ```html
249
+ <form>
250
+ <!-- Always associate labels -->
251
+ <label for="email">Email address</label>
252
+ <input type="email" id="email" name="email"
253
+ aria-required="true"
254
+ aria-describedby="email-error" />
255
+ <span id="email-error" role="alert">
256
+ Please enter a valid email address
257
+ </span>
258
+
259
+ <!-- Group related fields -->
260
+ <fieldset>
261
+ <legend>Shipping Address</legend>
262
+ <!-- Address fields -->
263
+ </fieldset>
264
+
265
+ <!-- Required field indication -->
266
+ <label for="name">
267
+ Name <span aria-hidden="true">*</span>
268
+ <span class="sr-only">(required)</span>
269
+ </label>
270
+ </form>
271
+ ```
272
+
273
+ ### Error Handling
274
+ ```html
275
+ <!-- Announce errors -->
276
+ <div role="alert" aria-live="assertive">
277
+ Please correct the following errors:
278
+ <ul>
279
+ <li><a href="#email">Email is required</a></li>
280
+ </ul>
281
+ </div>
282
+ ```
283
+
284
+ ---
285
+
286
+ ## Motion and Animation
287
+
288
+ ### Respecting User Preferences
289
+ ```css
290
+ /* Reduce motion for users who prefer it */
291
+ @media (prefers-reduced-motion: reduce) {
292
+ *,
293
+ *::before,
294
+ *::after {
295
+ animation-duration: 0.01ms !important;
296
+ animation-iteration-count: 1 !important;
297
+ transition-duration: 0.01ms !important;
298
+ }
299
+ }
300
+
301
+ /* Or provide opt-out */
302
+ .animation {
303
+ animation: slide-in 0.3s ease;
304
+ }
305
+
306
+ @media (prefers-reduced-motion: reduce) {
307
+ .animation {
308
+ animation: none;
309
+ }
310
+ }
311
+ ```
312
+
313
+ ### Auto-Playing Content
314
+ - Never auto-play video with sound
315
+ - Provide pause/stop controls for any auto-playing content
316
+ - Avoid flashing content (> 3 flashes per second can trigger seizures)
317
+
318
+ ---
319
+
320
+ ## Touch Accessibility
321
+
322
+ ### Target Sizes (WCAG 2.2)
323
+ ```css
324
+ /* Minimum 24×24px for WCAG 2.2 AA */
325
+ /* Recommended 44×44px for comfortable tapping */
326
+ .button {
327
+ min-width: 44px;
328
+ min-height: 44px;
329
+ padding: 12px 24px;
330
+ }
331
+
332
+ /* Adequate spacing between targets */
333
+ .button + .button {
334
+ margin-left: 8px;
335
+ }
336
+ ```
337
+
338
+ ### Touch Alternatives
339
+ ```html
340
+ <!-- Provide alternatives to complex gestures -->
341
+ <div class="carousel">
342
+ <button aria-label="Previous slide">←</button>
343
+ <!-- Content (also swipeable) -->
344
+ <button aria-label="Next slide">→</button>
345
+ </div>
346
+ ```
347
+
348
+ ---
349
+
350
+ ## Legal Requirements
351
+
352
+ Accessibility is now a hard legal obligation in major markets, not just a best
353
+ practice. The headline change is the European Accessibility Act.
354
+
355
+ ### European Accessibility Act (EAA)
356
+ - **In force since:** June 28, 2025 — enforcement is active now
357
+ - **Applies to:** A broad set of digital products and services sold in the EU —
358
+ e-commerce, banking, e-books, ticketing, transport, electronic communications,
359
+ and consumer hardware/OS. **Reach is extraterritorial:** non-EU businesses
360
+ (incl. US/UK companies) that sell to EU customers must comply.
361
+ - **Technical baseline:** **EN 301 549**, the harmonized EU standard, which
362
+ references **WCAG 2.1 Level AA** as its web/app floor (and adds requirements
363
+ beyond WCAG, e.g. for hardware and documentation).
364
+ - **Transition end:** June 28, 2030 — a limited grace window for certain
365
+ pre-existing service contracts and self-service terminals already in use.
366
+ - **Practical takeaway:** Targeting **WCAG 2.2 AA** (covered above) meets and
367
+ exceeds the EAA's WCAG 2.1 AA floor, so a WCAG 2.2 AA product is well-positioned
368
+ for compliance. Verify the EN 301 549 non-web clauses if you ship hardware,
369
+ documents, or support channels.
370
+
371
+ ### Other Regulations
372
+ - **US:** ADA (case law increasingly treats websites as places of public
373
+ accommodation), Section 508 (federal procurement, aligned to WCAG 2.0 AA)
374
+ - **EU:** Web Accessibility Directive (public-sector sites/apps, EN 301 549)
375
+ - **UK:** Equality Act 2010
376
+ - **Canada:** AODA, ACA
377
+ - **Australia:** DDA
378
+
379
+ ---
380
+
381
+ ## Testing Checklist
382
+
383
+ ### Automated Testing
384
+ - [ ] axe DevTools
385
+ - [ ] WAVE
386
+ - [ ] Lighthouse
387
+ - [ ] Pa11y
388
+
389
+ ### Manual Testing
390
+ - [ ] Keyboard-only navigation
391
+ - [ ] Screen reader testing (NVDA, VoiceOver, JAWS)
392
+ - [ ] 200% zoom level
393
+ - [ ] High contrast mode
394
+ - [ ] Reduced motion preference
395
+
396
+ ### User Testing
397
+ - [ ] Include users with disabilities
398
+ - [ ] Test with assistive technologies
399
+ - [ ] Gather feedback on pain points
400
+
401
+ ---
402
+
403
+ ## Sources
404
+
405
+ - [WCAG 2.2](https://www.w3.org/TR/WCAG22/)
406
+ - [WAI-ARIA 1.2](https://www.w3.org/TR/wai-aria-1.2/)
407
+ - [European Accessibility Act](https://ec.europa.eu/social/main.jsp?catId=1202) - EU directive 2019/882
408
+ - [EN 301 549](https://www.etsi.org/standards) - Harmonized EU accessibility standard
409
+ - [WebAIM](https://webaim.org/)
410
+ - [A11y Project](https://www.a11yproject.com/)
411
+ - [Deque University](https://dequeuniversity.com/)