ultra11y 4.0.0 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,7 @@
10
10
  "name": "ultra11y",
11
11
  "source": "./",
12
12
  "description": "Automatic accessibility review of the code under change before every commit, push and pull request, plus full WCAG 2.2 AA / RGAA audits and conformance deliverables on demand.",
13
- "version": "4.0.0",
13
+ "version": "4.0.1",
14
14
  "author": { "name": "maxgfr" },
15
15
  "homepage": "https://github.com/maxgfr/ultra11y",
16
16
  "repository": "https://github.com/maxgfr/ultra11y",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ultra11y",
3
3
  "description": "Accessibility for WCAG 2.2 AA and country standards (RGAA…): an automatic review of the code under change before every commit, push and pull request, plus full audits and conformance deliverables on demand.",
4
- "version": "4.0.0",
4
+ "version": "4.0.1",
5
5
  "author": { "name": "maxgfr" },
6
6
  "homepage": "https://github.com/maxgfr/ultra11y",
7
7
  "repository": "https://github.com/maxgfr/ultra11y",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ultra11y",
3
3
  "description": "Accessibility for WCAG 2.2 AA and country standards (RGAA…): an automatic review of the code under change before every commit, push and pull request, plus full audits and conformance deliverables on demand.",
4
- "version": "4.0.0",
4
+ "version": "4.0.1",
5
5
  "author": { "name": "maxgfr", "url": "https://github.com/maxgfr" },
6
6
  "homepage": "https://github.com/maxgfr/ultra11y",
7
7
  "repository": "https://github.com/maxgfr/ultra11y",
@@ -27,7 +27,7 @@ import { fileURLToPath } from "node:url";
27
27
  // Ownership marker: `ultra11y install --opencode` refuses to overwrite a plugin file that
28
28
  // does not carry it, so a user's own ultra11y.js is never clobbered.
29
29
  const ULTRA11Y_OPENCODE_PLUGIN = "ULTRA11Y_OPENCODE_PLUGIN";
30
- const ULTRA11Y_PLUGIN_VERSION = "4.0.0";
30
+ const ULTRA11Y_PLUGIN_VERSION = "4.0.1";
31
31
 
32
32
  const here = dirname(fileURLToPath(import.meta.url));
