@uselazuli/cli 1.0.1 → 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 +22 -0
- package/README.md +3 -3
- package/bin/lazuli.mjs +67 -19
- package/package.json +1 -1
- package/rules/content/HYPOTHESES.md +3 -2
- package/rules/content/review.yaml +33 -2
- package/rules/graphic/HYPOTHESES.md +1 -0
- package/rules/graphic/review.yaml +29 -0
- package/rules/motion/HYPOTHESES.md +3 -3
- package/rules/motion/review.yaml +4 -4
- package/rules/typography/HYPOTHESES.md +1 -1
- package/rules/typography/review.yaml +2 -2
- package/rules/ui/HYPOTHESES.md +1 -1
- package/rules/ui/compose.yaml +27 -0
- package/rules/ui/review.yaml +2 -1
- package/skills/lazuli/SKILL.md +8 -5
- package/skills/lazuli/procedures/review-design.md +1 -0
- package/skills/lazuli/procedures/show-options.md +2 -1
- package/skills/lazuli-content-voice/SKILL.md +1 -0
- package/skills/lazuli-graphic-identity/SKILL.md +3 -1
- package/skills/lazuli-ui-composition/SKILL.md +4 -4
- package/skills/lazuli-ui-layout-review/SKILL.md +2 -2
- package/src/browser.mjs +2 -1
- package/src/commands/catalog.mjs +1 -1
- package/src/commands/check-design.mjs +51 -16
- package/src/commands/compare-designs.mjs +65 -2
- package/src/commands/draft-memo.mjs +4 -3
- package/src/commands/hooks.mjs +7 -5
- package/src/commands/record-log.mjs +54 -25
- package/src/commands/render-options.mjs +78 -15
- package/src/measure/a11y.mjs +8 -0
- package/src/measure/cases.mjs +22 -5
- package/src/measure/color.mjs +7 -0
- package/src/measure/in-page/a11y.js +33 -0
- package/src/measure/in-page/color.js +3 -1
- package/src/measure/in-page/extreme.js +28 -6
- package/src/measure/in-page/motion-probe.js +2 -0
- package/src/measure/in-page/type.js +3 -0
- package/src/measure/layout.mjs +9 -0
- package/src/measure/motion.mjs +2 -1
- package/src/measure/registry.mjs +3 -2
- package/src/measure/timeline.mjs +5 -5
- package/src/project/gate.mjs +12 -3
- package/src/project/lazuli-md.mjs +27 -3
- package/src/project/log.mjs +16 -10
- package/src/project/match.mjs +93 -5
- package/src/report/evaluators/a11y.mjs +21 -0
- package/src/report/evaluators/color.mjs +48 -1
- package/src/report/evaluators/extreme.mjs +43 -9
- package/src/report/evaluators/layout.mjs +10 -1
- package/src/report/evaluators/motion.mjs +10 -3
- package/src/report/evaluators/type.mjs +6 -3
- package/src/report/format.mjs +4 -4
- package/src/rules/load.mjs +18 -0
- package/src/rules/schema.mjs +8 -0
- package/templates/LAZULI.md +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.2
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- An options goal in `LAZULI.md` can take a file glob as its Target, so one goal covers a folder of options. Breaks and decisions can name one file of the folder with a Target. A glob that matches no file is ignored, and a glob is never read as a screen by `--site`, the post-edit hook or the gate.
|
|
8
|
+
- Declared moves: a rule lists in `declared_by` the moves that can explain its finding. A move is declared for a piece with `record-decision --rule "<move> followed"` or broken, or with a break on the move, and the hint becomes level `declared` only where the move is measured, with the original message kept as the first evidence line. An option where the move is not measured keeps its hint and says so.
|
|
9
|
+
- UC9: two blocks in deliberate tension, read by UR3. It holds when the two largest blocks of the first view lead the third at the UR3 cutoff; with only two blocks it does not hold, and the UR3 hint stays.
|
|
10
|
+
- GR10: the first view shows a Brand color.
|
|
11
|
+
- CR14: proof images keep the look of the original, and large images that were recolored are named.
|
|
12
|
+
- `--height <px>` on `check-design` and `render-options` (100 to 10000, 900 by default; not with `--asset`). Anything else exits 2 with a usage message. Earlier widths in `options.json` are kept only when read at the same height; an `options.json` from 1.0.1 counts as 900, and a dropped width is said.
|
|
13
|
+
- `--screens <n>` on `render-options`: the thumbnail on the options sheet shows the first n screens, and says so. Measures read the first view.
|
|
14
|
+
- `compare-designs --options <folder>` places a folder of options from near to far, read at 1440 by default and at the `--height` you give.
|
|
15
|
+
- `render-options --baseline <url-or-path>` adds each option's distance from a page, read at the same height as the options.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- CR7 and CR8 group longer-text cases by element, and a declared UC1 bleed is named, not counted as an accident. A word past the edge bleeds at rest only where the page does not scroll sideways. On a page that hides its sideways overflow they say how much text runs past the clipped right edge, not that the page scrolls sideways.
|
|
20
|
+
- TR2 checks display type (the WCAG large scale) for the upper bound only.
|
|
21
|
+
- RV2 says when failing text is hidden from assistive technology.
|
|
22
|
+
- MR3 skips scroll-linked animations, and MR1 and MR2 no longer count them as a transition that finishes in time. The motion scroll step is one wheel of the page's viewport height.
|
|
23
|
+
- `set-goals` logs a goal change with `record-decision --rule none`.
|
|
24
|
+
|
|
3
25
|
## 1.0.1
|
|
4
26
|
|
|
5
27
|
### Fixed
|
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ A design kit for AI agents. Lazuli turns design knowledge into rules an agent ca
|
|
|
8
8
|
|
|
9
9
|
## Status
|
|
10
10
|
|
|
11
|
-
Version 1.0.
|
|
11
|
+
Version 1.0.2. Nine areas are available: color, typography, accessibility, UI, UX, graphic design, motion, content and data.
|
|
12
12
|
|
|
13
13
|
Every rule that uses a number says where the number comes from: it is a norm (a standard such as WCAG) or a hypothesis, labeled with its id in that area's `HYPOTHESES.md`. A hypothesis is a claim to test with people, and the report shows it as a hint, never as a failure.
|
|
14
14
|
|
|
@@ -102,7 +102,7 @@ Available now:
|
|
|
102
102
|
| `/lazuli remember-this` | Turns a correction into a rule in `.lazuli/rules/learned.yaml`, with a condition and a test. |
|
|
103
103
|
| `/lazuli explain-decisions` | Runs `draft-memo`, then writes `DECISIONS.md` for the client and updates `DESIGN.md`. |
|
|
104
104
|
|
|
105
|
-
Agent helpers, which the procedures above call through the CLI (they are not slash commands): `list-rules`, `record-break`, `record-decision`, `capture`, `record-first-look`, `record-review`, `check-goals`, `draft-memo`, `render-options
|
|
105
|
+
Agent helpers, which the procedures above call through the CLI (they are not slash commands): `list-rules`, `record-break`, `record-decision`, `capture`, `record-first-look`, `record-review`, `check-goals`, `draft-memo`, `render-options` (`--height` sets the viewport height, `--screens` shows the first screens of each option on the sheet, `--baseline` adds each option's distance from a page), `compare-designs` (`--options <folder>` places a folder of options from near to far), `map-page`, `record-task`. Run `lazuli --help` for what each one does, or `lazuli <command> --help` for one command's options (from a checkout, `node bin/lazuli.mjs <command> --help`).
|
|
106
106
|
|
|
107
107
|
Examples:
|
|
108
108
|
|
|
@@ -113,7 +113,7 @@ node bin/lazuli.mjs check-design ./index.html
|
|
|
113
113
|
/lazuli break-a-rule hero
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
-
`check-design` accepts a file path or a URL (a bare `example.com` opens as https, `localhost:3000` as http), `--width 1440,390` to test several viewports, `--area color` to run only some areas (a comma list; an unknown name exits 2 and lists the known areas), and `--json` for machine output. More screens of the same product can follow the first target (`check-design ./index.html ./about.html ./pricing.html`), and `--site` adds the `Target` line of every page goal in `LAZULI.md` (a goal with a `Size:` line or a symbol or image Target is a piece, not a screen). Page findings stay for the first target; findings that compare the screens are marked "across N screens" in the same area block. `--site` with fewer than two distinct screens exits 2. Mark your main action with `data-primary`; without it the report names its guess as a guess. Exit code 0 means no failures, 1 means at least one failure or a norm that could not be checked because its measurer failed (the report names those norms), 2 means bad usage, a missing file or no browser. `start-project` also runs from a terminal (`node bin/lazuli.mjs start-project`). `set-goals`, `show-options`, `break-a-rule`, `create`, `improve`, `review-design`, `remember-this` and `explain-decisions` run inside your agent; from a terminal they print a pointer.
|
|
116
|
+
`check-design` accepts a file path or a URL (a bare `example.com` opens as https, `localhost:3000` as http), `--width 1440,390` to test several viewports, `--height 844` to read a phone's first view at that height (100 to 10000 px, 900 by default; not with `--asset`), `--area color` to run only some areas (a comma list; an unknown name exits 2 and lists the known areas), and `--json` for machine output. More screens of the same product can follow the first target (`check-design ./index.html ./about.html ./pricing.html`), and `--site` adds the `Target` line of every page goal in `LAZULI.md` (a goal with a `Size:` line or a symbol or image Target is a piece, not a screen). Page findings stay for the first target; findings that compare the screens are marked "across N screens" in the same area block. `--site` with fewer than two distinct screens exits 2. Mark your main action with `data-primary`; without it the report names its guess as a guess. Exit code 0 means no failures, 1 means at least one failure or a norm that could not be checked because its measurer failed (the report names those norms), 2 means bad usage, a missing file or no browser. `start-project` also runs from a terminal (`node bin/lazuli.mjs start-project`). `set-goals`, `show-options`, `break-a-rule`, `create`, `improve`, `review-design`, `remember-this` and `explain-decisions` run inside your agent; from a terminal they print a pointer.
|
|
117
117
|
|
|
118
118
|
`check-design --asset <file-or-url>` checks one asset instead of a page. An SVG is a symbol; a PNG or ICO is a symbol, or a piece when it has sizes; an HTML file is a piece; a JPG or WebP is a rendered piece. A piece takes its canvas sizes from the `Size:` line of the goal whose `Target` is the asset, or from `--size 1200x630` (a comma list such as `16,32,180`); `--size` wins over `Size:`, and on a symbol it is ignored with a note. A URL whose path has no known extension is read by its content type. Only the asset measurers of that kind run, and the report shows only the areas with a rule they read unless `--area` names others; a page run never runs them and leaves out an area whose measured rules all read assets. A remote asset is fetched as bytes and never opened as a page, so nothing in it runs: redirects are followed for at most 5 hops and never to another scheme, from a public host to a private address (judged by the host name as written) or to a checkout page, and a file over 10 MB is refused. Each request asks for the first 10 MB only (a Range header), but a server may ignore that, so a large file may be downloaded before it is refused. An HTML piece is the one kind of asset opened as a page. Images the measurers render go to `.lazuli/assets/<key>/` and the report lists them under `Files written:`. An asset report reads `Asset:` and `Sizes:` where a page report reads `Target:` and `Widths:`, and a finding's `width`, in the text and in `--json`, is a size label such as `"1200x630"` or `"512 to 16"`, not a number. A piece with no size, another file type, a missing file or an asset that cannot be loaded exits 2 with a message; a page target, `--site` and `--width` do not combine with `--asset`.
|
|
119
119
|
|
package/bin/lazuli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import { checkDesign } from "../src/commands/check-design.mjs";
|
|
4
|
+
import { checkDesign, checkHeight } from "../src/commands/check-design.mjs";
|
|
5
5
|
import { startProject } from "../src/commands/start-project.mjs";
|
|
6
6
|
import { install, defaultTarget, resolveAgentsTarget } from "../src/commands/install.mjs";
|
|
7
7
|
import { listRules, formatRules } from "../src/commands/list-rules.mjs";
|
|
@@ -10,8 +10,8 @@ import { capture } from "../src/commands/capture.mjs";
|
|
|
10
10
|
import { recordFirstLook, recordReview } from "../src/commands/record-answers.mjs";
|
|
11
11
|
import { checkGoals, formatGate } from "../src/commands/check-goals.mjs";
|
|
12
12
|
import { draftMemo } from "../src/commands/draft-memo.mjs";
|
|
13
|
-
import { optionLabel, renderOptions } from "../src/commands/render-options.mjs";
|
|
14
|
-
import { compareDesigns, formatCompare } from "../src/commands/compare-designs.mjs";
|
|
13
|
+
import { droppedLine, optionLabel, renderOptions, screensNote } from "../src/commands/render-options.mjs";
|
|
14
|
+
import { compareDesigns, compareOptions, formatCompare, formatCompareOptions } from "../src/commands/compare-designs.mjs";
|
|
15
15
|
import { mapPage } from "../src/commands/map-page.mjs";
|
|
16
16
|
import { recordTaskStep } from "../src/commands/record-task.mjs";
|
|
17
17
|
import { handlePostEdit, handleStop } from "../src/commands/hooks.mjs";
|
|
@@ -24,19 +24,19 @@ import { parseSizes } from "../src/project/lazuli-md.mjs";
|
|
|
24
24
|
const USAGE = {
|
|
25
25
|
"start-project": ["Usage: lazuli start-project [--mode director|delegate]"],
|
|
26
26
|
"check-design": [
|
|
27
|
-
"Usage: lazuli check-design <url-or-path> [<more screens>...] [--site] [--width 1440,390] [--area color,typography] [--json] [--out <file>]",
|
|
27
|
+
"Usage: lazuli check-design <url-or-path> [<more screens>...] [--site] [--width 1440,390] [--height <px>] [--area color,typography] [--json] [--out <file>]",
|
|
28
28
|
" lazuli check-design --asset <file-or-url> [--size 1200x630] [--area graphic] [--json] [--out <file>]",
|
|
29
29
|
],
|
|
30
30
|
capture: ["Usage: lazuli capture <url-or-path> [--width 1440,390]"],
|
|
31
31
|
"check-goals": ["Usage: lazuli check-goals [<url-or-path>]"],
|
|
32
32
|
"draft-memo": ["Usage: lazuli draft-memo [<url-or-path>] [--out <file>]"],
|
|
33
33
|
"list-rules": ["Usage: lazuli list-rules [--moment create] [--area color,project] [--json]"],
|
|
34
|
-
"render-options": ["Usage: lazuli render-options <folder> [--width 1440
|
|
35
|
-
"compare-designs": ["Usage: lazuli compare-designs <url-or-path> --baseline <url-or-path> [--width 1440,390] [--json]"],
|
|
34
|
+
"render-options": ["Usage: lazuli render-options <folder> [--width 1440,390] [--height <px>] [--screens <n>] [--baseline <url-or-path>] [--json]"],
|
|
35
|
+
"compare-designs": ["Usage: lazuli compare-designs <url-or-path> --baseline <url-or-path> [--width 1440,390] [--json]", " lazuli compare-designs --options <folder> --baseline <url-or-path> [--width 1440] [--height <px>] [--json]"],
|
|
36
36
|
"map-page": ["Usage: lazuli map-page <url-or-path> --piece <name> [--width 390]", " lazuli map-page --task <id> [<url-or-path>]"],
|
|
37
37
|
"record-task": ["Usage: lazuli record-task --file <json>"],
|
|
38
|
-
"record-break": ["Usage: lazuli record-break --rule <id>[,<id>...] --piece <name> [--effect <text>] [--check <text>] --status trying|kept|reverted"],
|
|
39
|
-
"record-decision": ['Usage: lazuli record-decision --decision <text> --piece <name> --goal <text> --rule "<id> followed|broken|accepted|none" --measure <text>'],
|
|
38
|
+
"record-break": ["Usage: lazuli record-break --rule <id>[,<id>...] --piece <name> [--target <path>] [--effect <text>] [--check <text>] --status trying|kept|reverted"],
|
|
39
|
+
"record-decision": ['Usage: lazuli record-decision --decision <text> --piece <name> [--target <path>] --goal <text> --rule "<id> followed|broken|accepted|none" --measure <text>'],
|
|
40
40
|
"record-first-look": ["Usage: lazuli record-first-look --file <json>"],
|
|
41
41
|
"record-review": ["Usage: lazuli record-review --file <json>"],
|
|
42
42
|
install: ["Usage: lazuli install [--target <dir>] [--agents-target <dir>]"],
|
|
@@ -143,11 +143,23 @@ async function runInstallHooks(rest) {
|
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
+
// A --height value: the number, or { error } with the usage message. Never a silent default.
|
|
147
|
+
function parseHeight(raw) {
|
|
148
|
+
const height = /^[0-9]+$/.test(raw ?? "") ? Number(raw) : NaN;
|
|
149
|
+
try {
|
|
150
|
+
checkHeight(height);
|
|
151
|
+
return { height };
|
|
152
|
+
} catch (err) {
|
|
153
|
+
return { error: err.message };
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
146
157
|
function parseCheckArgs(args) {
|
|
147
158
|
let target;
|
|
148
159
|
const screens = [];
|
|
149
160
|
let site = false;
|
|
150
161
|
let widths;
|
|
162
|
+
let height;
|
|
151
163
|
let areas;
|
|
152
164
|
let json = false;
|
|
153
165
|
let asset;
|
|
@@ -179,6 +191,10 @@ function parseCheckArgs(args) {
|
|
|
179
191
|
return { error: "--width needs a comma list of pixel widths, for example --width 1440,390." };
|
|
180
192
|
}
|
|
181
193
|
widths = parts.map(Number);
|
|
194
|
+
} else if (a === "--height") {
|
|
195
|
+
const parsed = parseHeight(args[++i]);
|
|
196
|
+
if (parsed.error) return parsed;
|
|
197
|
+
height = parsed.height;
|
|
182
198
|
} else if (a === "--area") {
|
|
183
199
|
const raw = args[++i];
|
|
184
200
|
const parts = (raw ?? "").split(",");
|
|
@@ -198,10 +214,11 @@ function parseCheckArgs(args) {
|
|
|
198
214
|
if (asset !== undefined) {
|
|
199
215
|
if (target) return { error: "check-design --asset checks one asset; give no page target with it." };
|
|
200
216
|
if (site || widths) return { error: "--site and --width do not apply to --asset; a piece takes its size from Size: or --size." };
|
|
217
|
+
if (height !== undefined) return { error: "--height does not apply to --asset; a piece takes its size from Size: or --size." };
|
|
201
218
|
return { asset, sizes, areas, json, copyTo };
|
|
202
219
|
}
|
|
203
220
|
if (!target) return { error: "check-design needs a URL or an HTML file path." };
|
|
204
|
-
return { target, screens, site, widths, areas, json, copyTo };
|
|
221
|
+
return { target, screens, site, widths, height, areas, json, copyTo };
|
|
205
222
|
}
|
|
206
223
|
|
|
207
224
|
function parseCaptureArgs(args) {
|
|
@@ -333,12 +350,12 @@ async function main(argv) {
|
|
|
333
350
|
try {
|
|
334
351
|
const result = parsed.asset
|
|
335
352
|
? await checkDesign({ asset: parsed.asset, ...(parsed.sizes ? { sizes: parsed.sizes } : {}), ...(parsed.areas ? { areas: parsed.areas } : {}), ...(parsed.copyTo ? { copyTo: parsed.copyTo } : {}) })
|
|
336
|
-
: await checkDesign({ target: parsed.target, screens: parsed.screens, site: parsed.site, ...(parsed.widths ? { widths: parsed.widths } : {}), ...(parsed.areas ? { areas: parsed.areas } : {}), ...(parsed.copyTo ? { copyTo: parsed.copyTo } : {}) });
|
|
353
|
+
: await checkDesign({ target: parsed.target, screens: parsed.screens, site: parsed.site, ...(parsed.widths ? { widths: parsed.widths } : {}), ...(parsed.height ? { height: parsed.height } : {}), ...(parsed.areas ? { areas: parsed.areas } : {}), ...(parsed.copyTo ? { copyTo: parsed.copyTo } : {}) });
|
|
337
354
|
console.log(parsed.json ? JSON.stringify(result, null, 2) : formatReport(result));
|
|
338
355
|
// A norm that could not be checked (its measurer failed) exits 1 like a fail.
|
|
339
356
|
return result.findings.some((f) => f.level === "fail") || result.uncheckedNorms?.length > 0 ? 1 : 0;
|
|
340
357
|
} catch (err) {
|
|
341
|
-
const known = err?.code === "BROWSER_NOT_FOUND" || err?.code === "FILE_NOT_FOUND" || err?.code === "UNKNOWN_AREA" || err?.code === "RULES_DIR_NOT_FOUND" || err?.code === "SCREENS_INPUT" || err?.code === "ASSET_INPUT";
|
|
358
|
+
const known = err?.code === "BROWSER_NOT_FOUND" || err?.code === "FILE_NOT_FOUND" || err?.code === "UNKNOWN_AREA" || err?.code === "RULES_DIR_NOT_FOUND" || err?.code === "SCREENS_INPUT" || err?.code === "ASSET_INPUT" || err?.code === "HEIGHT_INPUT";
|
|
342
359
|
console.error(known ? err.message : `Error: ${err?.message ?? err}`);
|
|
343
360
|
return 2;
|
|
344
361
|
}
|
|
@@ -457,12 +474,18 @@ async function main(argv) {
|
|
|
457
474
|
if (cmd === "render-options") {
|
|
458
475
|
let folder;
|
|
459
476
|
let widths;
|
|
477
|
+
let height;
|
|
478
|
+
let screens;
|
|
479
|
+
let baseline;
|
|
460
480
|
let json = false;
|
|
461
481
|
let error;
|
|
462
482
|
for (let i = 0; i < rest.length && !error; i++) {
|
|
463
483
|
const a = rest[i];
|
|
464
484
|
if (a === "--json") {
|
|
465
485
|
json = true;
|
|
486
|
+
} else if (a === "--baseline") {
|
|
487
|
+
baseline = rest[++i];
|
|
488
|
+
if (!baseline || baseline.startsWith("--")) error = "--baseline needs a URL or an HTML file path made without the kit for the same brief.";
|
|
466
489
|
} else if (a === "--width") {
|
|
467
490
|
const raw = rest[++i];
|
|
468
491
|
const parts = (raw ?? "").split(",");
|
|
@@ -471,6 +494,14 @@ async function main(argv) {
|
|
|
471
494
|
} else {
|
|
472
495
|
widths = [...new Set(parts.map(Number))];
|
|
473
496
|
}
|
|
497
|
+
} else if (a === "--height") {
|
|
498
|
+
const parsed = parseHeight(rest[++i]);
|
|
499
|
+
if (parsed.error) error = parsed.error;
|
|
500
|
+
else height = parsed.height;
|
|
501
|
+
} else if (a === "--screens") {
|
|
502
|
+
const raw = rest[++i];
|
|
503
|
+
if (!/^[0-9]+$/.test(raw ?? "") || Number(raw) < 1) error = "--screens needs a whole number of 1 or more, for example --screens 3.";
|
|
504
|
+
else screens = Number(raw);
|
|
474
505
|
} else if (a.startsWith("--")) {
|
|
475
506
|
error = `Unknown option ${a}.`;
|
|
476
507
|
} else if (folder === undefined) {
|
|
@@ -486,22 +517,23 @@ async function main(argv) {
|
|
|
486
517
|
return 2;
|
|
487
518
|
}
|
|
488
519
|
try {
|
|
489
|
-
const r = await renderOptions({ folder, ...(widths ? { widths } : {}) });
|
|
520
|
+
const r = await renderOptions({ folder, ...(widths ? { widths } : {}), ...(height ? { height } : {}), ...(screens ? { screens } : {}), ...(baseline ? { baseline } : {}) });
|
|
490
521
|
if (json) {
|
|
491
522
|
console.log(JSON.stringify(r, null, 2));
|
|
492
523
|
} else {
|
|
493
|
-
const lines = r.widths.map((w) => `Sheet at ${w} px: ${r.sheets[String(w)]}`);
|
|
524
|
+
const lines = r.widths.filter((w) => r.sheets[String(w)]).map((w) => `Sheet at ${w} px: ${r.sheets[String(w)]}`);
|
|
494
525
|
for (const o of r.options) {
|
|
495
|
-
lines.push(`${o.file} ${r.widths.map((w) => `${w}: ${optionLabel(o.measures[String(w)], o.findings.filter((f) => f.width === w), o.notes?.[String(w)]).join("; ")}`).join(" | ")}`);
|
|
526
|
+
lines.push(`${o.file} ${r.widths.map((w) => `${w}: ${optionLabel(o.measures[String(w)], o.findings.filter((f) => f.width === w), o.notes?.[String(w)], screensNote(r.screensAt?.[String(w)] ?? r.screens, r.height), o.distances?.[String(w)]).join("; ")}`).join(" | ")}`);
|
|
496
527
|
}
|
|
497
528
|
if (r.kept?.length) lines.push(...r.kept.map((w) => `Kept the earlier measures at ${w} px.`));
|
|
498
|
-
if (r.dropped?.length) lines.push(...r.dropped.map((w) =>
|
|
529
|
+
if (r.dropped?.length) lines.push(...r.dropped.map((w) => droppedLine(r, w)));
|
|
530
|
+
if (r.missingSheets?.length) lines.push(...r.missingSheets.map((w) => `The earlier sheet at ${w} px is missing; run that width again.`));
|
|
499
531
|
lines.push(`Measures: ${r.jsonPath}`);
|
|
500
532
|
console.log(lines.join("\n"));
|
|
501
533
|
}
|
|
502
534
|
return 0;
|
|
503
535
|
} catch (err) {
|
|
504
|
-
const known = err?.code === "OPTIONS_INPUT" || err?.code === "BROWSER_NOT_FOUND" || err?.code === "RULES_DIR_NOT_FOUND";
|
|
536
|
+
const known = err?.code === "OPTIONS_INPUT" || err?.code === "HEIGHT_INPUT" || err?.code === "COMPARE_INPUT" || err?.code === "FILE_NOT_FOUND" || err?.code === "BROWSER_NOT_FOUND" || err?.code === "RULES_DIR_NOT_FOUND";
|
|
505
537
|
console.error(known ? err.message : `Error: ${err?.message ?? err}`);
|
|
506
538
|
return 2;
|
|
507
539
|
}
|
|
@@ -509,6 +541,8 @@ async function main(argv) {
|
|
|
509
541
|
if (cmd === "compare-designs") {
|
|
510
542
|
let target;
|
|
511
543
|
let baseline;
|
|
544
|
+
let options;
|
|
545
|
+
let height;
|
|
512
546
|
let widths;
|
|
513
547
|
let json = false;
|
|
514
548
|
let error;
|
|
@@ -516,6 +550,13 @@ async function main(argv) {
|
|
|
516
550
|
const a = rest[i];
|
|
517
551
|
if (a === "--json") {
|
|
518
552
|
json = true;
|
|
553
|
+
} else if (a === "--height") {
|
|
554
|
+
const parsed = parseHeight(rest[++i]);
|
|
555
|
+
if (parsed.error) error = parsed.error;
|
|
556
|
+
else height = parsed.height;
|
|
557
|
+
} else if (a === "--options") {
|
|
558
|
+
options = rest[++i];
|
|
559
|
+
if (!options || options.startsWith("--")) error = "--options needs the folder that holds the option HTML files.";
|
|
519
560
|
} else if (a === "--baseline") {
|
|
520
561
|
baseline = rest[++i];
|
|
521
562
|
if (!baseline || baseline.startsWith("--")) error = "--baseline needs a URL or an HTML file path made without the kit for the same brief.";
|
|
@@ -535,7 +576,9 @@ async function main(argv) {
|
|
|
535
576
|
error = "compare-designs takes one target; give the baseline with --baseline.";
|
|
536
577
|
}
|
|
537
578
|
}
|
|
538
|
-
if (!error &&
|
|
579
|
+
if (!error && height !== undefined && options === undefined) error = "--height goes with --options: it is the viewport height each option is read at.";
|
|
580
|
+
if (!error && options !== undefined && target !== undefined) error = "compare-designs takes a target or --options <folder>, not both.";
|
|
581
|
+
if (!error && target === undefined && options === undefined) error = "compare-designs needs a URL or an HTML file path.";
|
|
539
582
|
if (!error && baseline === undefined) error = "compare-designs needs --baseline <url-or-path>, a page made without the kit for the same brief.";
|
|
540
583
|
if (error) {
|
|
541
584
|
console.error(error);
|
|
@@ -543,6 +586,11 @@ async function main(argv) {
|
|
|
543
586
|
return 2;
|
|
544
587
|
}
|
|
545
588
|
try {
|
|
589
|
+
if (options !== undefined) {
|
|
590
|
+
const many = await compareOptions({ folder: options, baseline, ...(widths ? { widths } : {}), ...(height ? { height } : {}) });
|
|
591
|
+
console.log(json ? JSON.stringify(many, null, 2) : formatCompareOptions(many));
|
|
592
|
+
return 0;
|
|
593
|
+
}
|
|
546
594
|
const r = await compareDesigns({ target, baseline, ...(widths ? { widths } : {}) });
|
|
547
595
|
console.log(json ? JSON.stringify(r, null, 2) : formatCompare(r));
|
|
548
596
|
return 0;
|
|
@@ -610,7 +658,7 @@ async function main(argv) {
|
|
|
610
658
|
});
|
|
611
659
|
}
|
|
612
660
|
if (cmd === "record-break") {
|
|
613
|
-
return runRecord(rest, ["rule", "piece", "effect", "check", "status"], ["rule", "piece", "status"],
|
|
661
|
+
return runRecord(rest, ["rule", "piece", "target", "effect", "check", "status"], ["rule", "piece", "status"],
|
|
614
662
|
"record-break",
|
|
615
663
|
async (v) => {
|
|
616
664
|
const r = await recordBreak({ cwd: process.cwd(), ...v });
|
|
@@ -619,7 +667,7 @@ async function main(argv) {
|
|
|
619
667
|
});
|
|
620
668
|
}
|
|
621
669
|
if (cmd === "record-decision") {
|
|
622
|
-
return runRecord(rest, ["decision", "piece", "goal", "rule", "measure"], ["decision", "piece", "goal", "rule", "measure"],
|
|
670
|
+
return runRecord(rest, ["decision", "piece", "target", "goal", "rule", "measure"], ["decision", "piece", "goal", "rule", "measure"],
|
|
623
671
|
"record-decision",
|
|
624
672
|
async (v) => {
|
|
625
673
|
const r = await recordDecision({ cwd: process.cwd(), ...v });
|
package/package.json
CHANGED
|
@@ -12,7 +12,8 @@ Where a row or a rule cites the kit author's internal product plan, that plan is
|
|
|
12
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
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
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. 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. 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 |
|
|
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
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
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 |
|
|
@@ -182,12 +182,13 @@
|
|
|
182
182
|
Our claim: the factor is the round starting value of H7, set before any page was measured; the H7 row says how and lists what was observed afterwards, which is not evidence.
|
|
183
183
|
measure: extreme.growth
|
|
184
184
|
threshold: { growth: 1.3 }
|
|
185
|
+
declared_by: [UC1]
|
|
185
186
|
when_to_break: >-
|
|
186
187
|
A page that will never be translated and whose text is fixed by the product, declared with break-a-rule first.
|
|
187
188
|
break_effect: >-
|
|
188
189
|
Tighter boxes where the text cannot change, at the cost of a fix if it ever does.
|
|
189
190
|
test: >-
|
|
190
|
-
The cases run on a script-free copy of the page and report only what the case adds: at each width check-design loads the copy untouched and with every visible text grown, and compares them. Hint when the grown copy adds a sideways scroll, a text that spills out of its box, a text cut or cut away, or a pair of texts that overlap, naming each; pass when it adds none; nothing when the case did not run. 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 never tested; inline elements moved by position relative or negative margins inside one block are never compared for overlap; 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.
|
|
191
|
+
The cases run on a script-free copy of the page and report only what the case adds: at each width check-design loads the copy untouched and with every visible text grown, and compares them. Hint when the grown copy adds a sideways scroll, a text that spills out of its box, a text cut or cut away, or a pair of texts that overlap, naming each; pass when it adds none; nothing when the case did not run. 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 never tested; inline elements moved by position relative or negative margins inside one block are never compared for overlap; 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. What the case adds is grouped by element, one line each, marked (bleeds at rest) when its box already crossed the left or right edge of the viewport in the untouched copy, on a page that does not scroll sideways at rest (the gate of the layout bleeds); a page whose html or body hides horizontal overflow does not scroll, so there the case says how much further text runs past the clipped right edge instead of a sideways scroll; for either, the texts past the right edge that were not past it at rest, or run further past it, are named. With UC1 followed or broken for the piece, the hint becomes declared only when every element that breaks already bleeds at rest and a sideways scroll or text past the clipped right edge is named by one of them; otherwise it stays a hint and names the elements that do not bleed at rest; on a page where no text bleeds at rest the move is not measured.
|
|
191
192
|
example: >-
|
|
192
193
|
Buttons that wrap a longer label onto two lines and keep all of it.
|
|
193
194
|
counterexample: >-
|
|
@@ -208,12 +209,13 @@
|
|
|
208
209
|
source: >-
|
|
209
210
|
Our claim, a hint only (H8): no number is used as a cutoff; the three samples were written before any page was measured, and the H8 row lists what was observed afterwards, which is not evidence.
|
|
210
211
|
measure: extreme.long-text
|
|
212
|
+
declared_by: [UC1]
|
|
211
213
|
when_to_break: >-
|
|
212
214
|
A page whose text is fixed and never arrives from content, declared with break-a-rule first.
|
|
213
215
|
break_effect: >-
|
|
214
216
|
Boxes sized to the fixed text, at the cost of a fix if the text ever changes.
|
|
215
217
|
test: >-
|
|
216
|
-
The cases run on a script-free copy of the page and report only what the case adds: at each width check-design loads the copy untouched and with the long samples in labels, headings and the other text, and compares them. Hint when the case adds a sideways scroll, a spill, a cut, a text cut away or an overlap, naming each; pass when it adds none; nothing when the case did not run. Inputs, placeholders and text drawn in images, canvas or SVG are not filled; 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 never tested; inline elements moved by position relative or negative margins inside one block are never compared for overlap; 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.
|
|
218
|
+
The cases run on a script-free copy of the page and report only what the case adds: at each width check-design loads the copy untouched and with the long samples in labels, headings and the other text, and compares them. Hint when the case adds a sideways scroll, a spill, a cut, a text cut away or an overlap, naming each; pass when it adds none; nothing when the case did not run. Inputs, placeholders and text drawn in images, canvas or SVG are not filled; 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 never tested; inline elements moved by position relative or negative margins inside one block are never compared for overlap; 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. What the case adds is grouped by element, one line each, marked (bleeds at rest) when its box already crossed the left or right edge of the viewport in the untouched copy, on a page that does not scroll sideways at rest (the gate of the layout bleeds); a page whose html or body hides horizontal overflow does not scroll, so there the case says how much further text runs past the clipped right edge instead of a sideways scroll; for either, the texts past the right edge that were not past it at rest, or run further past it, are named. With UC1 followed or broken for the piece, the hint becomes declared only when every element that breaks already bleeds at rest and a sideways scroll or text past the clipped right edge is named by one of them; otherwise it stays a hint and names the elements that do not bleed at rest; on a page where no text bleeds at rest the move is not measured.
|
|
217
219
|
example: >-
|
|
218
220
|
A card whose title wraps "Informações completas sobre atendimento" and pushes the link below it down.
|
|
219
221
|
counterexample: >-
|
|
@@ -345,3 +347,32 @@
|
|
|
345
347
|
"Rated 4.8 by 1,200 buyers" with the reviews below it, and "From 120 to 90, 25% off" with both prices the same in the cart.
|
|
346
348
|
counterexample: >-
|
|
347
349
|
"Only a few left, offer ends today" with today's date on every visit, and a food supplement page that says it cures a disease with no study named.
|
|
350
|
+
|
|
351
|
+
# CR14 reads the large images of a page (the size of AP6) for the filter and blend treatments that recolor them. The
|
|
352
|
+
# filter list is the kit author's claim (H11); a person judges whether a treated image is proof.
|
|
353
|
+
- id: CR14
|
|
354
|
+
name: Proof images keep the look of the original
|
|
355
|
+
area: content
|
|
356
|
+
moment: review
|
|
357
|
+
skill: lazuli-content-voice
|
|
358
|
+
rule: >-
|
|
359
|
+
Check that an image that serves as proof (a customer photo, a result, the product as received) is shown close to the original: not recolored by a filter (grayscale, sepia, saturate, hue-rotate, invert, contrast, brightness, url) or by a blend mode. Name each large image shown recolored and ask, for each, whether it is proof. Keep proof close to the original, or declare the treatment.
|
|
360
|
+
why: >-
|
|
361
|
+
A customer photo in duotone or high contrast can read as stock or staged, so the proof it was there to give weakens. (our claim)
|
|
362
|
+
origin: hypothesis
|
|
363
|
+
status: hypothesis
|
|
364
|
+
hypothesis: H11
|
|
365
|
+
source: >-
|
|
366
|
+
Our claim, not verified yet. No page was opened for it; the filter list and the blend rule are our claim, and the H11 row says how they were fixed and what the measure leaves out. Whether a treated image is proof is a judgment for the reviewer.
|
|
367
|
+
measure: a11y.image-treatment
|
|
368
|
+
threshold: { filters: [grayscale, sepia, saturate, hue-rotate, invert, contrast, brightness, url], blends: true }
|
|
369
|
+
when_to_break: >-
|
|
370
|
+
A treatment that is the idea of the design (a duotone applied to every photo of a campaign, with the originals shown elsewhere), declared with break-a-rule first.
|
|
371
|
+
break_effect: >-
|
|
372
|
+
The images share one look and the page feels designed; the photos may stop reading as evidence of real people or a real product.
|
|
373
|
+
test: >-
|
|
374
|
+
check-design lists the visible img elements that are large (the size of AP6) and reads, for each, the color-changing filter functions of the image or of an ancestor up to its nearest section, article or body, and its mix-blend-mode when not normal; a function at its identity value (grayscale(0), sepia(0), invert(0), saturate(1), contrast(1), brightness(1), hue-rotate(0deg)) leaves the image as it is and is not counted, while url() always counts. Hint naming the images shown recolored; pass when none is; when the page has more large images than are read, the message says how many were read. The reviewer asks, for each treated image, whether it is proof. With no large image there is no finding. Background images, svg and canvas are not read.
|
|
375
|
+
example: >-
|
|
376
|
+
A testimonial portrait in its own colors, with a duotone only on the decorative hero photo.
|
|
377
|
+
counterexample: >-
|
|
378
|
+
Four customer portraits in grayscale with a multiply blend, on a page whose offer rests on what those customers got.
|
|
@@ -15,3 +15,4 @@ Where a row or a rule cites the kit author's internal product plan, that plan is
|
|
|
15
15
|
| H7 | GR7 (every color of a piece is a Brand color, piece.palette) | Our claim, a hint only; no number is used as a cutoff. How it was picked: no value is picked; each color read is compared with the Brand Color lines as an exact lowercase hex. Read: the html and body backgrounds, then each visible element the walk keeps (text color where it has its own text, background color, border colors, gradient stops converted by the browser into sRGB) and the drawn fill and stroke of the shapes inside each inline svg (a shape drawn through a use of an in-document symbol is read with the paint its copy gets). Limits: colors in images, canvas and filters are not read; alpha is dropped, so a token used at 40 percent opacity counts as the token; pseudo-element colors (::before, ::after) are not read; a paint that is not a color (a url() paint server) is counted as unread in a note, never compared; a shape drawn through a use whose fill comes only from a style sheet rule on the referenced symbol is read with the use's own color; an element hidden or clipped away is not read. Observed so far, not evidence: og-good.html reads #23399a and #f4efe6, both Brand colors; og-off.html reads #e0457b on a band and a badge, off brand; body-bg.html reads #e0457b on body; sprite.html reads #e0457b on one use and #23399a on the other; svg.html reads two rect colors and one url() paint unread; smoke (2026-11-26): no og:image was read (an SVG on test site A, none on test site B), and a raster piece is read for its size only | Needs pieces outside the test assets: pieces whose authors list the colors they meant, checked against what the hint lists and misses, before the read is trusted as complete |
|
|
16
16
|
| H8 | GR8 (every font of a piece is a Brand font, piece.fonts) | Our claim, a hint only; no number is used as a cutoff. How it was picked: no value is picked; each rendered family is compared with the Brand Font lines by name, as the type measurer matches names. The families are those the browser reports it rendered for the visible text, read by the type measurer. Limits: fallbacks are counted as the type measurer counts them: a family that paints most of an element's glyphs counts (a font that did not load), one that paints only a few glyphs the main font lacks (an arrow, an accent) does not; text that is hidden, clipped away by a box or placed off the canvas is never counted, so an off-brand font there is not listed; a box that scrolls and spans the canvas does not clip; text drawn in images, canvas or SVG outlines is not read; a piece with no text gives no reading. Observed so far, not evidence: og-good.html renders one family, the Brand font of its test; favicon.html renders no text, so its fonts were not checked; smoke (2026-11-26): no og:image was read (an SVG on test site A, none on test site B), and a raster piece is read for its size only | Needs pieces outside the test assets: renders where the author checks which font shows on screen, against the families the hint lists |
|
|
17
17
|
| H9 | GR9 (the piece shows the Brand symbol file, piece.symbol) | Our claim, a hint only; no number is used as a cutoff. How it was picked: no value is picked; the address of each image, SVG image, use of another file and CSS background url of the visible piece is compared with the Brand Symbol files as the goal matcher compares targets. Limits: an inline copy of the symbol's markup is not recognized, so reference the file; a copy of the file under another name or address is not recognized; the size reported is the box the reference is drawn in, not the symbol's own pixels; whether the version fits the size (GS2) is left to the reviewer. Observed so far, not evidence: og-good.html shows lazuli-symbol.svg at 240 px; svg.html shows it at 160 px through an SVG image; favicon.html at 32 px shows lazuli-symbol-simple.svg at 24 px; og-off.html shows no Brand symbol file; smoke (2026-11-26): no og:image was read (an SVG on test site A, none on test site B), and a raster piece is read for its size only | Needs pieces outside the test assets: pieces that show the symbol in each way (file, inline copy, redrawn), checked against what the hint finds |
|
|
18
|
+
| H10 | GR10 (the first view shows a Brand color, color.brand) | Cutoff: maxDeltaE 10, minShare 0.005. How it was picked: carried over, not picked from a site, both set before any page was read. maxDeltaE is data H4's minDeltaE, the kit's distance under which two colors read as one (our claim there too). minShare is the chart measurer's MIN_SERIES_SHARE, the share at which a color bucket counts as present. Distance: Delta E 1976 with the conversion of in-page/cvd.js. A Brand color is present when the first-view area entries within maxDeltaE of it cover at least minShare of the first view. Definitions it rests on, fixed in advance and not cutoffs: the first view is the first viewport at the run's width and height; the entries are the color measurer's buckets (4 bits per channel, mean color of each bucket, share in percent). Limits: the screenshot is read as drawn, so text and images count by their pixels; a Brand color that appears only as a thin line or a small icon may stay under minShare; a photo of the product in brand colors counts as the brand; Delta E 1976 is not uniform across hues, so a pair near the cutoff can read differently to a person. Observed so far, not evidence: a synthetic page with a hero in the Brand blue covers 85.8% of the first view; one with a red hero finds the blue absent, its nearest bucket at Delta E 5.3 holding under 0.1% of the view (the share is rounded to 0.1 in the color report, so a bucket under 0.05% reads 0); smoke (2026-11-29, one made-up Brand blue, 1440 px): the first views of test site A and test site B found it absent, the nearest buckets at Delta E 9.3 and 60.8, both at 0% | Needs pages whose first views people sorted into showing and not showing the brand, with the Brand tokens written by the brand's own team, checked against the cutoffs before they are applied; then compare Delta E of 5, 10 and 15 and shares of 0.005, 0.02 and 0.05 |
|
|
@@ -240,3 +240,32 @@
|
|
|
240
240
|
A favicon piece whose img points to brand/symbol-small.svg, the Brand symbol declared up to 32 px.
|
|
241
241
|
counterexample: >-
|
|
242
242
|
An Open Graph piece with the symbol's paths pasted inline, a copy that still shows last year's mark.
|
|
243
|
+
|
|
244
|
+
# GR10 is the one page rule of this area: check-design on a page reads the first view's colors and compares them
|
|
245
|
+
# with the Brand Color lines of LAZULI.md. The cutoffs are carried over (H10), not picked from a page.
|
|
246
|
+
- id: GR10
|
|
247
|
+
name: The first view shows a Brand color
|
|
248
|
+
area: graphic
|
|
249
|
+
moment: review
|
|
250
|
+
skill: lazuli-graphic-identity
|
|
251
|
+
rule: >-
|
|
252
|
+
Check that the first view of a page shows at least one color of the Brand (a `- Color:` line of `## Brand` in LAZULI.md): the colors the first view is made of include one within the cutoff distance of a Brand color, over at least the cutoff share of the view. When none is, either bring a Brand color into the first view or declare the move away from the brand.
|
|
253
|
+
why: >-
|
|
254
|
+
The Brand colors are how a page is recognized as this brand. A first view made only of other colors reads as another brand, and nothing else in a page check would say so. (our claim)
|
|
255
|
+
origin: hypothesis
|
|
256
|
+
status: hypothesis
|
|
257
|
+
hypothesis: H10
|
|
258
|
+
source: >-
|
|
259
|
+
Our claim, not verified yet. Both cutoffs are carried over from numbers the kit already uses, set before any page was read; the H10 row says where each comes from and lists what was observed afterwards, which is not evidence. Declaring the Brand tokens is GI4.
|
|
260
|
+
measure: color.brand
|
|
261
|
+
threshold: { maxDeltaE: 10, minShare: 0.005 }
|
|
262
|
+
when_to_break: >-
|
|
263
|
+
A page that moves the brand to another color on purpose (a campaign, a rebrand in progress), declared with break-a-rule first.
|
|
264
|
+
break_effect: >-
|
|
265
|
+
The page shows the new color in the first view, and a visitor who knows the brand may not recognize it at first sight.
|
|
266
|
+
test: >-
|
|
267
|
+
check-design reads the colors of the first view from the screenshot and takes, for each Brand Color line, the colors within the cutoff distance (Delta E 1976). A Brand color is present when those colors cover at least the cutoff share of the first view, summed on the unrounded shares. Hint when none is, naming for each Brand color the nearest color of the view, its distance and its share, and the share covered within the cutoff distance. With no Brand Color line there is no finding, and a note says so.
|
|
268
|
+
example: >-
|
|
269
|
+
A first view whose hero is the brand's blue, or whose button and logo carry it.
|
|
270
|
+
counterexample: >-
|
|
271
|
+
A first view in red and white for a brand whose only Color line is a green.
|
|
@@ -6,9 +6,9 @@ Where a row or a rule cites the kit author's internal product plan, that plan is
|
|
|
6
6
|
|
|
7
7
|
| ID | Principle | Candidate limit | How to validate in the A/B |
|
|
8
8
|
|---|---|---|---|
|
|
9
|
-
| H1 | MI2 and MR1 (a microinteraction is short enough that the next action never waits on it) | Cutoff: maxMs 400. How it was picked: a round starting value, our claim, set before any page was measured. Published ranges opened on 2026-11-26 are related reading and never move it: Nielsen Norman Group, Page Laubheimer, Executing UX Animations: Duration and Motion Characteristics, https://www.nngroup.com/articles/animation-duration/ (section "Animation Duration") puts most UI animations between 100 and 500 ms, simple feedback such as a checkbox or toggle at about 100 ms, and calls 400 ms a very slow animation for big movements across large screens; IBM Carbon Design System, Motion, https://carbondesignsystem.com/elements/motion/overview/ (section "Duration") names duration tokens of 70, 110, 150, 240, 400 and 700 ms, the 70 to 150 ms ones for microinteractions. The value was fixed before these pages were opened and was not moved by them. What is measured: for each animation started by a hover, a focus or a click, from the Web Animations API timing, its delay plus its duration times its iterations, per animation. Limits: motion driven by script (requestAnimationFrame, canvas, video) is not in the API, so its duration is not read; an animation with endless iterations has no end and is not judged here; a duration says nothing about how fast the motion feels, which also depends on the curve and the distance. How it is judged (MR1): only an animation that starts within STEP_WINDOW_MS of a hover, focus or click step, on the element the step acted on, inside it or holding it; the reverse transition counts once; anything else started during a step is not judged. Further limits: first width only; the steps are the first few first-view controls, clicks only on a local page and only on disclosure controls; this machine. Observed so far, not evidence: slow-hover.html, one hover transition of 900 ms (planted far from the cutoff). In a check-design --area motion run of the smoke sites on 2026-11-26 at 1440 px on this machine (read only: hovered, focused and scrolled, nothing clicked): test site A, 3 microinteractions, all within 400 ms; test site B, 1 over 400 ms (a 600 ms hover fade on a div). | Needs microinteractions outside the test fixtures: recordings that people from the audience call quick or slow, checked against the durations read, before the cutoff is applied; then compare 200, 300, 400 and 500 ms on how well each separates the two groups |
|
|
10
|
-
| H2 | MT4 and MR2 (a transition or entrance, stagger included, ends soon after the content is ready) | Cutoff: maxMs 1000. How it was picked: a round starting value, our claim, set before any page was measured. Published ranges opened on 2026-11-26 are related reading and never move it: Nielsen Norman Group, Executing UX Animations: Duration and Motion Characteristics, https://www.nngroup.com/articles/animation-duration/ (section "Animation Duration") says animations are more often too long than too short and that around 500 ms they start to feel like a drag; IBM Carbon Design System, Motion, https://carbondesignsystem.com/elements/motion/overview/ (section "Duration") names its longest token, 700 ms, for background dimming. What is measured: for each transition or entrance, from the Web Animations API timing, its delay plus its duration times its iterations, per animation, so the last item of a stagger carries the whole stagger in its delay. Limits: motion driven by script (requestAnimationFrame, canvas, video) is not in the API, so its duration is not read; an animation with endless iterations has no end and is not judged here; a stagger written as script timers that start separate animations is read per animation; a duration says nothing about how fast the motion feels. How it is judged (MR2): finite animations that start in the load window or within STEP_WINDOW_MS of the scripted scroll; the load window ends after QUIET_MS with no animation, so an animation that starts later is not read; first width only; this machine. Observed so far, not evidence: stagger-long.html, 4 entrances longer than 1000 ms, the last one 2100 ms with its delay (planted far from the cutoff). In a check-design --area motion run of the smoke sites on 2026-11-26 at 1440 px on this machine (read only: hovered, focused and scrolled, nothing clicked): test site A, none at load or scroll judged; test site B, 3 over 1000 ms (one div 1700 ms, two divs 1040 ms). | Needs pages outside the test fixtures: entrances that people from the audience say made them wait, checked against the durations read, before the cutoff is applied; then compare 600, 800, 1000 and 1500 ms |
|
|
11
|
-
| H3 | MT3 and MR3 (movement eases: an entering element slows into place, a leaving one speeds away, no constant speed for a finite move) | Our claim, a hint only; no number is used as a cutoff. How it was picked: no value is picked; the curve of each finite animation is read from the Web Animations API timing (the effect's easing and the easing of each keyframe) and a linear curve on a finite move is named. Related reading, opened on 2026-11-26: Nielsen Norman Group, Executing UX Animations: Duration and Motion Characteristics, https://www.nngroup.com/articles/animation-duration/ (section "Easing Makes Motion Feel More Natural") says ease-out is the most frequent choice and constant speed looks unnatural; IBM Carbon Design System, Motion, https://carbondesignsystem.com/elements/motion/overview/ (section "Easing") lists standard, entrance and exit curves for productive and expressive motion, with exit easing speeding up as the element leaves view. What is measured: the curve name or cubic-bezier of each finite animation, per animation. Limits: motion driven by script is not in the API, so its curve is not read; an endless loop at constant speed (a spinner) is not a finite move and is not named; a curve says nothing about how the motion feels without its duration and distance; whether an element enters or leaves is read from its keyframes, not from intent; MR3 names linear and cubic-bezier(0, 0, 1, 1) only, so the CSS linear() function with stops is not read as constant speed; first width only. Observed so far, not evidence: slow-hover.html, one linear hover move (planted). In a check-design --area motion run of the smoke sites on 2026-11-26 at 1440 px on this machine (read only: hovered, focused and scrolled, nothing clicked): test site B, 1 finite move, not linear; test site A, no finite move. | Needs pages outside the test fixtures: pairs of the same move with a linear and an eased curve, shown to people from the audience, checked against which one they call mechanical |
|
|
9
|
+
| H1 | MI2 and MR1 (a microinteraction is short enough that the next action never waits on it) | Cutoff: maxMs 400. How it was picked: a round starting value, our claim, set before any page was measured. Published ranges opened on 2026-11-26 are related reading and never move it: Nielsen Norman Group, Page Laubheimer, Executing UX Animations: Duration and Motion Characteristics, https://www.nngroup.com/articles/animation-duration/ (section "Animation Duration") puts most UI animations between 100 and 500 ms, simple feedback such as a checkbox or toggle at about 100 ms, and calls 400 ms a very slow animation for big movements across large screens; IBM Carbon Design System, Motion, https://carbondesignsystem.com/elements/motion/overview/ (section "Duration") names duration tokens of 70, 110, 150, 240, 400 and 700 ms, the 70 to 150 ms ones for microinteractions. The value was fixed before these pages were opened and was not moved by them. What is measured: for each animation started by a hover, a focus or a click, from the Web Animations API timing, its delay plus its duration times its iterations, per animation. Limits: motion driven by script (requestAnimationFrame, canvas, video) is not in the API, so its duration is not read; an animation with endless iterations has no end and is not judged here; an animation linked to scroll (animation-timeline) runs with the scroll position, has no length and is not judged here; a duration says nothing about how fast the motion feels, which also depends on the curve and the distance. How it is judged (MR1): only an animation that starts within STEP_WINDOW_MS of a hover, focus or click step, on the element the step acted on, inside it or holding it; the reverse transition counts once; anything else started during a step is not judged. Further limits: first width only; the steps are the first few first-view controls, clicks only on a local page and only on disclosure controls; this machine. Observed so far, not evidence: slow-hover.html, one hover transition of 900 ms (planted far from the cutoff). In a check-design --area motion run of the smoke sites on 2026-11-26 at 1440 px on this machine (read only: hovered, focused and scrolled, nothing clicked): test site A, 3 microinteractions, all within 400 ms; test site B, 1 over 400 ms (a 600 ms hover fade on a div). | Needs microinteractions outside the test fixtures: recordings that people from the audience call quick or slow, checked against the durations read, before the cutoff is applied; then compare 200, 300, 400 and 500 ms on how well each separates the two groups |
|
|
10
|
+
| H2 | MT4 and MR2 (a transition or entrance, stagger included, ends soon after the content is ready) | Cutoff: maxMs 1000. How it was picked: a round starting value, our claim, set before any page was measured. Published ranges opened on 2026-11-26 are related reading and never move it: Nielsen Norman Group, Executing UX Animations: Duration and Motion Characteristics, https://www.nngroup.com/articles/animation-duration/ (section "Animation Duration") says animations are more often too long than too short and that around 500 ms they start to feel like a drag; IBM Carbon Design System, Motion, https://carbondesignsystem.com/elements/motion/overview/ (section "Duration") names its longest token, 700 ms, for background dimming. What is measured: for each transition or entrance, from the Web Animations API timing, its delay plus its duration times its iterations, per animation, so the last item of a stagger carries the whole stagger in its delay. Limits: motion driven by script (requestAnimationFrame, canvas, video) is not in the API, so its duration is not read; an animation with endless iterations has no end and is not judged here; an animation linked to scroll (animation-timeline) runs with the scroll position, has no length and is not judged here; a stagger written as script timers that start separate animations is read per animation; a duration says nothing about how fast the motion feels. How it is judged (MR2): finite animations that start in the load window or within STEP_WINDOW_MS of the scripted scroll; the load window ends after QUIET_MS with no animation, so an animation that starts later is not read; first width only; this machine. Observed so far, not evidence: stagger-long.html, 4 entrances longer than 1000 ms, the last one 2100 ms with its delay (planted far from the cutoff). In a check-design --area motion run of the smoke sites on 2026-11-26 at 1440 px on this machine (read only: hovered, focused and scrolled, nothing clicked): test site A, none at load or scroll judged; test site B, 3 over 1000 ms (one div 1700 ms, two divs 1040 ms). | Needs pages outside the test fixtures: entrances that people from the audience say made them wait, checked against the durations read, before the cutoff is applied; then compare 600, 800, 1000 and 1500 ms |
|
|
11
|
+
| H3 | MT3 and MR3 (movement eases: an entering element slows into place, a leaving one speeds away, no constant speed for a finite move) | Our claim, a hint only; no number is used as a cutoff. How it was picked: no value is picked; the curve of each finite animation is read from the Web Animations API timing (the effect's easing and the easing of each keyframe) and a linear curve on a finite move is named. Related reading, opened on 2026-11-26: Nielsen Norman Group, Executing UX Animations: Duration and Motion Characteristics, https://www.nngroup.com/articles/animation-duration/ (section "Easing Makes Motion Feel More Natural") says ease-out is the most frequent choice and constant speed looks unnatural; IBM Carbon Design System, Motion, https://carbondesignsystem.com/elements/motion/overview/ (section "Easing") lists standard, entrance and exit curves for productive and expressive motion, with exit easing speeding up as the element leaves view. What is measured: the curve name or cubic-bezier of each finite animation, per animation. Limits: motion driven by script is not in the API, so its curve is not read; an endless loop at constant speed (a spinner) is not a finite move and is not named; a curve says nothing about how the motion feels without its duration and distance; whether an element enters or leaves is read from its keyframes, not from intent; MR3 names linear and cubic-bezier(0, 0, 1, 1) only, so the CSS linear() function with stops is not read as constant speed; an animation linked to scroll (animation-timeline) is not judged, because the scroll position is its curve, and it is counted in a note; first width only. Observed so far, not evidence: slow-hover.html, one linear hover move (planted). In a check-design --area motion run of the smoke sites on 2026-11-26 at 1440 px on this machine (read only: hovered, focused and scrolled, nothing clicked): test site B, 1 finite move, not linear; test site A, no finite move. | Needs pages outside the test fixtures: pairs of the same move with a linear and an eased curve, shown to people from the audience, checked against which one they call mechanical |
|
|
12
12
|
| H4 | MI4 and MR4 (animate no layout property, motion.properties) | Our claim, a hint only; no number is used as a cutoff. How it was picked: no value is picked; the properties of each recorded animation are compared with LAYOUT_PROPS, a list fixed before any page was measured (sizes, insets, margins, paddings, border widths, font-size, line-height, letter-spacing, flex-basis, grid template sizes). The reason comes from web.dev, How to create high-performance CSS animations, https://web.dev/articles/animations-guide (opened 2026-11-26): avoid properties that trigger layout or paint, restrict animations to opacity and transform where possible; that the list is the right one, and that a recorded animation on it is worth a hint, is our claim. What is measured: the property names of each animation in the Web Animations API (CSS animations, CSS transitions, Web Animations) on elements the composition walk keeps and that are in view. Limits: paint-only properties (color, background, box-shadow) are not named although they repaint; script motion (requestAnimationFrame, canvas, video) is not in the API; first width only; a layout property on a tiny element costs little and still gets the hint. Observed so far, not evidence: layout-anim.html, one animation of width (planted). In a check-design --area motion run of the smoke sites on 2026-11-26 at 1440 px on this machine (read only: hovered, focused and scrolled, nothing clicked): test site A, 6 animations, none on a layout property; test site B, 25, none (200 of 348 recorded, the sampling limit). | Needs pages outside the test fixtures: pages where a layout animation was swapped for a transform, with long frames and the filmstrip compared before and after, before the hint is trusted |
|
|
13
13
|
| H5 | MT2 and MR5 (not every entrance is the same animation, motion.sameness) | Cutoff: minEntrances 3. The rule judges only when at least 3 entrances were recorded and hints when all of them are one animation. How it was picked: a round starting value, our claim, set before any page was measured: two entrances alike say little, three alike start to read as a default. Definitions it rests on: an entrance is a finite animation at load or after the scroll where opacity rises or a move property returns to rest; two are the same when properties, from and to values, duration and curve match (delay and name ignored). Limits: a scale entrance that ends at scale 1 with no opacity change is not read as an entrance (only none, an identity matrix or zeros read as rest); entrances made by script are not read; entrances that start after the load window ends (QUIET_MS with no animation) are not read; first width only; one fade with two curves reads as two animations. Observed so far, not evidence: entrances-same.html, 4 entrances, all opacity and transform over 600 ms, ease-out (planted); entrances-varied.html, 3 entrances, 3 animations. In a check-design --area motion run of the smoke sites on 2026-11-26 at 1440 px on this machine (read only: hovered, focused and scrolled, nothing clicked): test site B, 5 entrances, 3 different animations; test site A, fewer than 3 entrances. | Needs pages outside the test fixtures: award-listed pages against default templates, with reviewers saying whether the entrances read as one default; then compare 2, 3 and 5 entrances |
|
|
14
14
|
| H6 | MR6 (no long frames while the page moves, motion.long-frames) | Cutoff: maxFrameMs 100. How it was picked: a round starting value, our claim, set before any page was measured: one frame of 100 ms loses about six frames at 60 Hz, a stall a person sees in any running animation. The long-frame APIs report only frames of 50 ms or more (Chrome for Developers, Long Animation Frames API, https://developer.chrome.com/docs/web-platform/long-animation-frames, opened 2026-11-26), and the reading is judged with TIMING_TOLERANCE_MS (50 ms), so the band the reader sees is: hint above 150 ms, no finding and a note from 50 to 150 ms, pass only when no frame over 50 ms was reported. What is measured: entries of type long-animation-frame (longtask when unsupported, named in the report) from load to the end of the scripted steps, in the run that captures no pixels. Limits: the reading depends on this machine and its load at the time; a faster machine reads fewer long frames; scripted steps are a few hovers, focuses and one scroll, not a person's use; first width only. Observed so far, not evidence: long-frame.html, one frame of 315 to 317 ms over three runs (a planted 300 ms busy loop), start spread 14 ms. In a check-design --area motion run of the smoke sites on 2026-11-26 at 1440 px on this machine (read only: hovered, focused and scrolled, nothing clicked): test site A, the longest frame 100 ms (within the tolerance, not judged); test site B, 174 ms during the first hover (hint). | Needs recordings of real pages on a slow phone and on a fast laptop, with people saying where the page felt stuck, before the cutoff is applied; then compare 50, 100 and 200 ms |
|
package/rules/motion/review.yaml
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
break_effect: >-
|
|
26
26
|
The result gets a moment of its own, and nothing waits on it because the control is free.
|
|
27
27
|
test: >-
|
|
28
|
-
The recorder hovers and focuses the first first-view controls on every page and clicks disclosure controls on a local page only. An animation counts for this rule when it starts within STEP_WINDOW_MS of the step on the element the step acted on, an element inside it or one that holds it; anything else that starts during a step is not judged by any duration (a note counts it). Its length is delay plus duration times iterations, read from the Web Animations API; the reverse transition after the pointer leaves counts once; endless animations are not judged. Hint when one is longer than the cutoff, pass when every one is within it, nothing when no microinteraction was recorded. Motion driven by script (requestAnimationFrame, canvas, video) is not in the API, so its length is not read.
|
|
28
|
+
The recorder hovers and focuses the first first-view controls on every page and clicks disclosure controls on a local page only. An animation counts for this rule when it starts within STEP_WINDOW_MS of the step on the element the step acted on, an element inside it or one that holds it; anything else that starts during a step is not judged by any duration (a note counts it). Its length is delay plus duration times iterations, read from the Web Animations API; the reverse transition after the pointer leaves counts once; endless animations and animations linked to scroll (animation-timeline), which have no length, are not judged. Hint when one is longer than the cutoff, pass when every one is within it, nothing when no microinteraction was recorded. Motion driven by script (requestAnimationFrame, canvas, video) is not in the API, so its length is not read.
|
|
29
29
|
example: >-
|
|
30
30
|
A button whose hover lift uses the shortest duration token of the vocabulary.
|
|
31
31
|
counterexample: >-
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
break_effect: >-
|
|
53
53
|
The opening is watched as intended, and anyone in a hurry skips it.
|
|
54
54
|
test: >-
|
|
55
|
-
Each finite animation that starts in the load window or within STEP_WINDOW_MS of the scripted scroll is measured as delay plus duration times iterations, so the last item of a stagger carries the whole stagger in its delay. Hint when one is longer than the cutoff, pass when every one is within it, nothing when none was recorded. The load window ends early after QUIET_MS with no animation, so an animation that starts later is not read (the report says when the recording ended); a stagger made of script timers is read per animation; script motion is not read.
|
|
55
|
+
Each finite animation that starts in the load window or within STEP_WINDOW_MS of the scripted scroll, other than one linked to scroll (animation-timeline), which has no length, is measured as delay plus duration times iterations, so the last item of a stagger carries the whole stagger in its delay. Hint when one is longer than the cutoff, pass when every one is within it, nothing when none was recorded. The load window ends early after QUIET_MS with no animation, so an animation that starts later is not read (the report says when the recording ended); a stagger made of script timers is read per animation; script motion is not read.
|
|
56
56
|
example: >-
|
|
57
57
|
A list whose items arrive a short step apart, the last one in place soon after the first.
|
|
58
58
|
counterexample: >-
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
break_effect: >-
|
|
79
79
|
The motion reads as the brand's machine, at the cost of looking stiff wherever it is not expected.
|
|
80
80
|
test: >-
|
|
81
|
-
For each finite animation that changes a move property (transform, translate, scale, rotate, the inset properties, offset-distance), the curve is read from the Web Animations API: the effect's easing, or the keyframes' common easing when the effect is linear. Hint naming each one whose curve is linear or cubic-bezier(0, 0, 1, 1); pass when none is; nothing when no finite move was recorded. The CSS linear() function with stops is not read as constant speed; endless loops are not judged; script motion is not read.
|
|
81
|
+
For each finite animation that changes a move property (transform, translate, scale, rotate, the inset properties, offset-distance), the curve is read from the Web Animations API: the effect's easing, or the keyframes' common easing when the effect is linear. Hint naming each one whose curve is linear or cubic-bezier(0, 0, 1, 1); pass when none is; nothing when no finite move was recorded. The CSS linear() function with stops is not read as constant speed; endless loops are not judged; script motion is not read; an animation linked to scroll (animation-timeline) is not judged and is counted in a note.
|
|
82
82
|
example: >-
|
|
83
83
|
A toast that enters with the vocabulary's entering curve.
|
|
84
84
|
counterexample: >-
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
break_effect: >-
|
|
132
132
|
The page stays calm and consistent, at the cost of motion telling the roles apart.
|
|
133
133
|
test: >-
|
|
134
|
-
An entrance is a finite animation at load or after the scroll where opacity rises or a move property returns to rest. Two entrances are the same animation when they change the same properties between the same values over the same duration with the same curve; delay and name do not count, so a stagger of one fade is one animation. With at least minEntrances entrances, hint when all of them are one animation and pass when they differ; with fewer, nothing. Whether they differ by role and carry the brand is judged by the reviewer from the filmstrip (MR11), never by this count.
|
|
134
|
+
An entrance is a finite animation at load or after the scroll, not linked to scroll (animation-timeline), where opacity rises or a move property returns to rest. Two entrances are the same animation when they change the same properties between the same values over the same duration with the same curve; delay and name do not count, so a stagger of one fade is one animation. With at least minEntrances entrances, hint when all of them are one animation and pass when they differ; with fewer, nothing. Whether they differ by role and carry the brand is judged by the reviewer from the filmstrip (MR11), never by this count.
|
|
135
135
|
example: >-
|
|
136
136
|
A heading that rises, a figure revealed by a mask and list items that arrive from the side.
|
|
137
137
|
counterexample: >-
|
|
@@ -6,7 +6,7 @@ Numbers that are not from a standard. They stay in the rules only as hints (stat
|
|
|
6
6
|
|---|---|---|---|
|
|
7
7
|
| H1 | TR1 (line length) | Between 45 and 90 characters per line, judged per block (a block of 3 lines or more), not per line. Range from Butterick, Practical Typography, "Line length" (opened: "Aim for an average line length of 45-90 characters, including spaces"). The 3-line minimum is our claim. A block with fewer characters in all than minLines times minChars (135) is a caption, not running text, and is not judged. | Reading time and comprehension of the same text at 40, 65 and 100 characters |
|
|
8
8
|
| H2 | TC5 (body size) | Body text between 15 and 25 px on the web. Range from Butterick, Practical Typography, "Point size" (opened: 15 to 25 pixels for body text on the web) | Reported comfort at the real viewing distance on desktop and phone |
|
|
9
|
-
| H3 | TR2 (line height) | Between 1.2 and 1.5 times the font size in multi-line blocks. Range from Butterick, Practical Typography, "Line spacing" (opened: 120% to 145% of the point size), upper end raised to 1.5 to agree with WCAG 2.2 SC 1.4.8 (AAA: line spacing at least space-and-a-half) | Reading speed and "does the text feel airy or cramped?" at 1.1, 1.3 and 1.6 |
|
|
9
|
+
| H3 | TR2 (line height) | Between 1.2 and 1.5 times the font size in multi-line blocks. Range from Butterick, Practical Typography, "Line spacing" (opened: 120% to 145% of the point size), upper end raised to 1.5 to agree with WCAG 2.2 SC 1.4.8 (AAA: line spacing at least space-and-a-half). Display type (WCAG 2.2 large scale: 24 px and up, or 18.66 px and up at weight 700 or more) is judged for the upper bound only; the page says nothing about headings, so that is our claim | Reading speed and "does the text feel airy or cramped?" at 1.1, 1.3 and 1.6 |
|
|
10
10
|
| H4 | TC2 (few families) | At most 3 font families rendered on a page. Our claim | Compare pages with 2, 3 and 5 families on "does it look designed or assembled?" |
|
|
11
11
|
| H5 | TC3 (visible scale) | Neighboring sizes in the used scale differ by at least 1.125 times. Our claim | Show scales with steps of 1.05, 1.125 and 1.25 and ask which levels people can tell apart at a glance |
|
|
12
12
|
| H6 | TR5 (heading rag) | A heading that wraps to a last line of one word is flagged. Our claim, a hint only | Ask "does the headline look finished?" for headlines with and without a one-word last line |
|