@uselazuli/cli 0.0.0-stage → 1.0.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.
- package/CHANGELOG.md +120 -0
- package/LICENSE +21 -0
- package/README.md +202 -2
- package/agents/lazuli-design-reviewer.md +30 -0
- package/agents/lazuli-first-look.md +22 -0
- package/agents/lazuli-task-tester.md +25 -0
- package/bin/lazuli.mjs +747 -0
- package/package.json +11 -4
- package/rules/accessibility/HYPOTHESES.md +8 -0
- package/rules/accessibility/_area.yaml +7 -0
- package/rules/accessibility/operable.yaml +100 -0
- package/rules/accessibility/perceivable.yaml +153 -0
- package/rules/accessibility/robust.yaml +24 -0
- package/rules/accessibility/understandable.yaml +72 -0
- package/rules/color/HYPOTHESES.md +27 -0
- package/rules/color/_area.yaml +10 -0
- package/rules/color/adapt.yaml +183 -0
- package/rules/color/create.yaml +259 -0
- package/rules/color/review.yaml +215 -0
- package/rules/color/signal.yaml +196 -0
- package/rules/content/HYPOTHESES.md +19 -0
- package/rules/content/_area.yaml +8 -0
- package/rules/content/review.yaml +378 -0
- package/rules/content/voice.yaml +144 -0
- package/rules/content/writing.yaml +202 -0
- package/rules/data/HYPOTHESES.md +11 -0
- package/rules/data/_area.yaml +7 -0
- package/rules/data/charts.yaml +189 -0
- package/rules/data/dashboards.yaml +141 -0
- package/rules/data/review.yaml +159 -0
- package/rules/graphic/HYPOTHESES.md +18 -0
- package/rules/graphic/_area.yaml +8 -0
- package/rules/graphic/identity.yaml +141 -0
- package/rules/graphic/pieces.yaml +164 -0
- package/rules/graphic/review.yaml +271 -0
- package/rules/graphic/symbol.yaml +141 -0
- package/rules/motion/HYPOTHESES.md +19 -0
- package/rules/motion/_area.yaml +7 -0
- package/rules/motion/micro.yaml +143 -0
- package/rules/motion/review.yaml +347 -0
- package/rules/motion/transitions.yaml +169 -0
- package/rules/typography/HYPOTHESES.md +12 -0
- package/rules/typography/_area.yaml +8 -0
- package/rules/typography/adapt.yaml +45 -0
- package/rules/typography/create.yaml +126 -0
- package/rules/typography/review.yaml +127 -0
- package/rules/ui/HYPOTHESES.md +23 -0
- package/rules/ui/_area.yaml +9 -0
- package/rules/ui/compose.yaml +246 -0
- package/rules/ui/grid.yaml +75 -0
- package/rules/ui/review.yaml +400 -0
- package/rules/ui/states.yaml +257 -0
- package/rules/ux/HYPOTHESES.md +13 -0
- package/rules/ux/_area.yaml +8 -0
- package/rules/ux/flows.yaml +164 -0
- package/rules/ux/forms.yaml +142 -0
- package/rules/ux/review.yaml +186 -0
- package/skills/lazuli/SKILL.md +183 -0
- package/skills/lazuli/procedures/create.md +29 -0
- package/skills/lazuli/procedures/explain-decisions.md +22 -0
- package/skills/lazuli/procedures/improve.md +30 -0
- package/skills/lazuli/procedures/remember-this.md +41 -0
- package/skills/lazuli/procedures/review-design.md +36 -0
- package/skills/lazuli/procedures/show-options.md +33 -0
- package/skills/lazuli-accessibility-check/SKILL.md +68 -0
- package/skills/lazuli-color-context-and-culture/SKILL.md +53 -0
- package/skills/lazuli-color-context-and-culture/references/sectors.md +26 -0
- package/skills/lazuli-color-palette-by-intent/SKILL.md +54 -0
- package/skills/lazuli-color-palette-by-intent/references/intent-chords.md +51 -0
- package/skills/lazuli-color-screen-review/SKILL.md +51 -0
- package/skills/lazuli-color-states-and-signals/SKILL.md +53 -0
- package/skills/lazuli-content-interface-writing/SKILL.md +53 -0
- package/skills/lazuli-content-voice/SKILL.md +40 -0
- package/skills/lazuli-data-charts-and-dashboards/SKILL.md +59 -0
- package/skills/lazuli-graphic-derived-pieces/SKILL.md +40 -0
- package/skills/lazuli-graphic-derived-pieces/references/piece-template.html +24 -0
- package/skills/lazuli-graphic-identity/SKILL.md +45 -0
- package/skills/lazuli-motion-micro-and-transitions/SKILL.md +49 -0
- package/skills/lazuli-typography-choose-and-pair/SKILL.md +50 -0
- package/skills/lazuli-typography-screen-review/SKILL.md +51 -0
- package/skills/lazuli-ui-composition/SKILL.md +42 -0
- package/skills/lazuli-ui-composition/references/option-template.html +34 -0
- package/skills/lazuli-ui-layout-review/SKILL.md +47 -0
- package/skills/lazuli-ui-states-and-system/SKILL.md +54 -0
- package/skills/lazuli-ux-flows-and-forms/SKILL.md +51 -0
- package/skills/lazuli-ux-task-test/SKILL.md +44 -0
- package/src/browser.mjs +162 -0
- package/src/commands/capture.mjs +313 -0
- package/src/commands/catalog.mjs +37 -0
- package/src/commands/check-design.mjs +463 -0
- package/src/commands/check-goals.mjs +57 -0
- package/src/commands/compare-designs.mjs +160 -0
- package/src/commands/draft-memo.mjs +162 -0
- package/src/commands/hooks.mjs +345 -0
- package/src/commands/install-hooks.mjs +120 -0
- package/src/commands/install.mjs +132 -0
- package/src/commands/list-rules.mjs +49 -0
- package/src/commands/map-page.mjs +594 -0
- package/src/commands/record-answers.mjs +79 -0
- package/src/commands/record-log.mjs +325 -0
- package/src/commands/record-task.mjs +250 -0
- package/src/commands/render-options.mjs +227 -0
- package/src/commands/start-project.mjs +32 -0
- package/src/measure/a11y.mjs +391 -0
- package/src/measure/asset.mjs +206 -0
- package/src/measure/at-rest.mjs +49 -0
- package/src/measure/cases.mjs +566 -0
- package/src/measure/chart-read.mjs +401 -0
- package/src/measure/chart.mjs +264 -0
- package/src/measure/coherence.mjs +145 -0
- package/src/measure/color.mjs +86 -0
- package/src/measure/content.mjs +82 -0
- package/src/measure/cvd.mjs +24 -0
- package/src/measure/extreme.mjs +241 -0
- package/src/measure/forms.mjs +150 -0
- package/src/measure/in-page/a11y.js +522 -0
- package/src/measure/in-page/color.js +348 -0
- package/src/measure/in-page/composition.js +1496 -0
- package/src/measure/in-page/contrast.js +15 -0
- package/src/measure/in-page/cvd.js +173 -0
- package/src/measure/in-page/extreme.js +377 -0
- package/src/measure/in-page/frames.js +781 -0
- package/src/measure/in-page/look.js +28 -0
- package/src/measure/in-page/motion-probe.js +171 -0
- package/src/measure/in-page/style.js +107 -0
- package/src/measure/in-page/svg-strokes.js +112 -0
- package/src/measure/in-page/svg-uses.js +50 -0
- package/src/measure/in-page/symbol.js +123 -0
- package/src/measure/in-page/type.js +269 -0
- package/src/measure/in-page/weight.js +207 -0
- package/src/measure/layout.mjs +100 -0
- package/src/measure/motion.mjs +509 -0
- package/src/measure/piece.mjs +195 -0
- package/src/measure/registry.mjs +253 -0
- package/src/measure/rhythm.mjs +81 -0
- package/src/measure/signature.mjs +65 -0
- package/src/measure/states.mjs +240 -0
- package/src/measure/style.mjs +13 -0
- package/src/measure/symbol.mjs +268 -0
- package/src/measure/terms.mjs +153 -0
- package/src/measure/tiles.mjs +20 -0
- package/src/measure/timeline.mjs +621 -0
- package/src/measure/type.mjs +167 -0
- package/src/measure/weight.mjs +18 -0
- package/src/private-strings.mjs +81 -0
- package/src/project/blind.mjs +70 -0
- package/src/project/edits.mjs +154 -0
- package/src/project/gate.mjs +168 -0
- package/src/project/lazuli-md.mjs +521 -0
- package/src/project/log.mjs +335 -0
- package/src/project/match.mjs +200 -0
- package/src/project/records.mjs +380 -0
- package/src/project/tasks.mjs +153 -0
- package/src/report/evaluate.mjs +27 -0
- package/src/report/evaluators/a11y.mjs +227 -0
- package/src/report/evaluators/chart.mjs +151 -0
- package/src/report/evaluators/coherence.mjs +103 -0
- package/src/report/evaluators/color.mjs +133 -0
- package/src/report/evaluators/content.mjs +112 -0
- package/src/report/evaluators/extreme.mjs +87 -0
- package/src/report/evaluators/forms.mjs +116 -0
- package/src/report/evaluators/layout.mjs +103 -0
- package/src/report/evaluators/motion.mjs +280 -0
- package/src/report/evaluators/piece.mjs +69 -0
- package/src/report/evaluators/rhythm.mjs +99 -0
- package/src/report/evaluators/states.mjs +39 -0
- package/src/report/evaluators/style.mjs +35 -0
- package/src/report/evaluators/symbol.mjs +110 -0
- package/src/report/evaluators/terms.mjs +49 -0
- package/src/report/evaluators/type.mjs +166 -0
- package/src/report/evaluators/weight.mjs +51 -0
- package/src/report/evidence.mjs +4 -0
- package/src/report/finding.mjs +11 -0
- package/src/report/format.mjs +215 -0
- package/src/rules/hypotheses.mjs +28 -0
- package/src/rules/load.mjs +274 -0
- package/src/rules/public-text.mjs +56 -0
- package/src/rules/schema.mjs +220 -0
- package/templates/LAZULI.md +88 -0
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
- id: ES1
|
|
2
|
+
name: Follow the signal color convention
|
|
3
|
+
area: color
|
|
4
|
+
moment: signal
|
|
5
|
+
skill: lazuli-color-states-and-signals
|
|
6
|
+
rule: >-
|
|
7
|
+
Follow the signal convention. Error and destructive action are red. Warning is yellow or amber. Success is green. Information is blue or neutral. Prohibition is red with a circular shape, and danger is a yellow triangle with dark. Do not reinvent them (error in purple, success in blue) without a strong reason.
|
|
8
|
+
why: >-
|
|
9
|
+
Red for stop, prohibition and error, yellow with black for caution and danger, orange for a very visible alert, and green for cleared and ok are international conventions precisely because they were standardized.
|
|
10
|
+
origin: source
|
|
11
|
+
source: >-
|
|
12
|
+
Heller, Psychology of Color, ch. Red s.12 and s.16; ch. Yellow s.9; ch. Green s.21; ch. Orange s.7
|
|
13
|
+
when_to_break: >-
|
|
14
|
+
The brand is red or green and the state color collides (see ES6), or a financial market where the local up and down convention differs. The source records red for loss and black for profit in German accounting. Investment apps in Brazil tend to use green for up and red for down (a market hypothesis, to check in a competing product).
|
|
15
|
+
break_effect: >-
|
|
16
|
+
The viewer has to stop and decode an unfamiliar signal, so the state feels slower to read and easier to misjudge.
|
|
17
|
+
test: >-
|
|
18
|
+
A table of states with color, icon and text. Each color matches the convention or has a written, justified deviation.
|
|
19
|
+
example: >-
|
|
20
|
+
A red "Delete account" button, confirmed in a modal.
|
|
21
|
+
counterexample: >-
|
|
22
|
+
"Saved successfully" in red because red is the brand color.
|
|
23
|
+
|
|
24
|
+
- id: ES2
|
|
25
|
+
name: Never rely on color alone
|
|
26
|
+
area: color
|
|
27
|
+
moment: signal
|
|
28
|
+
skill: lazuli-color-states-and-signals
|
|
29
|
+
rule: >-
|
|
30
|
+
Never rely on color alone. Every state has at least two channels: color plus icon, color plus text, or color plus position. A field with an error gets a colored border, an icon and a written message. A table status is a badge with a word, not only a colored dot.
|
|
31
|
+
why: >-
|
|
32
|
+
When color is critical the information must also arrive through another channel. The traffic light solves this with a fixed position and a pictogram.
|
|
33
|
+
origin: norm
|
|
34
|
+
source: >-
|
|
35
|
+
WCAG 2.2, success criterion 1.4.1; Heller, Psychology of Color, ch. Red s.12 (fixed position in the traffic light, pictograms on the pedestrian signal); ch. Gray s.7 (color blindness)
|
|
36
|
+
when_to_break: >-
|
|
37
|
+
Not broken for critical states. For redundant decoration (a colored bar on a card that already has a title), it can be.
|
|
38
|
+
break_effect: >-
|
|
39
|
+
The viewer gets a quiet, minimal cue where nothing depends on it, which feels clean as long as no state is hidden by it.
|
|
40
|
+
test: >-
|
|
41
|
+
Take a grayscale render. Every state is still identifiable without color. Fail if two states look the same.
|
|
42
|
+
example: >-
|
|
43
|
+
"Payment declined" with an x icon and a light red background.
|
|
44
|
+
counterexample: >-
|
|
45
|
+
A table row that only turns red when overdue.
|
|
46
|
+
|
|
47
|
+
- id: ES3
|
|
48
|
+
name: Success and error differ in lightness
|
|
49
|
+
area: color
|
|
50
|
+
moment: signal
|
|
51
|
+
skill: lazuli-color-states-and-signals
|
|
52
|
+
rule: >-
|
|
53
|
+
Make the success green and the error red clearly different in lightness (for example, error much darker than success), on top of the icon (ES2). In charts with two poles, prefer blue against orange over green against red.
|
|
54
|
+
why: >-
|
|
55
|
+
The common form of color blindness confuses red and green, which can turn into the same brownish tone. People with it rely on prior knowledge and on lightness.
|
|
56
|
+
origin: source
|
|
57
|
+
source: >-
|
|
58
|
+
Heller, Psychology of Color, ch. Gray s.7 (the red and green confusion, and the way a color-blind person compensates with prior knowledge and does not recognize an unexpected color). Blue against orange in charts is our own hypothesis.
|
|
59
|
+
when_to_break: >-
|
|
60
|
+
Not broken when the two states appear side by side.
|
|
61
|
+
break_effect: >-
|
|
62
|
+
The viewer who cannot tell red from green is forced to read the text, so the state loses speed for them and the icon becomes mandatory.
|
|
63
|
+
test: >-
|
|
64
|
+
Simulate deuteranopia and protanopia (browser DevTools, Rendering, Emulate vision deficiencies) and view the render in grayscale. Do success and error stay distinguishable without reading the icon? If not, fail, and the icon stops being optional even after fixing the lightness.
|
|
65
|
+
example: >-
|
|
66
|
+
Success #1A7F3C and error #7F1D1D (error much darker) with distinct icons.
|
|
67
|
+
counterexample: >-
|
|
68
|
+
Success #1E7B3C and error #B42318 with almost equal lightness and no icon; or dots #15803D (ok), #B45309 (pending) and #DC2626 (error) that turn into the same gray; or #22C55E and #EF4444 with no label.
|
|
69
|
+
|
|
70
|
+
- id: ES4
|
|
71
|
+
name: A signal must stand out from its surroundings
|
|
72
|
+
area: color
|
|
73
|
+
moment: signal
|
|
74
|
+
skill: lazuli-color-states-and-signals
|
|
75
|
+
rule: >-
|
|
76
|
+
A signal must contrast with its surroundings, not merely be a strong color. If the interface is already very colorful or the brand uses the state color, give the state another reinforcement (shape, border, position, discreet movement). Before choosing the alert tone, look at the palette around it.
|
|
77
|
+
why: >-
|
|
78
|
+
The red of a traffic light was chosen because it is rare in the landscape. Blue is lost in the sky and yellow is confused with street light.
|
|
79
|
+
origin: source
|
|
80
|
+
source: >-
|
|
81
|
+
Heller, Psychology of Color, ch. Red s.12 (traffic light colors chosen for contrast with the environment); ch. Yellow s.8 (first rule of signage: contrast with the surroundings)
|
|
82
|
+
status: hypothesis
|
|
83
|
+
hypothesis: H9
|
|
84
|
+
when_to_break: >-
|
|
85
|
+
It is not broken; the reinforcement is adjusted.
|
|
86
|
+
break_effect: >-
|
|
87
|
+
The viewer finds the alert blending into its surroundings, so it feels easy to miss and the state loses its urgency.
|
|
88
|
+
test: >-
|
|
89
|
+
Blur the render until the text cannot be read. The error or alert state is still the most salient point of its area. Fail if a neighboring decorative element has equal or greater salience.
|
|
90
|
+
example: >-
|
|
91
|
+
In an orange brand app, a warning with an icon and a thick border, not only an orange background.
|
|
92
|
+
counterexample: >-
|
|
93
|
+
A red error on a page with a red promotional banner right above it.
|
|
94
|
+
|
|
95
|
+
- id: ES5
|
|
96
|
+
name: Warnings are a yellow background with dark text
|
|
97
|
+
area: color
|
|
98
|
+
moment: signal
|
|
99
|
+
skill: lazuli-color-states-and-signals
|
|
100
|
+
rule: >-
|
|
101
|
+
Yellow is the background and dark is the text. A yellow or amber warning is always a light background or an icon, with dark text (very dark brown or near black). Never yellow or light orange text on white. For a high-impact alert (maintenance, physical risk), black on saturated yellow.
|
|
102
|
+
why: >-
|
|
103
|
+
Black on yellow is the most legible combination at a distance. Use a light background with dark text, never the reverse, and combine chromatic color with white or black.
|
|
104
|
+
origin: norm
|
|
105
|
+
source: >-
|
|
106
|
+
WCAG 2.2, success criterion 1.4.3; Heller, Psychology of Color, ch. Yellow s.8 (signage rules: maximum contrast, light in the background and dark in the letter, chromatic colors with white or black) and s.9
|
|
107
|
+
measure: color.contrast
|
|
108
|
+
threshold:
|
|
109
|
+
normal: 4.5
|
|
110
|
+
large: 3
|
|
111
|
+
minHue: 40
|
|
112
|
+
maxHue: 70
|
|
113
|
+
minSaturation: 40
|
|
114
|
+
roles: [alert, status]
|
|
115
|
+
marks: [warn, warning, alert, caution, aviso, atencao, cuidado]
|
|
116
|
+
hypothesis: H21
|
|
117
|
+
hypothesis_keys: [minHue, maxHue, minSaturation, marks]
|
|
118
|
+
when_to_break: >-
|
|
119
|
+
In dark mode, yellow may be the color of short text on a dark background, as long as it passes 4.5:1.
|
|
120
|
+
break_effect: >-
|
|
121
|
+
The viewer feels a glowing highlight against the dark, which draws the eye to a short piece of text and reads as modern and urgent.
|
|
122
|
+
test: >-
|
|
123
|
+
The contrast measurer shows no WCAG failures in the warning components. Also fail if any yellow or light orange text sits on a white or light background, even when it passes by a small margin. check-design applies this rule only to text whose color is yellow or amber (the yellow text band of hypothesis H21: HSL hue 40 to 70 degrees with saturation above 40%, a candidate value, not a norm) and that is marked or worded as a warning: the text or an ancestor up to its nearest section, article, aside or body has an ARIA role in the roles list, or a class or id containing a word of the marks list (our claim, hypothesis H21), or the text starts with a marks word followed by a colon. Yellow text that is not marked as a warning is judged by RV2 alone. When no such text is listed, ES5 is skipped, not passed. The light-background part is checked by eye.
|
|
124
|
+
example: >-
|
|
125
|
+
A #FFF4CC band with #5C4400 text and a triangle icon.
|
|
126
|
+
counterexample: >-
|
|
127
|
+
"Attention: password expires today" in #FACC15 on white.
|
|
128
|
+
|
|
129
|
+
- id: ES6
|
|
130
|
+
name: State colors are for states only
|
|
131
|
+
area: color
|
|
132
|
+
moment: signal
|
|
133
|
+
skill: lazuli-color-states-and-signals
|
|
134
|
+
rule: >-
|
|
135
|
+
Reserve the state tones (error, warning and success tokens) for states only. "New", "promo" and marketing badges use the brand color or their own accent, never the error red. If the brand is red, the error uses a visibly different red (darker) and always carries an icon.
|
|
136
|
+
why: >-
|
|
137
|
+
Signal colors lose force when they appear everywhere. Yellow became unpleasant by being the warning color, red is the first color to tire when overused, and the red and orange of excessive advertising came to be ignored.
|
|
138
|
+
origin: source
|
|
139
|
+
source: >-
|
|
140
|
+
Heller, Psychology of Color, ch. Yellow s.9; ch. Red s.1 and s.19; ch. Orange s.5
|
|
141
|
+
when_to_break: >-
|
|
142
|
+
Retail sales, where discount red is a price convention. Even so, keep it apart from the checkout error red.
|
|
143
|
+
break_effect: >-
|
|
144
|
+
The viewer reads red as price and excitement everywhere on the page, so an error loses its distinct, urgent meaning.
|
|
145
|
+
test: >-
|
|
146
|
+
Search the CSS and tokens for the error hex. Fail if it appears in a component that is not a state (badge, highlight, illustration). When the brand has the same hue as the error, put the brand button and the error message side by side in the render, in normal and grayscale. If they look like the same color, darken the error or shift its hue, and keep the icon on the error.
|
|
147
|
+
example: >-
|
|
148
|
+
A "New" badge in brand violet, with error in a reserved red.
|
|
149
|
+
counterexample: >-
|
|
150
|
+
A notification counter, a promotional price and a form error all in the same #EF4444.
|
|
151
|
+
|
|
152
|
+
- id: ES7
|
|
153
|
+
name: Severity runs yellow, orange, red
|
|
154
|
+
area: color
|
|
155
|
+
moment: signal
|
|
156
|
+
skill: lazuli-color-states-and-signals
|
|
157
|
+
rule: >-
|
|
158
|
+
For severity (low, medium, high, critical) use the yellow, orange, red progression, with decreasing lightness and growing icons. Do not use this ladder for categories without order (product types), which call for colors with no hierarchy.
|
|
159
|
+
why: >-
|
|
160
|
+
Yellow, orange and red form a ladder of intensity (light activity, agitation, peak), with orange as the road between the two.
|
|
161
|
+
origin: source
|
|
162
|
+
source: >-
|
|
163
|
+
Heller, Psychology of Color, ch. Orange s.9 (intensification from yellow to red); ch. Red s.4 (the energy chord). The monotonic test is our own hypothesis.
|
|
164
|
+
when_to_break: >-
|
|
165
|
+
A scale from good to bad with a positive pole: green to neutral to red, taking the care of ES3.
|
|
166
|
+
break_effect: >-
|
|
167
|
+
The viewer reads a good-to-bad scale instead of an alarm ladder, so the positive end feels reassuring rather than merely mild.
|
|
168
|
+
test: >-
|
|
169
|
+
Put the levels side by side in grayscale: they should form a monotonic sequence from light to dark. Fail if two neighboring levels look like the same gray.
|
|
170
|
+
example: >-
|
|
171
|
+
Risk low #FCD34D, medium #F59E0B, high #EA580C, critical #B91C1C.
|
|
172
|
+
counterexample: >-
|
|
173
|
+
Low risk in light red and critical in vivid orange.
|
|
174
|
+
|
|
175
|
+
- id: ES8
|
|
176
|
+
name: Few colors in a chart, one highlight
|
|
177
|
+
area: color
|
|
178
|
+
moment: signal
|
|
179
|
+
skill: lazuli-color-states-and-signals
|
|
180
|
+
rule: >-
|
|
181
|
+
Use few colors in a chart and one highlight. Secondary series go in neutral (gray with the palette undertone) and the series that tells the story in one strong color. For categories, use as few colors as possible with different lightness and a direct label on the line or bar where possible. If there are many categories, group them or highlight only the ones that matter. Sequential data uses one hue varying in lightness. Diverging data uses two opposite hues (blue against orange) with a neutral in the middle.
|
|
182
|
+
why: >-
|
|
183
|
+
Two chromatic colors together get in each other's way, worse at equal intensity, and up close too much color tires.
|
|
184
|
+
origin: source
|
|
185
|
+
source: >-
|
|
186
|
+
Heller, Psychology of Color, ch. Yellow s.8 (fourth signage rule, and the difference between seeing from far and from near). Sequential and diverging schemes are our own hypothesis, aligned with common data visualization practice.
|
|
187
|
+
when_to_break: >-
|
|
188
|
+
Maps and dashboards with many categories of equal importance. There use patterns, labels and interaction (a filter) instead of more colors.
|
|
189
|
+
break_effect: >-
|
|
190
|
+
The viewer must work to tell many equal categories apart, so the chart feels dense and exploratory rather than told as one story.
|
|
191
|
+
test: >-
|
|
192
|
+
View the chart in grayscale: is every series still distinguishable or directly labeled? Is the main series the one that stands out most? Fail if not.
|
|
193
|
+
example: >-
|
|
194
|
+
This year's revenue in strong blue, earlier years in light gray, a label at the end of each line.
|
|
195
|
+
counterexample: >-
|
|
196
|
+
Nine categories in a saturated rainbow with a legend underneath.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Content hypotheses to validate in the A/B
|
|
2
|
+
|
|
3
|
+
Numbers, phrase lists and definitions of labels, messages, terms and content cases that are not from a source or a norm yet. They stay in the rules only as hints (status hypothesis, never a verdict) and become firm only after the A/B shows they improve the result. A row with a cutoff starts with `Cutoff: <key> <value>.`, says how the value was picked before any real page was measured, and lists page readings under "Observed so far, not evidence".
|
|
4
|
+
|
|
5
|
+
Where a row or a rule cites the kit author's internal product plan, that plan is not public and what it says is our claim.
|
|
6
|
+
|
|
7
|
+
| ID | Principle | Candidate limit | How to validate in the A/B |
|
|
8
|
+
|---|---|---|---|
|
|
9
|
+
| H1 | CW1 and CR1 (a button or link says what happens when it is pressed) | Our claim, a hint only; no number is used as a cutoff. A button is listed when its whole name, normalized, is one of the phrases of CR1 that name no outcome. How it was picked: the phrase list is rule data, our claim, fixed before any page was read: words that name no outcome in English and Portuguese. Limits: a word that is generic in one product is specific in another ("Send" in a mail app names the outcome there); a name that holds a generic word next to an outcome is not listed; the meaning of a label is not judged. Observed so far, not evidence: labels.html at 1440 px (check-design with the stub rules, which carry the kit list): 3 of 10 buttons named only by a generic word ("Submit", "OK", "Enviar"); clean-labels.html, none of 3. | Needs labels outside the test fixtures that people from the audience call clear or unclear when read alone, checked against the list before it is applied; then compare a shorter and a longer list on how well each separates the two groups |
|
|
10
|
+
| H2 | CW3 and CR2 (labels lead with the meaning and stay short) | Cutoff: maxWords 5. How it was picked: a round starting value, our claim, set before any page was measured. Published guidance opened on 2026-11-26 is related reading and never moves it: GOV.UK Design System, Button, https://design-system.service.gov.uk/components/button/ (section "How it works") says you may need more or different words to describe the action; W3C, Understanding SC 2.4.6 Headings and Labels, https://www.w3.org/WAI/WCAG22/Understanding/headings-and-labels.html (section "Intent") says labels and headings do not need to be lengthy. Neither gives a number of words. What is counted: the words of a button's accessible name, as matches of WORD (a word keeps an inner hyphen, period or apostrophe, so "e-mail" is one word). Limits: Portuguese needs more words than English for the same label; a label is not judged by its meaning, so a short label that says nothing passes this check (CR1 reads that). Observed so far, not evidence: labels.html at 1440 px: 1 of 10 buttons over the cutoff, at 7 words (planted far from it); clean-labels.html, each of 3 within it. | Needs button labels outside the test fixtures that people from the audience scan quickly or slowly, checked against the word counts before the cutoff is applied; then compare neighboring cutoffs on how well each separates the two groups, in English and in Portuguese apart |
|
|
11
|
+
| H3 | CW5 and CR3 (one capitalization style for every control) | Our claim, a hint only; no number is used as a cutoff. How it was picked: no value to pick; how a style is read was fixed before any page was measured: a label's style comes from its rendered text after text-transform; the first word sets nothing apart, and a later word counts for the style only when it has CASE_WORD_LETTERS letters or more, so "of", "to", "a" and "de" are neutral; labels all in capitals are their own style. Limits: a proper noun in a sentence-case label reads as title case; brand names written in capitals read as an uppercase label; a label of one word has no style to read. Observed so far, not evidence: labels.html at 1440 px: 3 styles, sentence (3), title (3) and uppercase (1, by text-transform), with "Fale com a Maria" and "Terms of Service" read as title (the proper-noun limit); clean-labels.html, 3 buttons, all sentence. | Needs products outside the test fixtures with a declared style, checked label by label against the style read, before the reading is applied; the proper-noun misreads are counted apart |
|
|
12
|
+
| H4 | CW4 and CR4 (an error message says what went wrong, on which field, and how to fix it) | Our claim, a hint only; no number is used as a cutoff. A visible error message is listed when its normalized text is one of the generic-error phrases of CR4, when it is a code alone, or when it is tied to a field and does not name it. How it was picked: the phrase list is rule data, our claim, fixed before any page was read. What counts as naming the field: the message and the field's label share a folded word (lowercase, accents removed) of MIN_WORD_LETTERS letters or more. Limits: only messages shown on this render are read, since the CLI never submits a form; the fix part is read by the reviewer, not by the CLI; a message that names the field with a synonym is missed; text the composition walk does not keep (inside a clipping parent that is not its containing block, below an app shell's scroll area) is not read. Observed so far, not evidence: errors.html at 1440 px: 4 of 5 messages say too little ("Invalid" a generic phrase, "ERR_422" a code alone, the date message does not name its field, the alert "Something went wrong" a generic phrase); "Enter your full name" names its field; the hidden template and the sr-only error are not read; no-errors.html, no message and the staged-error note. | Needs error messages outside the test fixtures that people from the audience could or could not act on, checked against the list and the field-name match before they are applied |
|
|
13
|
+
| H5 | CW2 and CR5 (one destination, one name) | Our claim, a hint only; no number is used as a cutoff. A destination is listed when links to it in navigation regions (NAV_REGIONS) carry two names across the screens checked. How it was picked: no value to pick; what one destination is was fixed before any page was measured: names are compared as folded word sequences, and one name inside another is the same name ("Contact" and "Contact us"). Limits: navigation regions only; a destination reached through a redirect or a query is another destination; a link named only by an image or a label (a logo link) is not a name, but a logo written as text is, so a text wordmark and a "Home" link to one page read as two names; a closed drawer or a sheet moved off the page is not read; it runs only when check-design gets two or more screens. Observed so far, not evidence: terms-a.html and terms-b.html at 1440 px: 1 destination named two ways (pricing.html); terms-home-a.html and terms-home-b.html, 1 destination named two ways ("Contact" and "Get in touch" to the fragment #contact), while "Home" keeps one name; terms-pt-a.html and terms-pt-b.html, no destination linked more than once, so names were not compared. | Needs products outside the test fixtures whose owners say which pairs of names are one thing, checked against the pairs listed before the reading is applied |
|
|
14
|
+
| H6 | CW2 and CR6 (one term, one spelling) | Our claim, a hint only; no number is used as a cutoff. A term is listed when it is written two ways across the screens checked. How it was picked: no value to pick; the comparison was fixed before any page was measured: spellings are compared with separators (space, hyphen, period) removed and accents and apostrophes kept (a curly apostrophe reads as a straight one), so "E-mail" and "Email", "Log in" and "Login" are one term written two ways, while "você" and "voce", "it's" and "its" are not merged. Limits: "a gente" and "agente", "por que" and "porque", "se não" and "senão" read as one key; digits are not words, so "1.000" and "1000" never form a term; it runs only when check-design gets two or more screens. Observed so far, not evidence: terms-a.html and terms-b.html at 1440 px: 2 terms written two ways ("log in" and "login", "e-mail" and "email"); terms-pt-a.html and terms-pt-b.html, 1 ("bem-vindo" and "bem vindo"), with "1.000" and "1000" not listed; terms-apos-a.html and terms-apos-b.html, 1 ("e-mail" and "email"), with "it's" and "its" not listed. | Needs products outside the test fixtures whose owners mark which listed pairs are the same term, checked before the reading is applied; the accent and separator misreads are counted apart |
|
|
15
|
+
| H7 | CW7 and CR7 (text that grows does not break the layout) | Cutoff: growth 1.3. How it was picked: a round starting value, our claim, set before any page was measured, standing for Portuguese or another language taking more room than English (the kit author's internal product plan: Portuguese takes more room than English). Related reading, opened on 2026-11-26, never moves it, even where it gives larger factors for short strings: W3C Internationalization, Text size in translation, https://www.w3.org/International/articles/article-text-size.en gives a table of average expansion from English to European languages that is larger the shorter the source text. What is done: on a script-free copy of the page, every visible text node grows to at least 1.3 times its length with GROWTH_FILL words, and only the spills, cuts and overlaps the case adds over the untouched copy are reported. Limits: real translations grow unevenly, short labels most; the reverse direction, Portuguese to English, is not read; text the composition walk does not keep (a box under a clipping parent that is not its containing block, content below an app shell's scroll area) is not tested. Inline elements moved by position relative or negative margins inside one block are never compared for overlap (texts that share one block container never form a pair); text hidden from assistive technology (aria-hidden) is neither changed nor read; for overlap, each line box is clamped to its computed line-height, so texts of two blocks that touch only through tight leading are not reported; a visible layer behind the text can form overlap pairs when the text grows over it. Each element that breaks is one evidence line, marked when its box already crossed the left or right edge of the viewport at rest on a page that does not scroll sideways, and a declared UC1 makes the hint declared only when every such element bleeds at rest. A page whose html or body hides horizontal overflow does not scroll: there the case says how much further text runs past the clipped right edge, and names only texts newly past the right edge or further past it than at rest. Observed so far, not evidence: clean.html, fixed-card.html, overlap.html, many-cut.html, nowrap-nav.html, already-broken.html and tight-heading.html pass at 1440 and 390 px; split-words.html, split-words-flex.html (a heading of word boxes at line-height 0.9) and ghost.html (an aria-hidden ghost word) pass at 1440 px; list-clip.html passes at 1440 px and adds 1 text that spills out of its box at 390 px. Each width took from 1.2 to 2.0 s on these fixtures on this machine. | Needs translated versions of real pages, checked for breaks against what the growth case predicted before the factor is applied; then compare neighboring factors on how many real breaks each predicts |
|
|
16
|
+
| H8 | CW7 and CR8 (long Portuguese text breaks nothing) | Our claim, a hint only; no number is used as a cutoff. How it was picked: no value to pick; the three fixed samples were written before any page was measured: LONG_LABEL goes into labels (LABEL_SCOPE), LONG_HEADING into headings (HEADING_SCOPE), and LONG_TEXT, which holds one very long dictionary word, into the other text. Limits: inputs and placeholders are not filled; text drawn in images, canvas or SVG is not read; a closed drawer or a sheet moved off the page is not read; text the composition walk does not keep (a box under a clipping parent that is not its containing block, content below an app shell's scroll area) is not tested. Inline elements moved by position relative or negative margins inside one block are never compared for overlap (texts that share one block container never form a pair); text hidden from assistive technology (aria-hidden) is neither changed nor read; for overlap, each line box is clamped to its computed line-height, so texts of two blocks that touch only through tight leading are not reported; a visible layer behind the text can form overlap pairs when the text grows over it; absolutely positioned labels that receive long text overlap every neighbour they reach, and those pairs are true by definition; text in a fixed or sticky box can form pairs with the text that moves under it. Each element that breaks is one evidence line, marked when its box already crossed the left or right edge of the viewport at rest on a page that does not scroll sideways, and a declared UC1 makes the hint declared only when every such element bleeds at rest. A page whose html or body hides horizontal overflow does not scroll: there the case says how much further text runs past the clipped right edge, and names only texts newly past the right edge or further past it than at rest. Observed so far, not evidence: fixed-card.html at 1440 and 390 px: 1 text cut and 1 cut away entirely (the link); overlap.html, 1 text cut and 1 pair of texts overlapping; nowrap-nav.html, the page scrolls sideways by 585 px at 1440 and 1635 px at 390; already-broken.html, 2 pairs of texts overlapping that the case adds; tight-heading.html and clean.html pass; split-words.html, split-words-flex.html and ghost.html pass at 1440 px. | Needs real Portuguese content of the audience's products, checked for breaks against what the long-text case predicted before the samples are applied |
|
|
17
|
+
| H9 | CW8 and CR9 to CR11 (an empty list, one item and hundreds of items break nothing) | Our claim, a hint only; no number is used as a cutoff. How it was picked: no value to pick; how lists are found was fixed before any page was measured: LIST_SELECTOR plus repeated siblings, with lists inside navigation, menus, tab lists, selects and forms left out; MANY_ITEMS is the size of the hundreds case, not a cutoff. Limits: a list rendered by script shows no empty state in a script-free copy, so the app's own empty state is judged from a staged render; virtualized lists are not lists in the DOM; a carousel that already hides some items is not judged for cut items; a closed drawer or a sheet moved off the page is not read; a slow page may leave the list cases unchecked; text the composition walk does not keep (a box under a clipping parent that is not its containing block, content below an app shell's scroll area) is not tested. Inline elements moved by position relative or negative margins inside one block are never compared for overlap (texts that share one block container never form a pair); text hidden from assistive technology (aria-hidden) is neither changed nor read; for overlap, each line box is clamped to its computed line-height, so texts of two blocks that touch only through tight leading are not reported; a visible layer behind the text can form overlap pairs when the text grows over it; list items are block-level: a child whose computed display is inline, inline-block, inline-flex or inline-grid is never an item, so the inline word or letter spans of a heading are never a list (a flex or grid heading's word spans are blockified and can still be read as a list) and an inline chip row is not tested with many items. Observed so far, not evidence: clean.html at 1440 and 390 px: empty, one and many pass (1 list); list-clip.html at 1440 px: empty adds 1 pair of texts overlapping, one passes, many cuts away 2 texts (2 lists); many-cut.html, many cuts away 2 texts; nowrap-nav.html, many scrolls the page sideways by 14944 px (a nowrap row); split-words.html and split-letters.html (a heading of word or letter spans) find no list at 1440 px. | Needs real lists with no, one and many items from the audience's products, checked for breaks against what the cases predicted before the cases are applied |
|
|
18
|
+
| H10 | CV2 and CR12 (text only this product could have) | Our claim, judged in words; no number is used as a cutoff. How it was picked: no value to pick; the swap test was fixed in advance from the award line of the kit author's internal product plan: a fresh agent that did not write the copy replaces the product name with a competitor's in each headline and lead sentence and lists the ones that still hold; the CLI never says copy has a voice. Limits: an agent's sense of "generic" is not a person's; a competitor the agent does not know cannot be swapped in. Observed so far, not evidence: nothing measured; judged in words by the reviewer. | Needs headlines outside the test fixtures that people from the audience call generic or specific, checked against the agent's swap test lists before the test is relied on |
|
|
19
|
+
| H11 | CR14 (proof images keep the look of the original, a11y.image-treatment) | Our claim, judged in words after a measure picks the images; the list is our claim, not a cutoff. The filter functions read are grayscale, sepia, saturate, hue-rotate, invert, contrast, brightness and url (a url() filter points to an SVG filter that can recolor); drop-shadow and blur are not read, since they do not change the colors; a function at its identity value (grayscale(0), sepia(0), invert(0), saturate(1), contrast(1), brightness(1), hue-rotate(0deg)) leaves the colors as they are and is not counted. A blend counts when the image or an ancestor up to its nearest section, article or body has a mix-blend-mode other than normal. How it was picked: no value is picked from a page; the list was written before any page was read, from the functions of the CSS filter property that change color. Large means the AP6 size: visible img elements at least minSidePx on both sides. Limits: a treatment on a wrapper above the nearest section is not read; background images, svg, canvas and video are not read; a treatment applied by a script after load is read only if it is in place when the page is measured; whether an image is proof is not read, the reviewer says. Observed so far, not evidence: proof-duotone.html reads one portrait with grayscale, contrast and a multiply blend, and no treatment on an image with drop-shadow only, on a plain image, or under a filter set above its section; identity-filters.html reads no treatment on an image whose every function is at its identity value, sepia next to grayscale(0), and url on an SVG filter | Needs pages whose large images people sorted into proof and not proof, and pages where the same photo is shown with and without a treatment, to ask whether the treated version reads as staged; then compare the list with and without contrast and brightness, which only change tone |
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
area: content
|
|
2
|
+
title: Content
|
|
3
|
+
summary: "Interface text and voice: generic or long labels, error message parts, one term per thing across screens, and what breaks with longer, Portuguese, empty, single and hundreds of items."
|
|
4
|
+
order: 80
|
|
5
|
+
prefixes: [CW, CV, CR]
|
|
6
|
+
skills:
|
|
7
|
+
- lazuli-content-interface-writing
|
|
8
|
+
- lazuli-content-voice
|