@uselazuli/cli 1.0.1 → 1.0.3
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 +39 -0
- package/README.md +5 -5
- package/bin/lazuli.mjs +69 -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 +3 -3
- package/rules/ui/compose.yaml +28 -1
- package/rules/ui/review.yaml +4 -3
- package/skills/lazuli/SKILL.md +9 -6
- package/skills/lazuli/procedures/review-design.md +1 -0
- package/skills/lazuli/procedures/show-options.md +2 -1
- package/skills/lazuli-content-interface-writing/SKILL.md +1 -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/capture.mjs +1 -1
- package/src/commands/catalog.mjs +1 -1
- package/src/commands/check-design.mjs +62 -17
- package/src/commands/compare-designs.mjs +73 -6
- package/src/commands/draft-memo.mjs +7 -3
- package/src/commands/hooks.mjs +7 -5
- package/src/commands/record-log.mjs +87 -25
- package/src/commands/render-options.mjs +81 -15
- package/src/measure/a11y.mjs +8 -0
- package/src/measure/cases.mjs +24 -5
- package/src/measure/color.mjs +7 -0
- package/src/measure/in-page/a11y.js +84 -0
- package/src/measure/in-page/color.js +3 -1
- package/src/measure/in-page/composition.js +10 -3
- package/src/measure/in-page/extreme.js +42 -9
- package/src/measure/in-page/motion-probe.js +2 -0
- package/src/measure/in-page/type.js +3 -0
- package/src/measure/layout.mjs +21 -3
- package/src/measure/motion.mjs +2 -1
- package/src/measure/registry.mjs +3 -2
- package/src/measure/rhythm.mjs +8 -0
- package/src/measure/timeline.mjs +5 -5
- package/src/project/gate.mjs +12 -3
- package/src/project/lazuli-md.mjs +35 -5
- package/src/project/log.mjs +18 -12
- package/src/project/match.mjs +102 -5
- package/src/report/evaluators/a11y.mjs +24 -0
- package/src/report/evaluators/color.mjs +77 -1
- package/src/report/evaluators/extreme.mjs +45 -9
- package/src/report/evaluators/layout.mjs +10 -1
- package/src/report/evaluators/motion.mjs +10 -3
- package/src/report/evaluators/rhythm.mjs +1 -1
- 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 +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.3
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Break status `superseded`: `record-break --status superseded` marks a break whose piece or break no longer exists as written; nothing is claimed about its effect. `draft-memo` and the review packet leave superseded breaks out, and `LAZULI.md` reports a live break whose piece matches no goal.
|
|
8
|
+
- GR10: when the first view holds no Brand color, the hint names colors of a Brand color's hue at another lightness or chroma. The cutoffs are `maxHueDeg` 30 and `minChroma` 10, both hypotheses.
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- `check-design` reads a file covered by an options goal by its data-block marks, as `render-options` does, and says so in a note. The options sheet names the UR3 pair it compared.
|
|
13
|
+
- UR5 gives no finding on a file covered only by an options goal with no Rhythm line, and a note says why.
|
|
14
|
+
- A declared UC1 bleed is read on any text past the edge at rest, decorative (`aria-hidden`) text included. A page with no such text, or a page that scrolls sideways at rest, says so.
|
|
15
|
+
- CR14 names each recolored image by its alt text or file name, and reads filters at any nesting.
|
|
16
|
+
- `check-design --out` writes the text report to a `.txt` name.
|
|
17
|
+
- `compare-designs` and `render-options` call the distance a structure distance, list options from low to high, and say it does not read color, typefaces, images or texture.
|
|
18
|
+
- An unapplied break on a move is matched by its piece, and says when the move is not on the page.
|
|
19
|
+
|
|
20
|
+
## 1.0.2
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- 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.
|
|
25
|
+
- 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.
|
|
26
|
+
- 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.
|
|
27
|
+
- GR10: the first view shows a Brand color.
|
|
28
|
+
- CR14: proof images keep the look of the original, and large images that were recolored are named.
|
|
29
|
+
- `--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.
|
|
30
|
+
- `--screens <n>` on `render-options`: the thumbnail on the options sheet shows the first n screens, and says so. Measures read the first view.
|
|
31
|
+
- `compare-designs --options <folder>` places a folder of options from near to far, read at 1440 by default and at the `--height` you give.
|
|
32
|
+
- `render-options --baseline <url-or-path>` adds each option's distance from a page, read at the same height as the options.
|
|
33
|
+
|
|
34
|
+
### Fixed
|
|
35
|
+
|
|
36
|
+
- 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.
|
|
37
|
+
- TR2 checks display type (the WCAG large scale) for the upper bound only.
|
|
38
|
+
- RV2 says when failing text is hidden from assistive technology.
|
|
39
|
+
- 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.
|
|
40
|
+
- `set-goals` logs a goal change with `record-decision --rule none`.
|
|
41
|
+
|
|
3
42
|
## 1.0.1
|
|
4
43
|
|
|
5
44
|
### 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.3. 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
|
|
|
@@ -37,7 +37,7 @@ Write `delegate` under `## Mode` in `LAZULI.md`. The agent then makes the design
|
|
|
37
37
|
|
|
38
38
|
What you get on your side:
|
|
39
39
|
|
|
40
|
-
- `check-design <file-or-url>` opens the page in a real browser and reports what it found, rule by rule. Exit code 0 means no failures, 1 means at least one failure (or a required check that could not run), 2 means bad usage, a missing file or no browser. `--json` gives machine output for scripts and CI; `--out <file>` also writes the report to a file you name.
|
|
40
|
+
- `check-design <file-or-url>` opens the page in a real browser and reports what it found, rule by rule. Exit code 0 means no failures, 1 means at least one failure (or a required check that could not run), 2 means bad usage, a missing file or no browser. `--json` gives machine output for scripts and CI; `--out <file>` also writes the report to a file you name (the text report for a `.txt` name, JSON otherwise).
|
|
41
41
|
- The post-edit hook (`install-hooks`, opt-in) runs `check-design` after the agent edits an HTML or CSS file and hands it a short list of failures to fix, so problems are caught while the agent works.
|
|
42
42
|
- `check-goals` is the gate before delivery. It exits 0 only when every goal tied to a page was judged met and approved by a separate reviewer and no rule break on it is still being tried. In delegate mode the end-of-turn hook asks the agent, once, to close that gate before it finishes.
|
|
43
43
|
|
|
@@ -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 structure distance from a page), `compare-designs` (`--options <folder>` lists a folder of options by structure distance, low to high; it reads layout structure only, not color, typefaces, images or texture), `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
|
|
|
@@ -130,7 +130,7 @@ node bin/lazuli.mjs check-design ./index.html
|
|
|
130
130
|
- Feel: safe
|
|
131
131
|
- Do: finish the payment
|
|
132
132
|
```
|
|
133
|
-
- **Your breaks.** A break is logged under `## Breaks` with `Rule`, `Piece`, `Effect`, `Check` and `Status` (`trying`, `kept` or `
|
|
133
|
+
- **Your breaks.** A break is logged under `## Breaks` with `Rule`, `Piece`, `Effect`, `Check` and `Status` (`trying`, `kept`, `reverted` or `superseded`). When its `Piece` is a goal of the checked page, a fail or hint of that rule is reported as a `break` with the declared effect. A `reverted` or `superseded` break changes nothing; `superseded` retires a break whose piece or break no longer exists as written. `record-break` sets a break to `kept` only when a review of its piece is recorded on a capture taken after the break was last set, so the separate reviewer, not the builder, has seen the declared effect.
|
|
134
134
|
- **Norms are never waived.** A rule with `origin: norm` (a standard such as WCAG) keeps its fail even when a break is declared on it, and the report says the break was not applied.
|
|
135
135
|
- **Hypotheses are hints.** A finding from a hypothesis rule is at most a hint and carries a label such as `(hypothesis H1, color)`, the id in that area's `HYPOTHESES.md` and the area.
|
|
136
136
|
|
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 { STRUCTURE_READS, 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,20 @@ 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
|
+
"--out <file> writes the text report to a .txt name and the JSON otherwise.",
|
|
29
30
|
],
|
|
30
31
|
capture: ["Usage: lazuli capture <url-or-path> [--width 1440,390]"],
|
|
31
32
|
"check-goals": ["Usage: lazuli check-goals [<url-or-path>]"],
|
|
32
33
|
"draft-memo": ["Usage: lazuli draft-memo [<url-or-path>] [--out <file>]"],
|
|
33
34
|
"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]"],
|
|
35
|
+
"render-options": ["Usage: lazuli render-options <folder> [--width 1440,390] [--height <px>] [--screens <n>] [--baseline <url-or-path>] [--json]"],
|
|
36
|
+
"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
37
|
"map-page": ["Usage: lazuli map-page <url-or-path> --piece <name> [--width 390]", " lazuli map-page --task <id> [<url-or-path>]"],
|
|
37
38
|
"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>'],
|
|
39
|
+
"record-break": ["Usage: lazuli record-break --rule <id>[,<id>...] --piece <name> [--target <path>] [--effect <text>] [--check <text>] --status trying|kept|reverted|superseded"],
|
|
40
|
+
"record-decision": ['Usage: lazuli record-decision --decision <text> --piece <name> [--target <path>] --goal <text> --rule "<id> followed|broken|accepted|none" --measure <text>'],
|
|
40
41
|
"record-first-look": ["Usage: lazuli record-first-look --file <json>"],
|
|
41
42
|
"record-review": ["Usage: lazuli record-review --file <json>"],
|
|
42
43
|
install: ["Usage: lazuli install [--target <dir>] [--agents-target <dir>]"],
|
|
@@ -143,11 +144,23 @@ async function runInstallHooks(rest) {
|
|
|
143
144
|
}
|
|
144
145
|
}
|
|
145
146
|
|
|
147
|
+
// A --height value: the number, or { error } with the usage message. Never a silent default.
|
|
148
|
+
function parseHeight(raw) {
|
|
149
|
+
const height = /^[0-9]+$/.test(raw ?? "") ? Number(raw) : NaN;
|
|
150
|
+
try {
|
|
151
|
+
checkHeight(height);
|
|
152
|
+
return { height };
|
|
153
|
+
} catch (err) {
|
|
154
|
+
return { error: err.message };
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
146
158
|
function parseCheckArgs(args) {
|
|
147
159
|
let target;
|
|
148
160
|
const screens = [];
|
|
149
161
|
let site = false;
|
|
150
162
|
let widths;
|
|
163
|
+
let height;
|
|
151
164
|
let areas;
|
|
152
165
|
let json = false;
|
|
153
166
|
let asset;
|
|
@@ -179,6 +192,10 @@ function parseCheckArgs(args) {
|
|
|
179
192
|
return { error: "--width needs a comma list of pixel widths, for example --width 1440,390." };
|
|
180
193
|
}
|
|
181
194
|
widths = parts.map(Number);
|
|
195
|
+
} else if (a === "--height") {
|
|
196
|
+
const parsed = parseHeight(args[++i]);
|
|
197
|
+
if (parsed.error) return parsed;
|
|
198
|
+
height = parsed.height;
|
|
182
199
|
} else if (a === "--area") {
|
|
183
200
|
const raw = args[++i];
|
|
184
201
|
const parts = (raw ?? "").split(",");
|
|
@@ -198,10 +215,11 @@ function parseCheckArgs(args) {
|
|
|
198
215
|
if (asset !== undefined) {
|
|
199
216
|
if (target) return { error: "check-design --asset checks one asset; give no page target with it." };
|
|
200
217
|
if (site || widths) return { error: "--site and --width do not apply to --asset; a piece takes its size from Size: or --size." };
|
|
218
|
+
if (height !== undefined) return { error: "--height does not apply to --asset; a piece takes its size from Size: or --size." };
|
|
201
219
|
return { asset, sizes, areas, json, copyTo };
|
|
202
220
|
}
|
|
203
221
|
if (!target) return { error: "check-design needs a URL or an HTML file path." };
|
|
204
|
-
return { target, screens, site, widths, areas, json, copyTo };
|
|
222
|
+
return { target, screens, site, widths, height, areas, json, copyTo };
|
|
205
223
|
}
|
|
206
224
|
|
|
207
225
|
function parseCaptureArgs(args) {
|
|
@@ -333,12 +351,12 @@ async function main(argv) {
|
|
|
333
351
|
try {
|
|
334
352
|
const result = parsed.asset
|
|
335
353
|
? 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 } : {}) });
|
|
354
|
+
: 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
355
|
console.log(parsed.json ? JSON.stringify(result, null, 2) : formatReport(result));
|
|
338
356
|
// A norm that could not be checked (its measurer failed) exits 1 like a fail.
|
|
339
357
|
return result.findings.some((f) => f.level === "fail") || result.uncheckedNorms?.length > 0 ? 1 : 0;
|
|
340
358
|
} 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";
|
|
359
|
+
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
360
|
console.error(known ? err.message : `Error: ${err?.message ?? err}`);
|
|
343
361
|
return 2;
|
|
344
362
|
}
|
|
@@ -457,12 +475,18 @@ async function main(argv) {
|
|
|
457
475
|
if (cmd === "render-options") {
|
|
458
476
|
let folder;
|
|
459
477
|
let widths;
|
|
478
|
+
let height;
|
|
479
|
+
let screens;
|
|
480
|
+
let baseline;
|
|
460
481
|
let json = false;
|
|
461
482
|
let error;
|
|
462
483
|
for (let i = 0; i < rest.length && !error; i++) {
|
|
463
484
|
const a = rest[i];
|
|
464
485
|
if (a === "--json") {
|
|
465
486
|
json = true;
|
|
487
|
+
} else if (a === "--baseline") {
|
|
488
|
+
baseline = rest[++i];
|
|
489
|
+
if (!baseline || baseline.startsWith("--")) error = "--baseline needs a URL or an HTML file path made without the kit for the same brief.";
|
|
466
490
|
} else if (a === "--width") {
|
|
467
491
|
const raw = rest[++i];
|
|
468
492
|
const parts = (raw ?? "").split(",");
|
|
@@ -471,6 +495,14 @@ async function main(argv) {
|
|
|
471
495
|
} else {
|
|
472
496
|
widths = [...new Set(parts.map(Number))];
|
|
473
497
|
}
|
|
498
|
+
} else if (a === "--height") {
|
|
499
|
+
const parsed = parseHeight(rest[++i]);
|
|
500
|
+
if (parsed.error) error = parsed.error;
|
|
501
|
+
else height = parsed.height;
|
|
502
|
+
} else if (a === "--screens") {
|
|
503
|
+
const raw = rest[++i];
|
|
504
|
+
if (!/^[0-9]+$/.test(raw ?? "") || Number(raw) < 1) error = "--screens needs a whole number of 1 or more, for example --screens 3.";
|
|
505
|
+
else screens = Number(raw);
|
|
474
506
|
} else if (a.startsWith("--")) {
|
|
475
507
|
error = `Unknown option ${a}.`;
|
|
476
508
|
} else if (folder === undefined) {
|
|
@@ -486,22 +518,24 @@ async function main(argv) {
|
|
|
486
518
|
return 2;
|
|
487
519
|
}
|
|
488
520
|
try {
|
|
489
|
-
const r = await renderOptions({ folder, ...(widths ? { widths } : {}) });
|
|
521
|
+
const r = await renderOptions({ folder, ...(widths ? { widths } : {}), ...(height ? { height } : {}), ...(screens ? { screens } : {}), ...(baseline ? { baseline } : {}) });
|
|
490
522
|
if (json) {
|
|
491
523
|
console.log(JSON.stringify(r, null, 2));
|
|
492
524
|
} else {
|
|
493
|
-
const lines = r.widths.map((w) => `Sheet at ${w} px: ${r.sheets[String(w)]}`);
|
|
525
|
+
const lines = r.widths.filter((w) => r.sheets[String(w)]).map((w) => `Sheet at ${w} px: ${r.sheets[String(w)]}`);
|
|
494
526
|
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(" | ")}`);
|
|
527
|
+
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
528
|
}
|
|
529
|
+
if (r.options.some((o) => o.distances && Object.keys(o.distances).length > 0)) lines.push(STRUCTURE_READS);
|
|
497
530
|
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) =>
|
|
531
|
+
if (r.dropped?.length) lines.push(...r.dropped.map((w) => droppedLine(r, w)));
|
|
532
|
+
if (r.missingSheets?.length) lines.push(...r.missingSheets.map((w) => `The earlier sheet at ${w} px is missing; run that width again.`));
|
|
499
533
|
lines.push(`Measures: ${r.jsonPath}`);
|
|
500
534
|
console.log(lines.join("\n"));
|
|
501
535
|
}
|
|
502
536
|
return 0;
|
|
503
537
|
} catch (err) {
|
|
504
|
-
const known = err?.code === "OPTIONS_INPUT" || err?.code === "BROWSER_NOT_FOUND" || err?.code === "RULES_DIR_NOT_FOUND";
|
|
538
|
+
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
539
|
console.error(known ? err.message : `Error: ${err?.message ?? err}`);
|
|
506
540
|
return 2;
|
|
507
541
|
}
|
|
@@ -509,6 +543,8 @@ async function main(argv) {
|
|
|
509
543
|
if (cmd === "compare-designs") {
|
|
510
544
|
let target;
|
|
511
545
|
let baseline;
|
|
546
|
+
let options;
|
|
547
|
+
let height;
|
|
512
548
|
let widths;
|
|
513
549
|
let json = false;
|
|
514
550
|
let error;
|
|
@@ -516,6 +552,13 @@ async function main(argv) {
|
|
|
516
552
|
const a = rest[i];
|
|
517
553
|
if (a === "--json") {
|
|
518
554
|
json = true;
|
|
555
|
+
} else if (a === "--height") {
|
|
556
|
+
const parsed = parseHeight(rest[++i]);
|
|
557
|
+
if (parsed.error) error = parsed.error;
|
|
558
|
+
else height = parsed.height;
|
|
559
|
+
} else if (a === "--options") {
|
|
560
|
+
options = rest[++i];
|
|
561
|
+
if (!options || options.startsWith("--")) error = "--options needs the folder that holds the option HTML files.";
|
|
519
562
|
} else if (a === "--baseline") {
|
|
520
563
|
baseline = rest[++i];
|
|
521
564
|
if (!baseline || baseline.startsWith("--")) error = "--baseline needs a URL or an HTML file path made without the kit for the same brief.";
|
|
@@ -535,7 +578,9 @@ async function main(argv) {
|
|
|
535
578
|
error = "compare-designs takes one target; give the baseline with --baseline.";
|
|
536
579
|
}
|
|
537
580
|
}
|
|
538
|
-
if (!error &&
|
|
581
|
+
if (!error && height !== undefined && options === undefined) error = "--height goes with --options: it is the viewport height each option is read at.";
|
|
582
|
+
if (!error && options !== undefined && target !== undefined) error = "compare-designs takes a target or --options <folder>, not both.";
|
|
583
|
+
if (!error && target === undefined && options === undefined) error = "compare-designs needs a URL or an HTML file path.";
|
|
539
584
|
if (!error && baseline === undefined) error = "compare-designs needs --baseline <url-or-path>, a page made without the kit for the same brief.";
|
|
540
585
|
if (error) {
|
|
541
586
|
console.error(error);
|
|
@@ -543,6 +588,11 @@ async function main(argv) {
|
|
|
543
588
|
return 2;
|
|
544
589
|
}
|
|
545
590
|
try {
|
|
591
|
+
if (options !== undefined) {
|
|
592
|
+
const many = await compareOptions({ folder: options, baseline, ...(widths ? { widths } : {}), ...(height ? { height } : {}) });
|
|
593
|
+
console.log(json ? JSON.stringify(many, null, 2) : formatCompareOptions(many));
|
|
594
|
+
return 0;
|
|
595
|
+
}
|
|
546
596
|
const r = await compareDesigns({ target, baseline, ...(widths ? { widths } : {}) });
|
|
547
597
|
console.log(json ? JSON.stringify(r, null, 2) : formatCompare(r));
|
|
548
598
|
return 0;
|
|
@@ -610,7 +660,7 @@ async function main(argv) {
|
|
|
610
660
|
});
|
|
611
661
|
}
|
|
612
662
|
if (cmd === "record-break") {
|
|
613
|
-
return runRecord(rest, ["rule", "piece", "effect", "check", "status"], ["rule", "piece", "status"],
|
|
663
|
+
return runRecord(rest, ["rule", "piece", "target", "effect", "check", "status"], ["rule", "piece", "status"],
|
|
614
664
|
"record-break",
|
|
615
665
|
async (v) => {
|
|
616
666
|
const r = await recordBreak({ cwd: process.cwd(), ...v });
|
|
@@ -619,7 +669,7 @@ async function main(argv) {
|
|
|
619
669
|
});
|
|
620
670
|
}
|
|
621
671
|
if (cmd === "record-decision") {
|
|
622
|
-
return runRecord(rest, ["decision", "piece", "goal", "rule", "measure"], ["decision", "piece", "goal", "rule", "measure"],
|
|
672
|
+
return runRecord(rest, ["decision", "piece", "target", "goal", "rule", "measure"], ["decision", "piece", "goal", "rule", "measure"],
|
|
623
673
|
"record-decision",
|
|
624
674
|
async (v) => {
|
|
625
675
|
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
|
|
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
|
|
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 never changed, and is read only for the UC1 count at rest; 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. With no text past the edge at rest, or on a page that scrolls sideways at rest, a declared UC1 leaves the hint saying the move is not on that page at that width. 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 never changed, and is read only for the UC1 count at rest; 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. With no text past the edge at rest, or on a page that scrolls sideways at rest, a declared UC1 leaves the hint saying the move is not on that page at that width. 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
|
|
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 never changed, and is read only for the UC1 count at rest; 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 crosses the edge at rest, or that scrolls sideways at rest, the hint says the move is not on that page at that width.
|
|
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
|
|
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 never changed, and is read only for the UC1 count at rest; 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 crosses the edge at rest, or that scrolls sideways at rest, the hint says the move is not on that page at that width.
|
|
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, maxHueDeg 30, minChroma 10. maxHueDeg and minChroma are our claim, set in the 1.0.3 plan before any page was read: hue `h = atan2(b, a)` in degrees and chroma `C = sqrt(a^2 + b^2)` of the Lab the kit already computes (CSS Color 4 Lab to LCH, section 19 sample code); the hue difference is the smaller angle; below minChroma a color has no reliable hue. They only feed a line in the hint (the share of the first view in the token's hue at another lightness or chroma) and never change the level. How it was picked: for maxDeltaE and minShare, 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. maxDeltaE and minShare are carried over from numbers the kit already uses; maxHueDeg and minChroma are our claim; all four were 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, maxHueDeg: 30, minChroma: 10 }
|
|
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. When a Brand color has a chroma of at least minChroma, the hint also says how much of the first view is in its hue at another lightness or chroma: the colors of the view with a chroma of at least minChroma, a hue within maxHueDeg of the token's and a distance above the cutoff distance, summed on the unrounded shares, when that sum reaches the cutoff share; this line never turns a hint into a pass. 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 |
|