picasso-skill 1.0.0 → 1.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.
- package/README.md +2 -1
- package/package.json +4 -3
- package/skills/picasso/references/accessibility.md +172 -0
- package/skills/picasso/references/design-system.md +14 -14
- package/skills/picasso/references/generative-art.md +626 -32
- package/skills/picasso/references/motion-and-animation.md +2 -2
- package/skills/picasso/references/react-patterns.md +193 -91
- package/skills/picasso/references/responsive-design.md +349 -15
- package/skills/picasso/references/sensory-design.md +294 -50
- package/SKILL.md +0 -202
- package/references/anti-patterns.md +0 -95
- package/references/color-and-contrast.md +0 -174
- package/references/component-patterns.md +0 -113
- package/references/design-system.md +0 -176
- package/references/generative-art.md +0 -54
- package/references/interaction-design.md +0 -162
- package/references/motion-and-animation.md +0 -260
- package/references/react-patterns.md +0 -216
- package/references/responsive-design.md +0 -118
- package/references/sensory-design.md +0 -125
- package/references/spatial-design.md +0 -176
- package/references/typography.md +0 -168
package/README.md
CHANGED
|
@@ -67,8 +67,9 @@ skills/picasso/
|
|
|
67
67
|
react-patterns.md # Server/client components, state, performance
|
|
68
68
|
anti-patterns.md # What NOT to do (the most important file)
|
|
69
69
|
design-system.md # DESIGN.md generation, theming, tokens
|
|
70
|
-
generative-art.md # Algorithmic art, p5.js, seeded randomness
|
|
70
|
+
generative-art.md # Algorithmic art, p5.js, SVG, canvas, seeded randomness
|
|
71
71
|
component-patterns.md # Standard naming, taxonomy, state matrix
|
|
72
|
+
accessibility.md # ARIA, keyboard nav, screen readers, WCAG 2.2
|
|
72
73
|
```
|
|
73
74
|
|
|
74
75
|
## Configurable Settings
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "picasso-skill",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "The ultimate AI design skill for producing distinctive, production-grade frontend interfaces",
|
|
5
5
|
"bin": {
|
|
6
6
|
"picasso-skill": "./bin/install.mjs"
|
|
@@ -26,11 +26,12 @@
|
|
|
26
26
|
"url": "https://github.com/viperrcrypto/picasso.git"
|
|
27
27
|
},
|
|
28
28
|
"homepage": "https://github.com/viperrcrypto/picasso",
|
|
29
|
+
"engines": {
|
|
30
|
+
"node": ">=16.7.0"
|
|
31
|
+
},
|
|
29
32
|
"files": [
|
|
30
33
|
"bin/",
|
|
31
34
|
"skills/",
|
|
32
|
-
"SKILL.md",
|
|
33
|
-
"references/",
|
|
34
35
|
"LICENSE"
|
|
35
36
|
]
|
|
36
37
|
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# Accessibility Reference
|
|
2
|
+
|
|
3
|
+
## Table of Contents
|
|
4
|
+
1. Semantic HTML
|
|
5
|
+
2. ARIA Patterns
|
|
6
|
+
3. Keyboard Navigation
|
|
7
|
+
4. Screen Reader Testing
|
|
8
|
+
5. Color and Contrast
|
|
9
|
+
6. Motion and Vestibular
|
|
10
|
+
7. Forms
|
|
11
|
+
8. Images and Media
|
|
12
|
+
9. Testing Tools
|
|
13
|
+
10. Common Mistakes
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 1. Semantic HTML
|
|
18
|
+
|
|
19
|
+
Use the correct HTML element for its purpose. A `<button>` is always better than a `<div onClick>`. Semantic elements provide free behavior: focus, activation, role announcement, and keyboard interaction.
|
|
20
|
+
|
|
21
|
+
### Landmark Regions
|
|
22
|
+
Every page needs landmarks (`<header>`, `<nav>`, `<main>`, `<aside>`, `<footer>`). Screen readers let users jump between them. Label multiples: `<nav aria-label="Primary">`.
|
|
23
|
+
|
|
24
|
+
### Document Outline
|
|
25
|
+
Heading levels (`h1`-`h6`) in order. Never skip levels. One `h1` per page.
|
|
26
|
+
|
|
27
|
+
### Element Selection
|
|
28
|
+
- Action: `<button>`. Navigation: `<a href>`. Lists: `<ul>`/`<ol>`. Data: `<table>` with `<th>`.
|
|
29
|
+
- Toggle: `<button aria-pressed>` or `<input type="checkbox">`. Expandable: `<details>`/`<summary>`.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 2. ARIA Patterns
|
|
34
|
+
|
|
35
|
+
Do not use ARIA if native HTML achieves the same result. ARIA adds semantics but not behavior.
|
|
36
|
+
|
|
37
|
+
### Common Widgets
|
|
38
|
+
**Tabs**: `role="tablist"` container with `role="tab"` buttons. Arrow keys move between tabs, Tab moves into `role="tabpanel"`. Manage `aria-selected` and `hidden`.
|
|
39
|
+
|
|
40
|
+
**Dialog**: `role="dialog"` with `aria-modal="true"` and `aria-labelledby` pointing to the heading. Trap focus, close on Escape.
|
|
41
|
+
|
|
42
|
+
### Live Regions
|
|
43
|
+
Inject content into these containers; do not add the role after content exists.
|
|
44
|
+
```html
|
|
45
|
+
<div aria-live="polite" aria-atomic="true">3 items in cart</div>
|
|
46
|
+
<div role="alert">Payment failed.</div> <!-- assertive, interrupts -->
|
|
47
|
+
<div role="status">File uploaded.</div> <!-- polite, waits -->
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## 3. Keyboard Navigation
|
|
53
|
+
|
|
54
|
+
### Focus Indicators
|
|
55
|
+
Never remove outlines without replacement. Use `:focus-visible` for keyboard-only rings:
|
|
56
|
+
```css
|
|
57
|
+
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Tab Order
|
|
61
|
+
DOM order determines tab order. Never use positive `tabindex`. Use `tabindex="-1"` for programmatic focus only.
|
|
62
|
+
|
|
63
|
+
### Roving Tabindex
|
|
64
|
+
For composite widgets (toolbars, tab lists), one item is in the tab order at a time. Arrow keys move focus. Set `tabindex="0"` on the active item, `tabindex="-1"` on siblings, and call `.focus()` on arrow key press.
|
|
65
|
+
|
|
66
|
+
### Focus Trapping for Modals
|
|
67
|
+
On open: focus first focusable element. Tab/Shift+Tab cycles within. Escape closes. On close: return focus to trigger. Use `inert` on background content to prevent interaction outside the modal.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 4. Screen Reader Testing
|
|
72
|
+
|
|
73
|
+
### VoiceOver (macOS)
|
|
74
|
+
Toggle: Cmd+F5. Navigate: VO (Ctrl+Option) + arrows. Rotor: VO+U. Test with Safari.
|
|
75
|
+
|
|
76
|
+
### NVDA (Windows)
|
|
77
|
+
Toggle: Ctrl+Alt+N. Elements list: NVDA+F7. Read all: NVDA+Down. Test with Firefox.
|
|
78
|
+
|
|
79
|
+
### Methodology
|
|
80
|
+
1. Navigate with SR only. Verify elements announce role, name, state.
|
|
81
|
+
2. Verify dynamic changes (toasts, errors) are announced via live regions.
|
|
82
|
+
3. Verify modals trap focus and announce title. Verify custom widget keyboard patterns.
|
|
83
|
+
|
|
84
|
+
### Gotchas
|
|
85
|
+
- `aria-hidden="true"` on a parent hides all children regardless of child attributes.
|
|
86
|
+
- Dynamic content is not announced unless in a live region or focus is moved to it.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## 5. Color and Contrast
|
|
91
|
+
|
|
92
|
+
### WCAG 2.2 Requirements
|
|
93
|
+
Normal text: 4.5:1 AA, 7:1 AAA. Large text (>=24px / >=18.66px bold): 3:1 AA, 4.5:1 AAA. UI components and focus indicators: 3:1 AA. APCA provides a more perceptually accurate model and is expected in WCAG 3.0.
|
|
94
|
+
|
|
95
|
+
### Color Blindness
|
|
96
|
+
8% of men have color vision deficiency. Never rely on color alone. Pair red/green with icons. Use patterns in charts alongside color. See `color-and-contrast.md` for deeper guidance.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 6. Motion and Vestibular
|
|
101
|
+
|
|
102
|
+
### prefers-reduced-motion
|
|
103
|
+
Remove translation, rotation, and scaling. Opacity fades remain acceptable.
|
|
104
|
+
```css
|
|
105
|
+
@media (prefers-reduced-motion: reduce) {
|
|
106
|
+
*, *::before, *::after {
|
|
107
|
+
animation-duration: 0.01ms !important;
|
|
108
|
+
transition-duration: 0.01ms !important;
|
|
109
|
+
scroll-behavior: auto !important;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### prefers-contrast
|
|
115
|
+
For `(prefers-contrast: more)`: bolder borders (2px+), higher text contrast, remove translucent/glass surfaces.
|
|
116
|
+
|
|
117
|
+
### What to Avoid
|
|
118
|
+
- Flashing faster than 3/second (WCAG 2.3.1), auto-playing large animations
|
|
119
|
+
- Parallax without reduced-motion fallback, infinite animations without pause
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## 7. Forms
|
|
124
|
+
|
|
125
|
+
Every input needs a programmatic `<label>`. Placeholders are not labels. Mark required fields with `required` and `aria-required="true"`.
|
|
126
|
+
|
|
127
|
+
For errors, use `aria-invalid="true"` and `aria-describedby` pointing to the error message:
|
|
128
|
+
```html
|
|
129
|
+
<input id="email" aria-invalid="true" aria-describedby="email-err" />
|
|
130
|
+
<p id="email-err" role="alert">Enter a valid email address.</p>
|
|
131
|
+
```
|
|
132
|
+
Validate on blur, not on keystroke. For multiple errors, move focus to an error summary with links to each invalid field.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## 8. Images and Media
|
|
137
|
+
|
|
138
|
+
### Alt Text
|
|
139
|
+
- **Informative**: Describe content and purpose. **Decorative**: `alt=""` (empty, not absent).
|
|
140
|
+
- **Functional** (in buttons/links): Describe the action, not the image. **Complex**: Short alt + `aria-describedby` or `<figcaption>`.
|
|
141
|
+
|
|
142
|
+
### Video and Audio
|
|
143
|
+
Captions for all video (WCAG 1.2.2). Audio descriptions for visual-only content (WCAG 1.2.5). Never auto-play audio. Media players must be keyboard-operable.
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## 9. Testing Tools
|
|
148
|
+
|
|
149
|
+
### Automated
|
|
150
|
+
- **axe-core**: Industry standard. Browser extension, CLI, or CI via `@axe-core/playwright`. Catches ~30-40% of issues.
|
|
151
|
+
- **Lighthouse**: Chrome DevTools, uses axe-core. **pa11y**: CLI for CI, supports WCAG 2.2 AA/AAA.
|
|
152
|
+
|
|
153
|
+
### Manual Checklist
|
|
154
|
+
1. Tab through entire page. Logical order, every control reachable.
|
|
155
|
+
2. Activate controls with Enter and Space.
|
|
156
|
+
3. Modals: focus trapped, Escape closes, focus returns.
|
|
157
|
+
4. 400% zoom: no horizontal scroll (WCAG 1.4.10).
|
|
158
|
+
5. Screen reader: correct roles, names, and states.
|
|
159
|
+
6. Images have appropriate alt text. Forms have labels and announced errors.
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## 10. Common Mistakes
|
|
164
|
+
|
|
165
|
+
- `<div>`/`<span>` for clickable elements instead of `<button>`/`<a>` (loses keyboard and semantics)
|
|
166
|
+
- `outline: none` without a visible replacement focus indicator
|
|
167
|
+
- Positive `tabindex` values (chaotic tab ordering)
|
|
168
|
+
- `aria-hidden="true"` on focusable elements (reachable but invisible to AT)
|
|
169
|
+
- `role="button"` on a `<div>` without `tabindex="0"` and Enter/Space handlers
|
|
170
|
+
- Missing `lang` attribute on `<html>` (screen readers guess language wrong)
|
|
171
|
+
- `aria-live` on a region updating every second (overwhelms SR users)
|
|
172
|
+
- Wrapping entire cards in `<a>` (SR reads all card text as the link name)
|
|
@@ -21,19 +21,19 @@ Warm or cold? Playful or serious? What existing products or aesthetics does it
|
|
|
21
21
|
reference?
|
|
22
22
|
|
|
23
23
|
## 2. Color Palette & Roles
|
|
24
|
-
| Token | Hex | Role |
|
|
25
|
-
|
|
26
|
-
| surface-primary | #fafaf9 | Page background |
|
|
27
|
-
| surface-secondary | #f5f5f4 | Card/section background |
|
|
28
|
-
| text-primary | #1c1917 | Headings and body text |
|
|
29
|
-
| text-secondary | #57534e | Supporting text, labels |
|
|
30
|
-
| accent | #dc2626 | CTAs, active states, links |
|
|
31
|
-
| accent-hover | #b91c1c | Hover state for accent |
|
|
32
|
-
| accent-subtle | #fef2f2 | Accent-tinted background |
|
|
33
|
-
| border | #e7e5e4 | Default borders |
|
|
34
|
-
| success | #16a34a | Success states |
|
|
35
|
-
| warning | #d97706 | Warning states |
|
|
36
|
-
| error | #dc2626 | Error states |
|
|
24
|
+
| Token | OKLCH | Hex (fallback) | Role |
|
|
25
|
+
|---|---|---|---|
|
|
26
|
+
| surface-primary | oklch(0.985 0.005 80) | #fafaf9 | Page background |
|
|
27
|
+
| surface-secondary | oklch(0.97 0.008 80) | #f5f5f4 | Card/section background |
|
|
28
|
+
| text-primary | oklch(0.15 0.02 60) | #1c1917 | Headings and body text |
|
|
29
|
+
| text-secondary | oklch(0.40 0.02 60) | #57534e | Supporting text, labels |
|
|
30
|
+
| accent | oklch(0.55 0.25 25) | #dc2626 | CTAs, active states, links |
|
|
31
|
+
| accent-hover | oklch(0.48 0.25 25) | #b91c1c | Hover state for accent |
|
|
32
|
+
| accent-subtle | oklch(0.97 0.02 25) | #fef2f2 | Accent-tinted background |
|
|
33
|
+
| border | oklch(0.91 0.01 80) | #e7e5e4 | Default borders |
|
|
34
|
+
| success | oklch(0.55 0.18 145) | #16a34a | Success states |
|
|
35
|
+
| warning | oklch(0.65 0.18 70) | #d97706 | Warning states |
|
|
36
|
+
| error | oklch(0.55 0.22 25) | #dc2626 | Error states |
|
|
37
37
|
|
|
38
38
|
## 3. Typography Rules
|
|
39
39
|
| Level | Font | Size | Weight | Line Height | Letter Spacing |
|
|
@@ -165,7 +165,7 @@ Cream background, serif headings, generous whitespace. Suited for content-heavy
|
|
|
165
165
|
White background, strict grid, no decoration. Suited for professional tools.
|
|
166
166
|
- Surface: oklch(0.99 0.002 0) to oklch(0.95 0.005 0)
|
|
167
167
|
- Accent: oklch(0.50 0.25 250) (blue)
|
|
168
|
-
- Font:
|
|
168
|
+
- Font: Outfit + DM Sans
|
|
169
169
|
- Radius: 0px
|
|
170
170
|
|
|
171
171
|
### Soft Pastel
|