33
33
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultra11y",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "description": "Audit HTML/CSS/JSX against WCAG 2.2 AA and produce a dated compliance report, or author/review accessible markup (native-HTML-first). A skills.sh agent skill: an install-free static engine (bundled, no npm install) plus the agent's judgment, with check/verify gates against hallucinated non-conformities, and pluggable in-repo standards packs (RGAA France first; Section 508 & EN 301 549 next).",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@10.33.0",
@@ -6,7 +6,7 @@ import { join as join45, relative as relative5, sep as sep7, dirname as dirname1
6
6
  import { fileURLToPath as fileURLToPath5, pathToFileURL as pathToFileURL3 } from "url";
7
7
 
8
8
  // src/types.ts
9
- var VERSION = "4.0.0";
9
+ var VERSION = "4.0.1";
10
10
  var SCHEMA_VERSION = 2;
11
11
 
12
12
  // src/audit.ts
@@ -56453,13 +56453,15 @@ function auditCollected(root, payload) {
56453
56453
  const v = validateSnapshotMeta(payload.meta);
56454
56454
  if (!v.ok || !v.meta) return { ok: false, error: v.issues.map((i2) => `${i2.path}: ${i2.message}`).join("; ") };
56455
56455
  if (typeof payload.dom !== "string" || !payload.dom.trim()) return { ok: false, error: "dom is required" };
56456
+ const shot = typeof payload.screenshot === "string" && payload.screenshot.trim() ? payload.screenshot : void 0;
56456
56457
  const dir = writeSnapshot(root, {
56457
56458
  meta: v.meta,
56458
56459
  dom: payload.dom,
56459
56460
  ...payload.styles ? { styles: payload.styles } : {},
56460
56461
  ...payload.boxes ? { boxes: payload.boxes } : {},
56461
56462
  ...payload.axtree ? { axtree: payload.axtree } : {},
56462
- ...payload.css ? { css: payload.css } : {}
56463
+ ...payload.css ? { css: payload.css } : {},
56464
+ ...shot ? { screenshotBase64: shot } : {}
56463
56465
  });
56464
56466
  return { ok: true, result: runAudit({ inputs: [join40(dir, "dom.html")] }) };
56465
56467
  }
@@ -5,7 +5,7 @@ when_to_use: "Invoke WITHOUT being asked whenever changed front-end code should
5
5
  allowed-tools: Bash(node ${CLAUDE_SKILL_DIR}/scripts/ultra11y.mjs *), Read, Grep, Glob
6
6
  license: MIT
7
7
  metadata:
8
- version: 4.0.0
8
+ version: 4.0.1
9
9
  ---
10
10
 
11
11
  # review-a11y — accessibility review of changed code
@@ -6,7 +6,7 @@ import { join as join45, relative as relative5, sep as sep7, dirname as dirname1
6
6
  import { fileURLToPath as fileURLToPath5, pathToFileURL as pathToFileURL3 } from "url";
7
7
 
8
8
  // src/types.ts
9
- var VERSION = "4.0.0";
9
+ var VERSION = "4.0.1";
10
10
  var SCHEMA_VERSION = 2;
11
11
 
12
12
  // src/audit.ts
@@ -56453,13 +56453,15 @@ function auditCollected(root, payload) {
56453
56453
  const v = validateSnapshotMeta(payload.meta);
56454
56454
  if (!v.ok || !v.meta) return { ok: false, error: v.issues.map((i2) => `${i2.path}: ${i2.message}`).join("; ") };
56455
56455
  if (typeof payload.dom !== "string" || !payload.dom.trim()) return { ok: false, error: "dom is required" };
56456
+ const shot = typeof payload.screenshot === "string" && payload.screenshot.trim() ? payload.screenshot : void 0;
56456
56457
  const dir = writeSnapshot(root, {
56457
56458
  meta: v.meta,
56458
56459
  dom: payload.dom,
56459
56460
  ...payload.styles ? { styles: payload.styles } : {},
56460
56461
  ...payload.boxes ? { boxes: payload.boxes } : {},
56461
56462
  ...payload.axtree ? { axtree: payload.axtree } : {},
56462
- ...payload.css ? { css: payload.css } : {}
56463
+ ...payload.css ? { css: payload.css } : {},
56464
+ ...shot ? { screenshotBase64: shot } : {}
56463
56465
  });
56464
56466
  return { ok: true, result: runAudit({ inputs: [join40(dir, "dom.html")] }) };
56465
56467
  }
@@ -4,7 +4,7 @@ description: "Use to AUDIT existing HTML/CSS/JSX against WCAG 2.2 AA accessibili
4
4
  when_to_use: "Invoke when the user asks for an accessibility AUDIT or a formal deliverable: audit a repo, site or page against WCAG 2.2 AA or a country standard (RGAA, Section 508, EN 301 549); produce a dated conformance report, a criterion grid, a PRD backlog, or tickets (GitHub/GitLab/Jira); author accessible markup from scratch; wire the repo gate (init --hook/--ci) or a rendered-DOM capture pipeline. For a review of the code UNDER CHANGE (diff, branch, PR), use the `review-a11y` skill instead."
5
5
  license: MIT
6
6
  metadata:
7
- version: 4.0.0
7
+ version: 4.0.1
8
8
  ---
9
9
 
10
10
  # ultra11y — audit WCAG 2.2 AA and write accessible markup
@@ -6,7 +6,7 @@ import { join as join45, relative as relative5, sep as sep7, dirname as dirname1
6
6
  import { fileURLToPath as fileURLToPath5, pathToFileURL as pathToFileURL3 } from "url";
7
7
 
8
8
  // src/types.ts
9
- var VERSION = "4.0.0";
9
+ var VERSION = "4.0.1";
10
10
  var SCHEMA_VERSION = 2;
11
11
 
12
12
  // src/audit.ts
@@ -56453,13 +56453,15 @@ function auditCollected(root, payload) {
56453
56453
  const v = validateSnapshotMeta(payload.meta);
56454
56454
  if (!v.ok || !v.meta) return { ok: false, error: v.issues.map((i2) => `${i2.path}: ${i2.message}`).join("; ") };
56455
56455
  if (typeof payload.dom !== "string" || !payload.dom.trim()) return { ok: false, error: "dom is required" };
56456
+ const shot = typeof payload.screenshot === "string" && payload.screenshot.trim() ? payload.screenshot : void 0;
56456
56457
  const dir = writeSnapshot(root, {
56457
56458
  meta: v.meta,
56458
56459
  dom: payload.dom,
56459
56460
  ...payload.styles ? { styles: payload.styles } : {},
56460
56461
  ...payload.boxes ? { boxes: payload.boxes } : {},
56461
56462
  ...payload.axtree ? { axtree: payload.axtree } : {},
56462
- ...payload.css ? { css: payload.css } : {}
56463
+ ...payload.css ? { css: payload.css } : {},
56464
+ ...shot ? { screenshotBase64: shot } : {}
56463
56465
  });
56464
56466
  return { ok: true, result: runAudit({ inputs: [join40(dir, "dom.html")] }) };
56465
56467
  }
package/src/auditor.ts CHANGED
Binary file
package/src/dev.ts CHANGED
@@ -336,11 +336,18 @@ async function readBody(req: IncomingMessage, limit = 64 * 1024 * 1024): Promise
336
336
  /** Audit one collected page: persist it as a snapshot, then run the engine over its DOM. */
337
337
  export function auditCollected(
338
338
  root: string,
339
- payload: { meta?: unknown; dom?: unknown; styles?: StyleDigest; boxes?: BoxDigest; axtree?: AxNode; css?: CssDigest },
339
+ payload: { meta?: unknown; dom?: unknown; styles?: StyleDigest; boxes?: BoxDigest; axtree?: AxNode; css?: CssDigest; screenshot?: unknown },
340
340
  ): { ok: true; result: AuditResult } | { ok: false; error: string } {
341
341
  const v = validateSnapshotMeta(payload.meta);
342
342
  if (!v.ok || !v.meta) return { ok: false, error: v.issues.map((i) => `${i.path}: ${i.message}`).join("; ") };
343
343
  if (typeof payload.dom !== "string" || !payload.dom.trim()) return { ok: false, error: "dom is required" };
344
+ // The browser extension DOES capture a viewport screenshot and posts it here
345
+ // (extension/background.js). It used to be dropped on the floor: this signature had no
346
+ // `screenshot`, so `screen.png` was never written for an extension-collected page and the
347
+ // pixel tier — the only tier that can answer contrast over a gradient or an image — silently
348
+ // declined on every one of them. Typed `unknown` and checked, because a producer is
349
+ // untrusted input like any other field here.
350
+ const shot = typeof payload.screenshot === "string" && payload.screenshot.trim() ? payload.screenshot : undefined;
344
351
  const dir = writeSnapshot(root, {
345
352
  meta: v.meta,
346
353
  dom: payload.dom,
@@ -348,6 +355,7 @@ export function auditCollected(
348
355
  ...(payload.boxes ? { boxes: payload.boxes } : {}),
349
356
  ...(payload.axtree ? { axtree: payload.axtree } : {}),
350
357
  ...(payload.css ? { css: payload.css } : {}),
358
+ ...(shot ? { screenshotBase64: shot } : {}),
351
359
  });
352
360
  return { ok: true, result: runAudit({ inputs: [join(dir, "dom.html")] }) };
353
361
  }
package/src/types.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // Single source of truth for shared types + the embedded version. sync-version.mjs
2
2
  // rewrites VERSION at release time (kept in lockstep with package.json + SKILL.md).
3
- export const VERSION = "4.0.0";
3
+ export const VERSION = "4.0.1";
4
4
  export const SCHEMA_VERSION = 2;
5
5
 
6
6
  // Lang = the UI FRAME's language — the `L` localization tables each module (report,