@junixlabs/uxcli 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/package.json +1 -1
- package/src/page.js +2 -1
- package/src/probes/contrast/spec.md +1 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
`uxcli` measures a running UI against its design commitments. Built for AI coding agents that need to verify the frontend they just wrote.
|
|
4
4
|
|
|
5
|
-
**Status:** early. Three flow probes (WCAG 3.3.4, 3.3.7, 3.2.3), three single-screen probes (2.4.7, 1.4.12, 1.4.3), a gate that proves each probe can fail and
|
|
5
|
+
**Status:** early. Three flow probes (WCAG 3.3.4, 3.3.7, 3.2.3), three single-screen probes (2.4.7, 1.4.12, 1.4.3), a gate that proves each probe can fail on a seeded fixture and stays silent or passes on its clean twin, a verdict card, and a second reader. On npm as `@junixlabs/uxcli`; the command is `uxcli`.
|
|
6
6
|
|
|
7
7
|
**Core rule: no commitment, no verdict.** Every finding cites the commitment it enforces: W3C's, yours, or none. Where no one has committed, `uxcli` says nothing.
|
|
8
8
|
|
|
@@ -42,7 +42,7 @@ The one input the machine cannot derive, the journey, is written by a human. Eve
|
|
|
42
42
|
| `gate` run every probe's falsification pair | |
|
|
43
43
|
| `why <rule>` the probe's definition | |
|
|
44
44
|
|
|
45
|
-
Every probe ships with a pair of fixtures: one where it must fail
|
|
45
|
+
Every probe ships with a pair of fixtures: one where it must fail and a clean twin. The twin of a single-screen probe must reach `pass`; the twins of the flow probes may still be silent (`not-applicable`) until each has a twin on its satisfied branch, tracked in [ROADMAP.md](ROADMAP.md). A probe without that pair cannot say `fail`. `gate` enforces it. Exit codes: 0 no fail, 2 at least one fail, 1 the run could not be carried out.
|
|
46
46
|
|
|
47
47
|
What comes next, and in what order, is in [ROADMAP.md](ROADMAP.md).
|
|
48
48
|
|
package/package.json
CHANGED
package/src/page.js
CHANGED
|
@@ -9,7 +9,8 @@ export const PAGE_PROBES = [focusVisible, textSpacing, contrast];
|
|
|
9
9
|
|
|
10
10
|
export async function runPage(url, { browser, state, only } = {}) {
|
|
11
11
|
const own = !browser; if (own) browser = await launch();
|
|
12
|
-
|
|
12
|
+
// bypassCSP: the contrast probe injects axe-core; a page's Content-Security-Policy would otherwise block it (instrument setting, recorded in contrast/spec.md).
|
|
13
|
+
const bctx = await browser.newContext({ viewport: { width: 1280, height: 800 }, storageState: state || undefined, bypassCSP: true });
|
|
13
14
|
const page = await bctx.newPage();
|
|
14
15
|
const result = { url, ranAt: new Date().toISOString(), title: null, probes: [] };
|
|
15
16
|
const probes = only ? PAGE_PROBES.filter(p => only.includes(p.id) || only.includes(p.sc)) : PAGE_PROBES;
|
|
@@ -9,4 +9,5 @@
|
|
|
9
9
|
|
|
10
10
|
## Revisions
|
|
11
11
|
|
|
12
|
+
- 2026-09-06 **page context bypasses Content-Security-Policy.** GOV.UK's `script-src` blocked the axe-core injection and the probe returned `unmeasurable · probe error`; the context is now created with `bypassCSP: true`, an instrument setting that does not change what is measured.
|
|
12
13
|
- 2026-09-06 first version. Bench: ACT afw4f7 cases (34) with axe-core 4.13.0, recorded in the working notes.
|