@uselazuli/cli 0.0.0-stage → 1.0.1
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 +98 -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 +699 -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 +18 -0
- package/rules/content/_area.yaml +8 -0
- package/rules/content/review.yaml +347 -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 +17 -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 +242 -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 +219 -0
- package/rules/ui/grid.yaml +75 -0
- package/rules/ui/review.yaml +399 -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 +180 -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 +35 -0
- package/skills/lazuli/procedures/show-options.md +32 -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 +39 -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 +43 -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 +161 -0
- package/src/commands/capture.mjs +313 -0
- package/src/commands/catalog.mjs +37 -0
- package/src/commands/check-design.mjs +428 -0
- package/src/commands/check-goals.mjs +57 -0
- package/src/commands/compare-designs.mjs +97 -0
- package/src/commands/draft-memo.mjs +161 -0
- package/src/commands/hooks.mjs +343 -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 +296 -0
- package/src/commands/record-task.mjs +250 -0
- package/src/commands/render-options.mjs +164 -0
- package/src/commands/start-project.mjs +32 -0
- package/src/measure/a11y.mjs +383 -0
- package/src/measure/asset.mjs +206 -0
- package/src/measure/at-rest.mjs +49 -0
- package/src/measure/cases.mjs +549 -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 +79 -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 +489 -0
- package/src/measure/in-page/color.js +346 -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 +355 -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 +169 -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 +266 -0
- package/src/measure/in-page/weight.js +207 -0
- package/src/measure/layout.mjs +91 -0
- package/src/measure/motion.mjs +508 -0
- package/src/measure/piece.mjs +195 -0
- package/src/measure/registry.mjs +252 -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 +159 -0
- package/src/project/lazuli-md.mjs +497 -0
- package/src/project/log.mjs +329 -0
- package/src/project/match.mjs +112 -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 +206 -0
- package/src/report/evaluators/chart.mjs +151 -0
- package/src/report/evaluators/coherence.mjs +103 -0
- package/src/report/evaluators/color.mjs +86 -0
- package/src/report/evaluators/content.mjs +112 -0
- package/src/report/evaluators/extreme.mjs +53 -0
- package/src/report/evaluators/forms.mjs +116 -0
- package/src/report/evaluators/layout.mjs +94 -0
- package/src/report/evaluators/motion.mjs +273 -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 +163 -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 +256 -0
- package/src/rules/public-text.mjs +56 -0
- package/src/rules/schema.mjs +212 -0
- package/templates/LAZULI.md +86 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Voice. How the product speaks: its declared voice, the words it uses and avoids, the tone by moment, plain
|
|
2
|
+
# words for the audience, and copy only this product could have. These rules are for the moment the copy is
|
|
3
|
+
# written. Whether the copy has a voice, and whether it could belong to any company, is judged by the
|
|
4
|
+
# reviewer in words; the CLI never says copy has a voice.
|
|
5
|
+
|
|
6
|
+
- id: CV1
|
|
7
|
+
name: The voice is declared as three traits
|
|
8
|
+
area: content
|
|
9
|
+
moment: create
|
|
10
|
+
skill: lazuli-content-voice
|
|
11
|
+
rule: >-
|
|
12
|
+
Declare the voice in `## Voice` of LAZULI.md before writing copy: three traits, each written as "this, not that", each with a sample sentence in that voice. Every piece of copy is written and reviewed against those lines.
|
|
13
|
+
why: >-
|
|
14
|
+
A voice that is not written down drifts with each writer and each screen; a trait with its opposite and a sample can be checked, a single adjective cannot. (our claim)
|
|
15
|
+
origin: hypothesis
|
|
16
|
+
source: >-
|
|
17
|
+
Our claim: the three-trait form comes from the kit author's internal product plan. Related reading, not the source of the rule: Mailchimp Content Style Guide, Voice and Tone, https://styleguide.mailchimp.com/voice-and-tone/ (section "Voice", opened 2026-11-26) describes its voice in pairs such as smart but not snobbish.
|
|
18
|
+
when_to_break: >-
|
|
19
|
+
A product with no copy of its own (a tool whose every word is fixed by a platform), declared with break-a-rule first.
|
|
20
|
+
break_effect: >-
|
|
21
|
+
No voice to declare, since nothing is written in it.
|
|
22
|
+
test: >-
|
|
23
|
+
The reviewer reads `## Voice` and checks for three traits, each with its opposite and a sample sentence; a missing part is a finding.
|
|
24
|
+
example: >-
|
|
25
|
+
"Direct, not curt: 'Your order ships tomorrow.'"
|
|
26
|
+
counterexample: >-
|
|
27
|
+
"Friendly, innovative and professional." with no opposite and no sample.
|
|
28
|
+
|
|
29
|
+
- id: CV2
|
|
30
|
+
name: Text only this product could have
|
|
31
|
+
area: content
|
|
32
|
+
moment: create
|
|
33
|
+
skill: lazuli-content-voice
|
|
34
|
+
rule: >-
|
|
35
|
+
Write text only this product could have. Run the swap test on every headline and lead sentence: replace the product name with a competitor's; a sentence that still holds is rewritten around a fact only this product has (a place, a number it owns, a way of working, a person). How the test is run is the hypothesis H10 in `HYPOTHESES.md` of this area.
|
|
36
|
+
why: >-
|
|
37
|
+
Generic sentences that would serve any company are the default level of copy; text that only this product could say is what makes it recognizable. (our claim)
|
|
38
|
+
origin: hypothesis
|
|
39
|
+
status: hypothesis
|
|
40
|
+
hypothesis: H10
|
|
41
|
+
source: >-
|
|
42
|
+
Our claim: the test comes from the kit author's internal product plan (content row, award level: text only that product could have, with a recognizable voice; default level: generic sentences that would serve any company). No page opened on 2026-11-26 states it.
|
|
43
|
+
when_to_break: >-
|
|
44
|
+
A legal or regulatory sentence whose wording is fixed, declared with break-a-rule first.
|
|
45
|
+
break_effect: >-
|
|
46
|
+
The fixed wording stays exact, at the cost of a generic sentence where it sits.
|
|
47
|
+
test: >-
|
|
48
|
+
The reviewer runs the swap test: 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 (CR12). It is judged in words; the CLI never says copy has a voice.
|
|
49
|
+
example: >-
|
|
50
|
+
"We fit your glasses in the shop on Rua Diamantina while you wait, with the lab behind the counter."
|
|
51
|
+
counterexample: >-
|
|
52
|
+
"We offer innovative solutions with quality and commitment."
|
|
53
|
+
|
|
54
|
+
- id: CV3
|
|
55
|
+
name: Words to use and words to avoid
|
|
56
|
+
area: content
|
|
57
|
+
moment: create
|
|
58
|
+
skill: lazuli-content-voice
|
|
59
|
+
rule: >-
|
|
60
|
+
List the words the product always uses and the ones it avoids in `## Voice` of LAZULI.md, with the word to use in place of each avoided one, and take every screen's words from there. The names of things chosen for CW2 go on the same list.
|
|
61
|
+
why: >-
|
|
62
|
+
A shared list keeps the same idea in the same word across writers and screens, and keeps out the words the audience reads as cold, vague or foreign. (our claim)
|
|
63
|
+
origin: hypothesis
|
|
64
|
+
source: >-
|
|
65
|
+
Our claim: no page opened on 2026-11-26 sets this as a rule for a product. Related reading, not the source of the rule: GOV.UK, A to Z style guide, https://guidance.publishing.service.gov.uk/writing-to-gov-uk-standards/style-guides/a-to-z-style-guide/ (entry "Words to avoid", opened 2026-11-26) keeps such a list, each avoided word with the word to use instead.
|
|
66
|
+
when_to_break: >-
|
|
67
|
+
Never needed: a product that has no word to avoid writes an empty list and says so.
|
|
68
|
+
break_effect: >-
|
|
69
|
+
None to buy: the list costs nothing to keep.
|
|
70
|
+
test: >-
|
|
71
|
+
The reviewer reads the list in `## Voice` and searches the copy of every screen for the avoided words; each one found is a finding.
|
|
72
|
+
example: >-
|
|
73
|
+
"Use: appointment. Avoid: slot. Use: plan. Avoid: package."
|
|
74
|
+
counterexample: >-
|
|
75
|
+
The same booking called "appointment", "slot" and "session" on three screens, with no list behind it.
|
|
76
|
+
|
|
77
|
+
- id: CV4
|
|
78
|
+
name: The tone moves with the moment, the voice stays
|
|
79
|
+
area: content
|
|
80
|
+
moment: create
|
|
81
|
+
skill: lazuli-content-voice
|
|
82
|
+
rule: >-
|
|
83
|
+
The voice stays the same everywhere; the tone moves with the moment. Plainer and calmer for errors, money and loss; warmer for success and empty states (our claim). Write in `## Voice` how the tone changes in errors, empty states and success.
|
|
84
|
+
why: >-
|
|
85
|
+
The same voice keeps the product recognizable, and a tone that fits the moment keeps it from joking at someone who just lost their work. The pairing of moments with tones is our claim.
|
|
86
|
+
origin: source
|
|
87
|
+
source: >-
|
|
88
|
+
Mailchimp Content Style Guide, Voice and Tone, https://styleguide.mailchimp.com/voice-and-tone/ (sections "Voice" and "Tone", opened 2026-11-26): you have the same voice all the time, but your tone changes; it is always more important to be clear than entertaining. Which tone goes with errors, money, loss, success and empty states is our claim.
|
|
89
|
+
when_to_break: >-
|
|
90
|
+
A product whose every moment is serious (a medical result, a legal notice) keeps one calm tone, declared with break-a-rule first.
|
|
91
|
+
break_effect: >-
|
|
92
|
+
One steady tone, at the cost of warmth in the few good moments.
|
|
93
|
+
test: >-
|
|
94
|
+
The reviewer reads the error, empty and success messages side by side against `## Voice` and says whether each tone fits its moment and the voice is the same in all three.
|
|
95
|
+
example: >-
|
|
96
|
+
Error: "We could not charge your card. Nothing was taken; try another card." Success: "Done. Your first plan starts today."
|
|
97
|
+
counterexample: >-
|
|
98
|
+
Error: "Oops! Something went wrong" with a joke, for a failed payment.
|
|
99
|
+
|
|
100
|
+
- id: CV5
|
|
101
|
+
name: Plain words of the declared audience
|
|
102
|
+
area: content
|
|
103
|
+
moment: create
|
|
104
|
+
skill: lazuli-content-voice
|
|
105
|
+
rule: >-
|
|
106
|
+
Write in the plain words of the audience declared in `## Audience` of LAZULI.md (reading that section is our claim): no internal jargon, no term only the team uses. In delegate mode, when the kit explains its choices to the owner, no design jargon either (our claim).
|
|
107
|
+
why: >-
|
|
108
|
+
Plain words let the audience act without stopping to translate. The two audiences of the kit (the people who use the product, and the owner in delegate mode) are our claim from the kit author's internal product plan.
|
|
109
|
+
origin: source
|
|
110
|
+
source: >-
|
|
111
|
+
GOV.UK, A to Z style guide, https://guidance.publishing.service.gov.uk/writing-to-gov-uk-standards/style-guides/a-to-z-style-guide/ (entries "plain English" and "Words to avoid", opened 2026-11-26): content should be written in plain English, with a list of words to avoid and the plain word to use instead. Reading the declared audience and the delegate mode is our claim.
|
|
112
|
+
when_to_break: >-
|
|
113
|
+
An audience that uses a technical term every day (clinicians, accountants) may read it plainly, named under `## Audience` and declared with break-a-rule first.
|
|
114
|
+
break_effect: >-
|
|
115
|
+
The audience's own term is exact for them, at the cost of anyone outside it.
|
|
116
|
+
test: >-
|
|
117
|
+
The reviewer reads the copy as the person in `## Audience` and marks every word that person would not use; in delegate mode the reviewer also marks design terms in the explanations.
|
|
118
|
+
example: >-
|
|
119
|
+
"Your order ships tomorrow" for shoppers, and "The button is larger so it is easier to tap" for the owner.
|
|
120
|
+
counterexample: >-
|
|
121
|
+
"Fulfilment SLA pending" for shoppers, and "Increased the hit area to meet the target size heuristic" for the owner.
|
|
122
|
+
|
|
123
|
+
- id: CV6
|
|
124
|
+
name: Specific over superlative
|
|
125
|
+
area: content
|
|
126
|
+
moment: create
|
|
127
|
+
skill: lazuli-content-voice
|
|
128
|
+
rule: >-
|
|
129
|
+
Say something specific instead of a superlative: a number, a name, a place or a fact the product owns in place of "best", "innovative", "leading" or "solutions".
|
|
130
|
+
why: >-
|
|
131
|
+
A superlative is claimed by everyone and checked by no one; a specific fact can be believed and only fits this product. (our claim)
|
|
132
|
+
origin: hypothesis
|
|
133
|
+
source: >-
|
|
134
|
+
Our claim: no page opened on 2026-11-26 states this as a rule. Related reading: Mailchimp Content Style Guide, Voice and Tone, https://styleguide.mailchimp.com/voice-and-tone/ (section "Voice", opened 2026-11-26) prefers the subtle over the noisy.
|
|
135
|
+
when_to_break: >-
|
|
136
|
+
A superlative that is a checked fact with its source next to it (an award, a ranking), declared with break-a-rule first.
|
|
137
|
+
break_effect: >-
|
|
138
|
+
A claim that can be believed, since its proof is next to it.
|
|
139
|
+
test: >-
|
|
140
|
+
The reviewer marks every superlative and vague word in the copy and asks for the fact behind it; one with no fact is a finding.
|
|
141
|
+
example: >-
|
|
142
|
+
"Open since 1998 on the same corner, with the same baker."
|
|
143
|
+
counterexample: >-
|
|
144
|
+
"The best bakery in town, with innovative solutions for you."
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# Interface writing. The words of the interface: buttons, links, headings, labels, error and empty-state
|
|
2
|
+
# messages, and the names of things across screens. These rules are for the moment the text is written. The
|
|
3
|
+
# reviewer judges them from the screens and the code; the review rules that check-design reads come later in
|
|
4
|
+
# this area. CW6 is WCAG 2.2 Success Criterion 2.4.6, a norm that a declared break never waives.
|
|
5
|
+
|
|
6
|
+
- id: CW1
|
|
7
|
+
name: A button or link says what happens
|
|
8
|
+
area: content
|
|
9
|
+
moment: create
|
|
10
|
+
skill: lazuli-content-interface-writing
|
|
11
|
+
rule: >-
|
|
12
|
+
A button or link says what happens when it is pressed, in the words of the outcome: "Send message", "Save and continue", "See pricing". Never only "Submit", "OK" or "Click here". For links, AU2 covers a name that says where the link goes. The phrase list the kit reads as naming no outcome is the hypothesis H1 in `HYPOTHESES.md` of this area.
|
|
13
|
+
why: >-
|
|
14
|
+
A person scanning a screen reads the controls first; a label that names the outcome lets them act without reading the text around it, and one that names nothing makes them guess. (our claim)
|
|
15
|
+
origin: hypothesis
|
|
16
|
+
status: hypothesis
|
|
17
|
+
hypothesis: H1
|
|
18
|
+
source: >-
|
|
19
|
+
Our claim: the phrase list of H1 was written before any page was read. Related reading, not the source of the rule: GOV.UK Design System, Button, https://design-system.service.gov.uk/components/button/ (section "How it works", opened 2026-11-26) says to write button text in sentence case, describing the action it performs, and to add words where needed to describe the action.
|
|
20
|
+
when_to_break: >-
|
|
21
|
+
A word that is generic elsewhere may be the outcome in this product ("Send" in a mail app, "Done" closing an editor whose work is already saved), declared with break-a-rule first.
|
|
22
|
+
break_effect: >-
|
|
23
|
+
A shorter label where the outcome is already plain from the screen, at the cost of meaning when the control is read alone.
|
|
24
|
+
test: >-
|
|
25
|
+
The reviewer reads every button and link name alone, out of its screen, and says what pressing it does; a name that does not say it is a finding. Link names are also checked by AU2, and check-design lists buttons named only by a generic word (CR1).
|
|
26
|
+
example: >-
|
|
27
|
+
"Book a first visit" on the button that books it, and "Save and continue" where the answers are saved.
|
|
28
|
+
counterexample: >-
|
|
29
|
+
"Submit" under a booking form, and "Click here" after a sentence about pricing.
|
|
30
|
+
|
|
31
|
+
- id: CW2
|
|
32
|
+
name: One name per thing on every screen
|
|
33
|
+
area: content
|
|
34
|
+
moment: create
|
|
35
|
+
skill: lazuli-content-interface-writing
|
|
36
|
+
rule: >-
|
|
37
|
+
The same action, page or object keeps one name and one spelling on every screen, in navigation, buttons, headings and messages. Choose the name once, list it under `## Voice` (CV3), and reuse it. Two names for one destination and one term written two ways ("E-mail" and "Email", "Log in" and "Login") are the hypotheses H5 and H6 in `HYPOTHESES.md` of this area.
|
|
38
|
+
why: >-
|
|
39
|
+
When a thing changes name between screens, people wonder whether it is a different thing, and the second name costs a moment of doubt each time. (our claim)
|
|
40
|
+
origin: hypothesis
|
|
41
|
+
status: hypothesis
|
|
42
|
+
hypothesis: [H5, H6]
|
|
43
|
+
source: >-
|
|
44
|
+
Our claim: no page opened on 2026-11-26 states this as a rule. It comes from the kit author's internal product plan (content row: terms consistent across screens).
|
|
45
|
+
when_to_break: >-
|
|
46
|
+
A name that changes on purpose with the person's progress ("Cart" before paying, "Order" after), declared with break-a-rule first, with the change said on the screen where it happens.
|
|
47
|
+
break_effect: >-
|
|
48
|
+
The name follows the state of the thing, at the cost of one more name to learn.
|
|
49
|
+
test: >-
|
|
50
|
+
The reviewer lists the names used for each page, action and object across the screens of the product and marks any thing with two names or two spellings; check-design compares navigation names (CR5) and spellings (CR6) when it gets two or more screens.
|
|
51
|
+
example: >-
|
|
52
|
+
"Plans" in the menu, "Plans" as the page heading and "See plans" on the home page button.
|
|
53
|
+
counterexample: >-
|
|
54
|
+
"Plans" in the menu, "Pricing" as the heading of the same page, and "Log in" in the header beside "Login" in the footer.
|
|
55
|
+
|
|
56
|
+
- id: CW3
|
|
57
|
+
name: Labels lead with the meaning and stay short
|
|
58
|
+
area: content
|
|
59
|
+
moment: create
|
|
60
|
+
skill: lazuli-content-interface-writing
|
|
61
|
+
rule: >-
|
|
62
|
+
A label leads with the words that carry its meaning and stays short: the verb and the object first, no filler in front ("Download the report", not "Click here in order to download the report"). The word cutoff the kit uses for button labels is the hypothesis H2 in `HYPOTHESES.md` of this area.
|
|
63
|
+
why: >-
|
|
64
|
+
People read the start of a label and skip the rest; the first words decide whether the control is the one they want. (our claim)
|
|
65
|
+
origin: hypothesis
|
|
66
|
+
status: hypothesis
|
|
67
|
+
hypothesis: H2
|
|
68
|
+
source: >-
|
|
69
|
+
Our claim: the cutoff is the round starting value of H2, set before any page was measured. Related reading, not the source of the cutoff and never a reason to move it: GOV.UK Design System, Button, https://design-system.service.gov.uk/components/button/ (section "How it works", opened 2026-11-26) 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", opened 2026-11-26) says labels and headings do not need to be lengthy.
|
|
70
|
+
when_to_break: >-
|
|
71
|
+
A label that needs more words to be exact (a legal confirmation, a payment that cannot be undone), declared with break-a-rule first.
|
|
72
|
+
break_effect: >-
|
|
73
|
+
The label carries the whole consequence, at the cost of a slower scan.
|
|
74
|
+
test: >-
|
|
75
|
+
The reviewer reads the first words of each label and says whether they name the action or the object; check-design reads the word count of button names (CR2).
|
|
76
|
+
example: >-
|
|
77
|
+
"Download the report" and "Pay now".
|
|
78
|
+
counterexample: >-
|
|
79
|
+
"Click here if you would like to download the full report".
|
|
80
|
+
|
|
81
|
+
- id: CW4
|
|
82
|
+
name: An error says what went wrong and how to fix it
|
|
83
|
+
area: content
|
|
84
|
+
moment: create
|
|
85
|
+
skill: lazuli-content-interface-writing
|
|
86
|
+
rule: >-
|
|
87
|
+
An error message says what went wrong, on which field, and how to fix it, in the person's words, without blame and never as a code alone. Where the message sits and how it is tied to its field are XM5 and XR5 of the ux area. The generic-error phrase list the kit reads is the hypothesis H4 in `HYPOTHESES.md` of this area.
|
|
88
|
+
why: >-
|
|
89
|
+
A message that only says something failed leaves the person to find the field and guess the fix; one that names both lets them repair it in one step. (our claim)
|
|
90
|
+
origin: hypothesis
|
|
91
|
+
status: hypothesis
|
|
92
|
+
hypothesis: H4
|
|
93
|
+
source: >-
|
|
94
|
+
Our claim: the phrase list of H4 was written before any page was read. Related reading, not the source of the rule: GOV.UK Design System, Error message, https://design-system.service.gov.uk/components/error-message/ (sections "Be clear and concise" and "Be specific", opened 2026-11-26) says to describe what has happened and tell people how to fix it, and not to use technical jargon, "valid" and "invalid", or blaming words such as "you forgot"; Nielsen Norman Group, Tim Neusesser and Evan Sunwall, Error-Message Guidelines, https://www.nngroup.com/articles/error-message-guidelines/ (section "Communication Guidelines", opened 2026-11-26) says to offer remedies, to avoid phrasing that blames users, and to show error codes for diagnosis only. W3C, Understanding SC 3.3.1 Error Identification, https://www.w3.org/WAI/WCAG22/Understanding/error-identification.html, and Understanding SC 3.3.3 Error Suggestion, https://www.w3.org/WAI/WCAG22/Understanding/error-suggestion.html (sections "Success Criterion" and "Intent", opened 2026-11-26), are related reading only and are not restated here as a norm.
|
|
95
|
+
when_to_break: >-
|
|
96
|
+
A message that cannot say the fix without exposing data (a failed sign in that must not say which of the two answers was wrong), declared with break-a-rule first.
|
|
97
|
+
break_effect: >-
|
|
98
|
+
The account stays private, at the cost of a less specific message.
|
|
99
|
+
test: >-
|
|
100
|
+
The reviewer reads each error message of the product and marks the parts it lacks: what went wrong, which field, how to fix it; a message that blames or shows only a code is a finding. XR5 checks that the message is tied to its field, and check-design reads the messages shown on the page (CR4).
|
|
101
|
+
example: >-
|
|
102
|
+
"Enter your phone number with the area code, like 31 98765 4321".
|
|
103
|
+
counterexample: >-
|
|
104
|
+
"Invalid input", "Error 0x0643" and "You forgot the phone".
|
|
105
|
+
|
|
106
|
+
- id: CW5
|
|
107
|
+
name: One capitalization style for every control
|
|
108
|
+
area: content
|
|
109
|
+
moment: create
|
|
110
|
+
skill: lazuli-content-interface-writing
|
|
111
|
+
rule: >-
|
|
112
|
+
Every control of the product uses one capitalization style, sentence case or title case, chosen once and written under `## Voice`. Proper nouns and brand names keep their own capitals. How the style of a label is read is the hypothesis H3 in `HYPOTHESES.md` of this area.
|
|
113
|
+
why: >-
|
|
114
|
+
Mixed styles make controls look as if they came from different products and draw the eye to the difference instead of the words. (our claim)
|
|
115
|
+
origin: hypothesis
|
|
116
|
+
status: hypothesis
|
|
117
|
+
hypothesis: H3
|
|
118
|
+
source: >-
|
|
119
|
+
Our claim: no page opened on 2026-11-26 sets which style to use. Related reading, not the source of the rule: GOV.UK Design System, Button, https://design-system.service.gov.uk/components/button/ (section "How it works", opened 2026-11-26) writes button text in sentence case.
|
|
120
|
+
when_to_break: >-
|
|
121
|
+
A single control in capitals as part of the brand (a logo-like call to action), declared with break-a-rule first.
|
|
122
|
+
break_effect: >-
|
|
123
|
+
One control stands apart on purpose, at the cost of reading as louder than the rest.
|
|
124
|
+
test: >-
|
|
125
|
+
The reviewer lists the capitalization of every button, link, tab and menu item and marks any that breaks the declared style; check-design reads the styles of button names (CR3).
|
|
126
|
+
example: >-
|
|
127
|
+
"Book a visit", "See plans" and "Contact us", all in sentence case.
|
|
128
|
+
counterexample: >-
|
|
129
|
+
"Book a Visit" beside "See plans" and "CONTACT US".
|
|
130
|
+
|
|
131
|
+
- id: CW6
|
|
132
|
+
name: Headings and labels describe topic or purpose
|
|
133
|
+
area: content
|
|
134
|
+
moment: create
|
|
135
|
+
skill: lazuli-content-interface-writing
|
|
136
|
+
rule: >-
|
|
137
|
+
WCAG 2.2 Success Criterion 2.4.6 Headings and Labels (Level AA): Headings and labels describe topic or purpose. Write each heading so it names the topic of the section under it, and each form label so it names what to enter.
|
|
138
|
+
why: >-
|
|
139
|
+
Clear and descriptive headings and labels let people find the information they seek and understand how the parts of a page relate.
|
|
140
|
+
origin: norm
|
|
141
|
+
source: >-
|
|
142
|
+
W3C, Understanding SC 2.4.6 Headings and Labels, https://www.w3.org/WAI/WCAG22/Understanding/headings-and-labels.html (sections "Success Criterion" and "Intent", opened 2026-11-26): the criterion reads "Headings and labels describe topic or purpose.", Level AA; the intent is to help users understand what information is contained in web pages and how it is organized; labels and headings do not need to be lengthy.
|
|
143
|
+
when_to_break: >-
|
|
144
|
+
No room: the criterion is met or not. A declared break never waives this norm.
|
|
145
|
+
break_effect: >-
|
|
146
|
+
No effect is bought by a heading or label that does not say its topic or purpose.
|
|
147
|
+
test: >-
|
|
148
|
+
The reviewer reads each heading and label of the page alone and says the topic or purpose it names; one that names neither is a finding, and a declared break never waives it.
|
|
149
|
+
example: >-
|
|
150
|
+
A section headed "Delivery times by region" and a field labelled "Postcode".
|
|
151
|
+
counterexample: >-
|
|
152
|
+
A section headed "Welcome" over the delivery table, and a field labelled "Info".
|
|
153
|
+
|
|
154
|
+
- id: CW7
|
|
155
|
+
name: Text can grow and the interface still works
|
|
156
|
+
area: content
|
|
157
|
+
moment: create
|
|
158
|
+
skill: lazuli-content-interface-writing
|
|
159
|
+
rule: >-
|
|
160
|
+
The interface keeps working when text grows in another language or arrives longer from real content: buttons wrap or grow instead of cutting their label, headings wrap without covering what follows, and no box with a fixed height hides text. Design with the longest real text in view, Portuguese included. The growth factor and the long samples the kit uses are the hypotheses H7 and H8 in `HYPOTHESES.md` of this area.
|
|
161
|
+
why: >-
|
|
162
|
+
Text written in English and laid out to fit is the shortest it will ever be; translations and real names arrive longer, and a layout fitted to the sample breaks on them. (our claim)
|
|
163
|
+
origin: hypothesis
|
|
164
|
+
status: hypothesis
|
|
165
|
+
hypothesis: [H7, H8]
|
|
166
|
+
source: >-
|
|
167
|
+
Our claim: the factor of H7 and the samples of H8 were set before any page was measured. Related reading, not the source of the factor and never a reason to move it: W3C Internationalization, Text size in translation, https://www.w3.org/International/articles/article-text-size.en (opened 2026-11-26) gives a table of average expansion from English to European languages, larger for short strings, and says short labels are the most likely to be squeezed into small spaces.
|
|
168
|
+
when_to_break: >-
|
|
169
|
+
A label that will never be translated and whose text is fixed by the product (a product name on a badge), declared with break-a-rule first.
|
|
170
|
+
break_effect: >-
|
|
171
|
+
A tighter box where the text cannot change, at the cost of a fix if it ever does.
|
|
172
|
+
test: >-
|
|
173
|
+
The reviewer replaces the text of buttons, headings and paragraphs with longer text and looks at each width for cut, spilled or overlapping text; check-design runs the longer-text cases (CR7 and CR8).
|
|
174
|
+
example: >-
|
|
175
|
+
A button that wraps "Solicitar orçamento personalizado para minha empresa" onto two lines and keeps all of it.
|
|
176
|
+
counterexample: >-
|
|
177
|
+
A tab bar that cuts "Configurações" to "Configura" in a box sized for "Settings".
|
|
178
|
+
|
|
179
|
+
- id: CW8
|
|
180
|
+
name: Every list works with none, one and hundreds
|
|
181
|
+
area: content
|
|
182
|
+
moment: create
|
|
183
|
+
skill: lazuli-content-interface-writing
|
|
184
|
+
rule: >-
|
|
185
|
+
Every list is designed for zero, one and hundreds of items: an empty list says what to do next, one item does not look broken, and hundreds stay usable (search, filter or pages). How the empty state looks is designed with `lazuli-ui-states-and-system`; this rule covers its words and the list in each case. How lists are found and the size of the hundreds case are the hypothesis H9 in `HYPOTHESES.md` of this area.
|
|
186
|
+
why: >-
|
|
187
|
+
Lists are designed with a handful of sample items, and the first real account has none while the busiest has hundreds; both ends are where people get stuck. (our claim)
|
|
188
|
+
origin: hypothesis
|
|
189
|
+
status: hypothesis
|
|
190
|
+
hypothesis: H9
|
|
191
|
+
source: >-
|
|
192
|
+
Our claim: no page opened on 2026-11-26 states this as a rule. It comes from the kit author's internal product plan (extreme content: empty lists, one item, hundreds of items).
|
|
193
|
+
when_to_break: >-
|
|
194
|
+
A list whose length is fixed by the product (the days of the week, the steps of a fixed flow), declared with break-a-rule first.
|
|
195
|
+
break_effect: >-
|
|
196
|
+
No empty or huge case to design, since it cannot happen.
|
|
197
|
+
test: >-
|
|
198
|
+
The reviewer renders each list empty, with one item and with hundreds, and says what the person can do in each; check-design runs the list cases (CR9, CR10 and CR11).
|
|
199
|
+
example: >-
|
|
200
|
+
An empty orders list that says "No orders yet. Your first order will show here after checkout." with a link "Browse products".
|
|
201
|
+
counterexample: >-
|
|
202
|
+
An empty table with its headers and nothing under them, and a single card stretched across the whole row.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Data hypotheses to validate in the A/B
|
|
2
|
+
|
|
3
|
+
Numbers and measures of charts and dashboards 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 chart was measured, and lists chart readings under "Observed so far, not evidence".
|
|
4
|
+
|
|
5
|
+
| ID | Principle | Candidate limit | How to validate in the A/B |
|
|
6
|
+
|---|---|---|---|
|
|
7
|
+
| H1 | DC8 (chart labels are set at a size people read at every width) | Cutoff: minLabelPx 12. How it was picked: a round starting value, our claim, set before any chart was measured. Published guidance opened on 2026-11-26 is related reading and never moves it: Government Analysis Function (UK), Data visualisation: charts, https://analysisfunction.civilservice.gov.uk/policy-store/data-visualisation-charts/ (section "Chart labels") asks for a large enough font for all labels and says it is not possible to suggest a specific minimum font size. What is measured: the rendered size of each chart text (axis ticks, series names, values, annotations, and the legend texts), the computed font size times the scale of its screen transform, at each width; the chart's HTML title and caption are not chart labels. Limits: canvas text is not read (a canvas chart is read from its pixels only); a label can be large and still unreadable on its background or in a thin weight; text drawn as paths is not text. Observed so far, not evidence (local fixtures only): rainbow.html, 9 labels at 9 px at 1440 and 390 px (hint); bars-zero.html, bars-truncated.html, log-axis.html, lines-legend.html and lines-direct.html, every label at 12 px or more at both widths (pass); the labels of canvas-bars.html are not read. | Needs pairs of the same chart with labels under and over the cutoff, shown at the smallest width to readers of the audience, checked for how many read the values correctly |
|
|
8
|
+
| H2 | DR3 (series are named at the data, not only in a legend, chart.direct-labels) | Our claim, a hint only; no number is used as a cutoff. How it was picked: no value is picked; the reading rests on definitions fixed before any chart was measured: `LEGEND_WORD` (a legend is an element whose class, id or label has the word legend), `SWATCH_PX` (a legend swatch is at most 24 px on both sides), `LABEL_GAP_PX` (a text within 8 px of a series' marks labels it, each text labeling at most the one series whose marks are nearest), a text in the series' own color labels it, and axis texts (tick numbers, texts under an axis, grid or tick class) never name a series. It borrows WCAG 2.2 1.4.1 for a heuristic reading, so it is never a norm fail; the norm is DC6, judged by the reviewer. Limits: a legend whose markup lacks the word is read as marks (its swatches become series); a series told apart by dash or marker shape is still counted, since only names are read; value labels do not name series; a canvas chart's labels and legend are not read (pixels only); a series drawn through `use` with paint set on the referenced shapes is read with the `use`'s paint; gradient paints and clip paths other than one rect are not read. Observed so far, not evidence (local fixtures only): lines-legend.html names Online, Retail stores and Partners only in the legend at 1440 and 390 px (hint); rainbow.html names its nine series only in the legend (hint); lines-direct.html and lines-direct-close.html label every series at the data (pass); canvas-bars.html is not read for labels. | Needs pairs of the same chart with direct labels and with a legend only, shown to readers of the audience, checked for how many match every series to its data, and how fast |
|
|
9
|
+
| H3 | DR4 (few saturated colors per chart, chart.categories) | Cutoff: maxCategories 6, minSaturation 60, minLightness 25, maxLightness 75. How it was picked: carried over unchanged from the color area, the count of color H19 (ES8, at most 6 saturated colors in a categorical chart) and the definition of a saturated color of color H2 (PA4: HSL saturation above 60 percent, lightness from 25 to 75 percent), set before any chart was measured; never tuned here. What is measured: the series colors of an svg chart, and for a canvas chart the color buckets of its pixels (4 bits per channel, mean real color per bucket) covering at least `MIN_SERIES_SHARE` of the capture; the saturated ones are counted with the color measurer's rounded HSL. Limits: an svg series in gray is never counted; canvas antialiasing may add a bucket over `MIN_SERIES_SHARE`; a canvas outside the first view, or still changing, is not read; gradient paints and clip paths other than one rect are not read. Observed so far, not evidence (local fixtures only): rainbow.html uses 9 saturated colors (hint) at 1440 and 390 px; lines-legend.html, lines-direct.html, bars-zero.html and canvas-bars.html stay at or under the count (pass); the busy canvases of canvas-busy.html were not read. | Needs charts with 3, 6 and 9 saturated series colors shown to readers of the audience, checked for accuracy and reading time of the chart, as color H19 asks |
|
|
10
|
+
| H4 | DR5 (series colors stay apart for color vision deficiencies, chart.cvd) | Cutoff: minDeltaE 10, minSaturation 60, minLightness 25, maxLightness 75. How it was picked: minDeltaE is a round starting value, our claim, set before any chart was measured; the saturation keys are those of color H2 and only say which canvas buckets are read as series. The model: Machado, Oliveira and Fernandes (2009), matrices of Table 1 of the authors' page at severity 1.0 (the page's "highest severity or a case of dichromacy"), applied in linear sRGB (our claim, the page names no space), the result clamped and encoded with the CSS Color 4 conversions; grayscale is the sRGB gray of the WCAG 2 relative luminance; the distance is Delta E 1976 in CIELAB (CSS Color 4 conversions, D65 to D50 by Bradford). A pair is close when any of normal vision, protanopia, deuteranopia, tritanopia or grayscale is under the cutoff, unless both series are labeled at the data. Limits: the simulation is of dichromats; severities below 1 (the anomalous trichromacies most people with a deficiency have) are not read; a mark's size and its neighbors change how far apart colors must be, and the distance ignores both; canvas series are only the saturated buckets, so a gray canvas series is never compared; gradient paints and clip paths other than one rect are not read. Observed so far, not evidence (local fixtures only): lines-legend.html, #5a9824 and #d26c3c at Delta E 0 with grayscale and 3.9 with deuteranopia (hint); canvas-bars.html, the same pair read from pixels (hint); rainbow.html, 12 close pairs; lines-direct.html passes in every view; lines-direct-close.html has one close pair labeled at the data, not counted. | Needs pairs of charts whose series colors are under and over the cutoff, shown to readers with protanopia, deuteranopia and tritanopia (and in grey print), checked for how many match every series |
|
|
11
|
+
| H5 | DR6 (the chart's message shows at first look) | Our claim, judged in words; no number is used as a cutoff. How it was picked: the kit leaves to the first look what no measure can say (whether the message shows); the CLI never says a chart is clear. The goal's `Understand:` line states the chart's message; the first look (`lazuli capture`, `record-first-look`) sees only the captures, never the chart sheet, and says what the chart says; the reviewer compares that with the Understand line. Limits, as GR5 and the first look: an agent's reading is not a person's; an agent may know a common chart from training; the answer is reported in words only and is not counted beyond the first look record. Observed so far, not evidence (local fixtures only): no first look of a chart has been recorded yet. | Validated with the same captures shown to people from the audience, comparing the message each states with the first look's answer and the Understand line; the look holds when they name the same finding |
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
area: data
|
|
2
|
+
title: Data
|
|
3
|
+
summary: "Charts and dashboards whose message shows at first look: bars from zero, readable labels, series named at the data, few colors, and colors that stay apart for color vision deficiencies."
|
|
4
|
+
order: 90
|
|
5
|
+
prefixes: [DC, DD, DR]
|
|
6
|
+
skills:
|
|
7
|
+
- lazuli-data-charts-and-dashboards
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
# Charts. One chart, one message, in the form that fits the comparison, read at first look. These rules are for
|
|
2
|
+
# the moment the chart is made. The reviewer judges them from the code and the rendered page, and the first look
|
|
3
|
+
# says whether the message shows; the review rules that read the chart measure come later in this area.
|
|
4
|
+
|
|
5
|
+
- id: DC1
|
|
6
|
+
name: One message per chart, written as its title
|
|
7
|
+
area: data
|
|
8
|
+
moment: create
|
|
9
|
+
skill: lazuli-data-charts-and-dashboards
|
|
10
|
+
rule: >-
|
|
11
|
+
Before drawing, write the one thing the chart has to show as a sentence, and make that sentence the chart's title: the finding, not the topic. A second statistical line under it may say what the data is, where and when. When the data holds two messages, make two charts.
|
|
12
|
+
why: >-
|
|
13
|
+
A title that states the finding tells the reader what to look for, so the chart confirms a message instead of asking the reader to find one; a topic title leaves every reader to draw their own, often different, conclusion.
|
|
14
|
+
origin: source
|
|
15
|
+
source: >-
|
|
16
|
+
Government Analysis Function (UK), Data visualisation: charts, publication date 19 May 2022, https://analysisfunction.civilservice.gov.uk/policy-store/data-visualisation-charts/ (sections "What is the message?" and "Titles", opened 2026-11-26): asks whether a chart tries to communicate too many messages, and says the headline title should communicate the headline message of the chart, with a statistical subtitle saying what the data is, the geography and the time period. That the title is the place where the message is written for every chart, dashboards included, is our claim.
|
|
17
|
+
when_to_break: >-
|
|
18
|
+
A chart meant for exploration (a tool where the reader picks the series and the period) has no single finding; it may carry a topic title, declared with break-a-rule first, and says in its first line what the reader can explore.
|
|
19
|
+
break_effect: >-
|
|
20
|
+
The reader gets freedom to look for their own finding, at the cost of a chart that shows nothing at first look.
|
|
21
|
+
test: >-
|
|
22
|
+
The reviewer reads every chart title and asks whether it states a finding a reader could check against the chart; the first look on the rendered page says what the chart shows, and the reviewer compares it with the title (DR6).
|
|
23
|
+
example: >-
|
|
24
|
+
A line chart titled "Online sales passed store sales in March", with the subtitle "Monthly sales by channel, Brazil, 2025 to 2026".
|
|
25
|
+
counterexample: >-
|
|
26
|
+
A chart titled "Sales by channel" with four lines and no hint of which change matters.
|
|
27
|
+
|
|
28
|
+
- id: DC2
|
|
29
|
+
name: The form follows the comparison
|
|
30
|
+
area: data
|
|
31
|
+
moment: create
|
|
32
|
+
skill: lazuli-data-charts-and-dashboards
|
|
33
|
+
rule: >-
|
|
34
|
+
Name the comparison the message makes, then pick the form for it: amounts and rankings in bars, change over time in lines (more than one time series always in lines, never in clustered bars), relation between two measures in dots, parts of a whole in bars, and in a pie or donut only when there are few parts that differ clearly. When no form fits, a table or one sentence with the number may be the answer.
|
|
35
|
+
why: >-
|
|
36
|
+
Each form makes one comparison easy and the others hard: lengths from a common base are read well, angles and areas poorly, so the wrong form hides the message even when the data is right.
|
|
37
|
+
origin: source
|
|
38
|
+
source: >-
|
|
39
|
+
Government Analysis Function (UK), Data visualisation: charts, publication date 19 May 2022, https://analysisfunction.civilservice.gov.uk/policy-store/data-visualisation-charts/ (sections "Statistical relationships", "Using bar charts" and "Using pie charts", opened 2026-11-26): a table matches statistical relationships (distribution, time series, ranking, deviation, correlation, magnitude, part-to-whole) to recommended chart types; it says to use a line chart instead of a bar chart when there is more than one time series, that small differences are hard to see on a pie chart, and that pie charts should be limited to a few categories. That lengths are read better than angles and areas is our claim here: no page on perception was opened in this task.
|
|
40
|
+
when_to_break: >-
|
|
41
|
+
An audience that knows one form by convention (a population pyramid, a candlestick chart for traders) may keep it for a comparison another form would show better, declared with break-a-rule first.
|
|
42
|
+
break_effect: >-
|
|
43
|
+
The familiar form is read without learning, at the cost of the comparison it does not make easy.
|
|
44
|
+
test: >-
|
|
45
|
+
The reviewer names the comparison each chart makes from its title and checks the form against it; a pie with many similar parts, or two time series in clustered bars, is a finding.
|
|
46
|
+
example: >-
|
|
47
|
+
Sales by region compared as horizontal bars sorted from largest to smallest.
|
|
48
|
+
counterexample: >-
|
|
49
|
+
A pie of nine regions whose slices differ by a sliver, read only through a legend.
|
|
50
|
+
|
|
51
|
+
- id: DC3
|
|
52
|
+
name: Bars start at zero, and a cut line axis says so
|
|
53
|
+
area: data
|
|
54
|
+
moment: create
|
|
55
|
+
skill: lazuli-data-charts-and-dashboards
|
|
56
|
+
rule: >-
|
|
57
|
+
The value axis of a bar chart starts at zero, so the length of each bar is proportional to its value. A line chart may start its axis elsewhere only when the range is the message (values that never come near zero, a small change that matters), and then the axis shows the cut with a break mark, the cut starts at a round number, and the text alternative mentions it.
|
|
58
|
+
why: >-
|
|
59
|
+
Bars are read by their length: a bar axis that does not start at zero makes a small difference look large. Lines are read by their slope and position, so a cut axis distorts them less, but only when the reader can see that it is cut.
|
|
60
|
+
origin: source
|
|
61
|
+
source: >-
|
|
62
|
+
Government Analysis Function (UK), Data visualisation: charts, publication date 19 May 2022, https://analysisfunction.civilservice.gov.uk/policy-store/data-visualisation-charts/ (sections "Formatting bar charts", "Do not break the numerical axis on bar charts", and "Considerations for line charts", "Breaking the y-axis", opened 2026-11-26): breaking the numerical axis on a bar chart distorts the relative proportions of the bars; it is acceptable to break a numerical y-axis on a line chart when necessary, with a clear broken axis symbol, a break from a rounded number, and a mention of the break in the text description.
|
|
63
|
+
when_to_break: >-
|
|
64
|
+
None for bars: when zero hides the story, change the form (a dot plot, or the difference from an average) instead of cutting the bars. A line chart may cut its axis only as the rule says.
|
|
65
|
+
break_effect: >-
|
|
66
|
+
Not applicable to bars; a cut line axis shows the range at the cost of some mental effort from the reader.
|
|
67
|
+
test: >-
|
|
68
|
+
The reviewer reads the lowest value of every bar chart's axis in the code or on the rendered page and checks that it is zero; for a line axis that does not start at zero, the reviewer looks for the break mark and the mention in the text alternative. check-design reads the base of svg bar charts (DR1).
|
|
69
|
+
example: >-
|
|
70
|
+
A line chart of an immunisation rate whose axis runs over the upper part of the scale, with a broken axis symbol and the sentence "the axis starts above zero to show the fall" under it.
|
|
71
|
+
counterexample: >-
|
|
72
|
+
A bar chart of inflation whose axis starts high, so a small fall looks like a collapse.
|
|
73
|
+
|
|
74
|
+
- id: DC4
|
|
75
|
+
name: Name the series at the data, not in a legend
|
|
76
|
+
area: data
|
|
77
|
+
moment: create
|
|
78
|
+
skill: lazuli-data-charts-and-dashboards
|
|
79
|
+
rule: >-
|
|
80
|
+
Write the name of each series next to its data: at the end of each line, on or beside each bar or slice, on the first cluster of a grouped bar chart. Use a legend only when direct labels cannot fit, and then keep the legend in the same order and orientation as the data and say so above the chart. Labels are dark text, not the series color, unless lines are so close that only color shows which label is whose.
|
|
81
|
+
why: >-
|
|
82
|
+
A legend makes the reader match each name to its data by color, back and forth, which is slow for everyone and impossible for some people with color vision deficiencies; a name next to its data needs no matching.
|
|
83
|
+
origin: source
|
|
84
|
+
source: >-
|
|
85
|
+
Government Analysis Function (UK), Data visualisation: charts, publication date 19 May 2022, https://analysisfunction.civilservice.gov.uk/policy-store/data-visualisation-charts/ (sections "Formatting line charts", "Labelling lines", and "Formatting stacked bar charts", "Legends", opened 2026-11-26): avoid legends unless necessary because they use colour to match labels to data; label lines directly, at the end of the line if needed; label stacks directly where possible; when a legend is needed, match the order and orientation of the data and state it above the chart; use black or dark grey text for labels.
|
|
86
|
+
when_to_break: >-
|
|
87
|
+
A chart whose series overlap so densely that no label fits next to its data (many lines in a small space) may use a legend, declared with break-a-rule first, ordered as the data; consider small multiples or a focus chart before.
|
|
88
|
+
break_effect: >-
|
|
89
|
+
The chart keeps every series, at the cost of a color matching step for the reader.
|
|
90
|
+
test: >-
|
|
91
|
+
The reviewer lists each chart's series and checks that each name sits next to its data; a legend is a finding unless the chart cannot fit direct labels, and then its order is checked against the data. check-design hints with series named only in a legend or not at all (DR3).
|
|
92
|
+
example: >-
|
|
93
|
+
A line chart with four lines, each named in dark text at its right end.
|
|
94
|
+
counterexample: >-
|
|
95
|
+
A line chart with six colored lines and a legend in a box below it, in a different order than the lines.
|
|
96
|
+
|
|
97
|
+
- id: DC5
|
|
98
|
+
name: Color by intent, one highlight and the rest neutral
|
|
99
|
+
area: data
|
|
100
|
+
moment: create
|
|
101
|
+
skill: lazuli-data-charts-and-dashboards
|
|
102
|
+
rule: >-
|
|
103
|
+
Give color to the series that carries the message and keep the others neutral (a light grey), so the highlight is the first thing seen. Use few categorical colors, and when categories outgrow them, group the small ones or use small multiples. Show ordered data (low to high) in one hue from light to dark, and data that goes both ways from a middle value in two hues with a neutral middle. Status colors in a chart (an alert, a target missed) follow `lazuli-color-states-and-signals`, never a series color.
|
|
104
|
+
why: >-
|
|
105
|
+
Color draws the eye before anything else in a chart, so it should point at the message; many strong colors compete with each other, and a rainbow scale on ordered data reads as categories instead of an order.
|
|
106
|
+
origin: source
|
|
107
|
+
source: >-
|
|
108
|
+
Government Analysis Function (UK), Data visualisation: charts, publication date 19 May 2022, https://analysisfunction.civilservice.gov.uk/policy-store/data-visualisation-charts/ (section "Considerations for line charts", "Alternative example: focus chart", opened 2026-11-26): give a colour to the line showing the series of interest and a light grey to all other lines; it says presenting many lines often makes the chart cluttered. The clauses on ordered data in one hue, on data both ways from a middle in two hues and on grouping categories are our claim: no page saying them was opened in this task.
|
|
109
|
+
when_to_break: >-
|
|
110
|
+
A chart whose categories are all equal in weight and must each be found (a map legend of parties) may color every category, declared with break-a-rule first, keeping the colors apart for color vision deficiencies (DC6).
|
|
111
|
+
break_effect: >-
|
|
112
|
+
Every category can be found by color, at the cost of a chart with no single point of attention.
|
|
113
|
+
test: >-
|
|
114
|
+
The reviewer counts the strong colors of each chart and names the series each points at; the first look on the rendered page says what it saw first, and the reviewer compares it with the title. check-design counts the saturated series colors (DR4) and the pairs that come close in simulated color vision deficiencies (DR5).
|
|
115
|
+
example: >-
|
|
116
|
+
A line chart where the company's own line is dark blue and the competitors' lines are light grey.
|
|
117
|
+
counterexample: >-
|
|
118
|
+
A bar chart of eight months with a different bright color for every bar.
|
|
119
|
+
|
|
120
|
+
- id: DC6
|
|
121
|
+
name: Never tell series apart by color alone
|
|
122
|
+
area: data
|
|
123
|
+
moment: create
|
|
124
|
+
skill: lazuli-data-charts-and-dashboards
|
|
125
|
+
rule: >-
|
|
126
|
+
WCAG 2.2 1.4.1 Use of Color (level A): Color is not used as the only visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element. In a chart, every series and every meaning that has a color also has a second cue: a direct label, a position, a line style, a marker shape, a pattern, or a difference in lightness with a contrast ratio of at least 3:1 between the colors. A smaller difference in lightness is color alone (our claim).
|
|
127
|
+
why: >-
|
|
128
|
+
People with color vision deficiencies, and anyone reading a grey print or a screen in sunlight, cannot match series by hue; a chart that conveys its series only through color, with a legend that only repeats the colors, fails them.
|
|
129
|
+
origin: norm
|
|
130
|
+
source: >-
|
|
131
|
+
W3C, Web Content Accessibility Guidelines (WCAG) 2.2, Understanding Success Criterion 1.4.1: Use of Color, https://www.w3.org/WAI/WCAG22/Understanding/use-of-color.html (sections "Success Criterion", "Intent" and "Failures", opened 2026-11-26): the criterion text quoted in the rule, level A; a note in "Intent" counts colors that also differ significantly in lightness as an additional visual distinction as long as the difference in relative luminance between the colors leads to a contrast ratio of 3:1 or greater; the failure F13 names a chart that conveys information by color with a text alternative that does not include the information conveyed by color. Related reading: Understanding SC 1.4.11 Non-text Contrast, https://www.w3.org/WAI/WCAG22/Understanding/non-text-contrast.html (section "Graphical Objects", opened 2026-11-26), says each line in a graph is a graphical object whose contrast matters when it is required to understand the content.
|
|
132
|
+
when_to_break: >-
|
|
133
|
+
No break waives 1.4.1. A chart may lean on color for decoration that carries no information; the information itself always has a second cue.
|
|
134
|
+
break_effect: >-
|
|
135
|
+
Not applicable: the criterion is a norm of level A.
|
|
136
|
+
test: >-
|
|
137
|
+
The reviewer covers the hue of each chart (in a grey or color vision deficiency view of the rendered page) and checks that every series can still be named; a series found only by its color is a finding. check-design hints with series named only in a legend or not at all (DR3) and with close color pairs, and writes the simulated views on the chart sheet (DR5).
|
|
138
|
+
example: >-
|
|
139
|
+
Two lines, one solid and one dashed, each named at its end, that can still be told apart in grey.
|
|
140
|
+
counterexample: >-
|
|
141
|
+
A red and a green line of the same lightness, named only in a legend of colored squares.
|
|
142
|
+
|
|
143
|
+
- id: DC7
|
|
144
|
+
name: Every chart has a text alternative with its message
|
|
145
|
+
area: data
|
|
146
|
+
moment: create
|
|
147
|
+
skill: lazuli-data-charts-and-dashboards
|
|
148
|
+
rule: >-
|
|
149
|
+
WCAG 2.2 1.1.1 Non-text Content (level A): all non-text content that is presented to the user has a text alternative that serves the equivalent purpose. For a chart, the text alternative states the message (the title's finding), the type of chart and the trend that supports it, including anything the chart shows only through color or annotation; a chart drawn as an svg or canvas has it through a name or a description in the page (our claim). Giving the data itself as a table next to the chart, or behind a link, is part of this rule (our claim).
|
|
150
|
+
why: >-
|
|
151
|
+
A person who cannot see the chart gets the same message only from text; a text alternative that only repeats the title, or lists every point, does not serve the equivalent purpose.
|
|
152
|
+
origin: norm
|
|
153
|
+
source: >-
|
|
154
|
+
W3C, Web Content Accessibility Guidelines (WCAG) 2.2, Understanding Success Criterion 1.1.1: Non-text Content, https://www.w3.org/WAI/WCAG22/Understanding/non-text-content.html (sections "Success Criterion" and "Examples", "A data chart", opened 2026-11-26): the criterion text quoted in the rule, level A; the chart example gives a short label and a longer description that identifies the type of chart and summarizes the data, trends and implications, and provides the actual data in a table where possible and practical. Related: Government Analysis Function (UK), Data visualisation: charts, https://analysisfunction.civilservice.gov.uk/policy-store/data-visualisation-charts/ (section "Alternative text", opened 2026-11-26): the text description says what users should understand from the chart, not a literal description of every point.
|
|
155
|
+
when_to_break: >-
|
|
156
|
+
No break waives 1.1.1. A chart that is pure decoration (a sparkline whose trend is written in the text next to it) may be hidden from assistive technology, because the text next to it carries the information.
|
|
157
|
+
break_effect: >-
|
|
158
|
+
Not applicable: the criterion is a norm of level A.
|
|
159
|
+
test: >-
|
|
160
|
+
The reviewer finds the text alternative of every chart in the code (its name, its description, the text under it) and checks that it states the finding of the title; a chart with no text alternative is a finding.
|
|
161
|
+
example: >-
|
|
162
|
+
A bar chart followed by the sentence "Bar chart: the north region sold the most in 2026, ahead of the south and the centre" and a link to the data as a table.
|
|
163
|
+
counterexample: >-
|
|
164
|
+
A canvas chart with no name at all, or an image whose alternative text is "chart".
|
|
165
|
+
|
|
166
|
+
- id: DC8
|
|
167
|
+
name: Labels people read, with units and their number format
|
|
168
|
+
area: data
|
|
169
|
+
moment: create
|
|
170
|
+
skill: lazuli-data-charts-and-dashboards
|
|
171
|
+
rule: >-
|
|
172
|
+
Set every chart label (axis ticks, series names, values, annotations) at a size people read at every width the page runs at, written horizontally, never scaled down with the chart. Every number carries its unit, and numbers use the audience's format: the thousands and decimal marks of their language, their currency sign. The size the kit uses is the hypothesis H1 in `HYPOTHESES.md` of this area.
|
|
173
|
+
why: >-
|
|
174
|
+
A chart scaled to fit a phone shrinks its text with it, and a label nobody can read hides the message; a number without a unit or in a foreign format is misread even when it is legible. (our claim)
|
|
175
|
+
origin: hypothesis
|
|
176
|
+
status: hypothesis
|
|
177
|
+
hypothesis: H1
|
|
178
|
+
source: >-
|
|
179
|
+
Our claim: the size is the round starting value of H1, set before any chart was measured. Related reading, not the source of the size and never a reason to move it: Government Analysis Function (UK), Data visualisation: charts, https://analysisfunction.civilservice.gov.uk/policy-store/data-visualisation-charts/ (section "Chart labels", opened 2026-11-26) asks for a large enough font for all labels, says it is not possible to suggest a specific minimum font size because images are resized when published, asks for horizontal text on axes, and for separators of thousands.
|
|
180
|
+
when_to_break: >-
|
|
181
|
+
A dense chart for a large screen only (a control room wall) may set smaller labels, declared with break-a-rule first, when the page never runs at a small width.
|
|
182
|
+
break_effect: >-
|
|
183
|
+
More labels fit, at the cost of the readers who view the chart closer or smaller than planned.
|
|
184
|
+
test: >-
|
|
185
|
+
The reviewer reads the font size of chart labels in the code at the smallest width against H1 and checks that every number has a unit and the audience's format; the first look on the rendered page at the smallest width says whether the labels can be read. check-design reads the rendered size of svg chart labels (DR2).
|
|
186
|
+
example: >-
|
|
187
|
+
An axis that reads "R$ 1.200 mil" for a Brazilian audience, with tick labels that stay the same size when the chart narrows.
|
|
188
|
+
counterexample: >-
|
|
189
|
+
An svg chart scaled with its viewBox, whose tick labels shrink to a blur on a phone and read "1200000" with no unit.
|