eaa-kit 0.5.0 → 0.7.0

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.
Files changed (69) hide show
  1. package/README.md +53 -5
  2. package/dist/astro/index.d.ts +1 -1
  3. package/dist/astro/index.js +1 -1
  4. package/dist/audit/runners/worker.js +1 -1
  5. package/dist/audit-Bwm1xBdJ.js +2 -0
  6. package/dist/{audit-B282A3EA.js → audit-DRjAY2iY.js} +243 -107
  7. package/dist/{baseline-CuAS2lMk.js → baseline-BpE7DbDq.js} +36 -9
  8. package/dist/baseline-rtnj3RHB.js +2 -0
  9. package/dist/cache-D4dOIuOi.js +219 -0
  10. package/dist/checklist-DDd9jewi.js +44 -0
  11. package/dist/cli/index.js +130 -17
  12. package/dist/{command-C3D7JWn6.js → command-3r4fht5f.js} +102 -10
  13. package/dist/{component-C3GL1Mnu.js → component-ChisoFyY.js} +1 -1
  14. package/dist/{component-DKd3EHOg.js → component-DcCn3BJS.js} +1 -1
  15. package/dist/{coverage-B_Y6l-Ra.js → coverage-cb5kPp48.js} +45 -290
  16. package/dist/coverage-n1X9CkiG.js +3 -0
  17. package/dist/{crawl-BUWPgaGW.js → crawl-BHkJmUkA.js} +42 -8
  18. package/dist/criteria-CnPJKGeb.js +286 -0
  19. package/dist/eleventy/index.d.ts +1 -1
  20. package/dist/eleventy/index.js +1 -1
  21. package/dist/{html-C4vktg0A.js → html-BIxxF3FC.js} +54 -30
  22. package/dist/{impact-DZt2oBCP.js → impact-luGCnN8F.js} +11 -1
  23. package/dist/index.d.ts +87 -1
  24. package/dist/index.js +3 -3
  25. package/dist/{init-CW7LfGT5.js → init-DrFfzjvm.js} +3 -3
  26. package/dist/jsdom-BUYuVJJm.js +3 -0
  27. package/dist/{jsdom-B--cEH-G.js → jsdom-CsW_xVcA.js} +11 -12
  28. package/dist/{json-DROX33kh.js → json-Bus6YhxB.js} +13 -17
  29. package/dist/{json-D_Mnnft5.js → json-CrQmoTj6.js} +1 -1
  30. package/dist/{load-yAR4wzez.js → load-BaWMa-G_.js} +11 -2
  31. package/dist/load-n62iXDq_.js +2 -0
  32. package/dist/nuxt/index.d.ts +1 -1
  33. package/dist/nuxt/index.js +1 -1
  34. package/dist/{playwright-BojtYVUa.js → playwright-ukCr_5o3.js} +3 -2
  35. package/dist/{pool-BO25OIez.js → pool-B4tEUa2S.js} +6 -2
  36. package/dist/{remediation-CMBIrnpN.js → remediation-C0klJblu.js} +35 -4
  37. package/dist/{render-DbGOVmhx.js → render-C1sUZZI_.js} +145 -6
  38. package/dist/{result-BWcYXeRs.js → result-B7_zVxAX.js} +24 -1
  39. package/dist/result-CRmjjoAA.js +2 -0
  40. package/dist/review-CdMK2GpQ.js +161 -0
  41. package/dist/review-DIbOTmOM.js +2 -0
  42. package/dist/{run-CtcEUhbe.d.ts → run-BK2blxMI.d.ts} +18 -0
  43. package/dist/{run-C2nKFcb-.js → run-DrS0Komf.js} +6 -2
  44. package/dist/{sarif-B-UBcVu8.js → sarif-BNCE0PNT.js} +24 -12
  45. package/dist/statement/templates/at.de.md +14 -0
  46. package/dist/statement/templates/at.en.md +14 -0
  47. package/dist/statement/templates/ch.de.md +14 -0
  48. package/dist/statement/templates/ch.en.md +14 -0
  49. package/dist/statement/templates/de.de.md +14 -0
  50. package/dist/statement/templates/de.en.md +14 -0
  51. package/dist/statement/templates/es.en.md +14 -0
  52. package/dist/statement/templates/es.es.md +15 -0
  53. package/dist/statement/templates/fr.en.md +14 -0
  54. package/dist/statement/templates/fr.fr.md +15 -0
  55. package/dist/statement/templates/it.en.md +14 -0
  56. package/dist/statement/templates/it.it.md +15 -0
  57. package/dist/statement/templates/nl.en.md +14 -0
  58. package/dist/statement/templates/nl.nl.md +15 -0
  59. package/dist/{text-CKKpzkYM.js → text-BF1LHMiV.js} +22 -2
  60. package/dist/vite/index.d.ts +1 -1
  61. package/dist/vite/index.js +1 -1
  62. package/dist/webpack/index.d.ts +1 -1
  63. package/dist/webpack/index.js +1 -1
  64. package/dist/worksheet-BIxMtbUd.js +64 -0
  65. package/package.json +3 -2
  66. package/dist/audit-DyHPmGeD.js +0 -2
  67. package/dist/baseline-0u4df12v.js +0 -2
  68. package/dist/jsdom-22Bkt65v.js +0 -3
  69. package/dist/load-CFq2VQtT.js +0 -2
@@ -1,4 +1,4 @@
1
- import { n as auditBuild, r as stderrLogger, t as BuildAuditError } from "../run-C2nKFcb-.js";
1
+ import { n as auditBuild, r as stderrLogger, t as BuildAuditError } from "../run-DrS0Komf.js";
2
2
  import path from "node:path";
3
3
  //#region src/webpack/index.ts
4
4
  var EaaKitWebpackPlugin = class {
@@ -0,0 +1,64 @@
1
+ import { t as WCAG22_AA_CRITERIA } from "./criteria-CnPJKGeb.js";
2
+ import { n as DEFAULT_TAGS } from "./result-B7_zVxAX.js";
3
+ import { a as manualCheckFor, i as rulesByCriterion, o as understandingUrl } from "./coverage-cb5kPp48.js";
4
+ //#region src/audit/worksheet.ts
5
+ function buildWorksheet(options) {
6
+ const rules = rulesByCriterion(options.tags ?? DEFAULT_TAGS);
7
+ const unautomatable = WCAG22_AA_CRITERIA.filter((criterion) => (rules.get(criterion.number) ?? []).length === 0);
8
+ const lines = [
9
+ "# Manual accessibility review",
10
+ "",
11
+ `Of the ${WCAG22_AA_CRITERIA.length} WCAG 2.2 success criteria at Levels A and AA,`,
12
+ `**${unautomatable.length} have no automated rule at all**: no engine, this one included, can`,
13
+ "reach a verdict on them. They are the part of conformance a person has to do, and this is",
14
+ "the list of them.",
15
+ "",
16
+ `Record what you find in \`${options.recordPath}\`, which is the file \`eaa-kit audit --review\``,
17
+ "reads. Ticking a box below records nothing: this document is generated from the record and",
18
+ "never read back into it.",
19
+ "",
20
+ "For each criterion, set `result` to one of:",
21
+ "",
22
+ "- `met` — you checked it and the site meets it.",
23
+ "- `not-met` — you checked it and it does not. Say what is wrong in `note`.",
24
+ "- `not-applicable` — there is nothing on this site the criterion applies to. Not the same",
25
+ " as `met`, and never counted as though it were.",
26
+ "- `unreviewed` — nobody has looked yet. What every entry starts as.",
27
+ "",
28
+ "Set `reviewedOn` to the day you checked it. An entry with no date cannot be shown to still",
29
+ "hold, and an audit run with `--review-max-age` will not count it.",
30
+ ""
31
+ ];
32
+ lines.push("## Criteria no automated rule can reach", "", "These are the review. Nothing in any eaa-kit report says anything about them.", "");
33
+ for (const criterion of unautomatable) lines.push(...criterionEntry(criterion, [], options.review));
34
+ lines.push("## Criteria an audit can reach", "", "An audit reaches these when the rules below actually match something on the site. A run", "that found nothing to check has not shown the criterion is met, so they are worth a look", "too — and where this engine could not decide a rule, the check to do by hand is named.", "");
35
+ for (const criterion of WCAG22_AA_CRITERIA) {
36
+ const forCriterion = rules.get(criterion.number) ?? [];
37
+ if (forCriterion.length === 0) continue;
38
+ lines.push(...criterionEntry(criterion, forCriterion, options.review));
39
+ }
40
+ lines.push("---", "", "A completed review is not a compliance statement, and this tool cannot check that anything", "recorded here is true. It records what somebody says they checked, which is the same", "standing as the claims in the statement it generates.", "");
41
+ return lines.join("\n");
42
+ }
43
+ function criterionEntry(criterion, rules, review) {
44
+ const entry = review?.criteria[criterion.number];
45
+ const lines = [`- [${entry !== void 0 && entry.result !== "unreviewed" ? "x" : " "}] **${criterion.number} ${criterion.title}** (Level ${criterion.level})`];
46
+ const url = understandingUrl(criterion.number);
47
+ if (url !== void 0) lines.push(` What it requires: ${url}`);
48
+ if (rules.length > 0) {
49
+ lines.push(` Rules that touch it: ${rules.join(", ")}`);
50
+ for (const rule of rules) {
51
+ const manual = manualCheckFor(rule);
52
+ if (manual !== void 0) lines.push(` ${rule}: ${manual.check}`);
53
+ }
54
+ }
55
+ if (entry !== void 0 && entry.result !== "unreviewed") {
56
+ const on = entry.reviewedOn === void 0 ? "no date recorded" : `on ${entry.reviewedOn}`;
57
+ lines.push(` Recorded: ${entry.result} (${on})`);
58
+ if (entry.note !== void 0) lines.push(` Note: ${entry.note}`);
59
+ }
60
+ lines.push("");
61
+ return lines;
62
+ }
63
+ //#endregion
64
+ export { buildWorksheet };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eaa-kit",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "WCAG 2.2 AA auditor and EU accessibility statement generator for seven countries (AT, DE, CH, ES, FR, IT, NL). Audits a static build or a running site from the command line.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -79,7 +79,8 @@
79
79
  "typecheck": "tsc --noEmit",
80
80
  "lint": "biome check .",
81
81
  "format": "biome check --write .",
82
- "smoke": "pnpm build && node dist/cli/index.js audit tests/fixtures/site --include about/** --format json && node dist/cli/index.js audit tests/fixtures/site --include \"about/**\" \"blog/**\" \"drafts/**\" \"legacy.htm\" --concurrency 2 && node dist/cli/index.js audit tests/fixtures/site --include about/** --format html && node dist/cli/index.js audit tests/fixtures/site --baseline examples/baseline.json && node -e \"import('./dist/astro/index.js').then(m => { const i = m.default(); if (i.name !== 'eaa-kit' || typeof i.hooks['astro:build:done'] !== 'function') { throw new Error('astro entry point is not an integration') } console.log('astro entry ok') })\" && node dist/cli/index.js statement --config examples/eaa.config.json && node dist/cli/index.js statement --config examples/eaa.config.json --audit examples/report.json --format html && node dist/cli/index.js audit tests/fixtures/site --include about/** --format json --output .eaa-kit/smoke-base.json && node dist/cli/index.js audit tests/fixtures/site --include about/** --format json --output .eaa-kit/smoke-head.json && node dist/cli/index.js diff .eaa-kit/smoke-base.json .eaa-kit/smoke-head.json --format json",
82
+ "smoke": "pnpm build && node dist/cli/index.js audit tests/fixtures/site --include about/** --format json && node dist/cli/index.js audit tests/fixtures/site --include \"about/**\" \"blog/**\" \"drafts/**\" \"legacy.htm\" --concurrency 2 && node dist/cli/index.js audit tests/fixtures/site --include about/** --format html && node dist/cli/index.js audit tests/fixtures/site --baseline examples/baseline.json && node -e \"import('./dist/astro/index.js').then(m => { const i = m.default(); if (i.name !== 'eaa-kit' || typeof i.hooks['astro:build:done'] !== 'function') { throw new Error('astro entry point is not an integration') } console.log('astro entry ok') })\" && node dist/cli/index.js baseline tests/fixtures/site --output .eaa-kit/smoke-baseline.json && node dist/cli/index.js baseline tests/fixtures/site --output .eaa-kit/smoke-baseline.json --prune && node dist/cli/index.js checklist --record .eaa-kit/smoke-review.json --output .eaa-kit/smoke-review.md && node dist/cli/index.js audit tests/fixtures/site --include about/** --review .eaa-kit/smoke-review.json --coverage && node dist/cli/index.js statement --config examples/eaa.config.json && node dist/cli/index.js statement --config examples/eaa.config.json --audit examples/report.json --format html && node dist/cli/index.js audit tests/fixtures/site --include about/** --format json --no-cache --output .eaa-kit/smoke-base.json && node dist/cli/index.js audit tests/fixtures/site --include about/** --format json --no-cache --output .eaa-kit/smoke-head.json && node dist/cli/index.js diff .eaa-kit/smoke-base.json .eaa-kit/smoke-head.json --format json",
83
+ "bench": "pnpm build && node scripts/bench.mjs",
83
84
  "examples": "pnpm build && node scripts/generate-examples.mjs",
84
85
  "test:packaged": "pnpm build && node scripts/test-packaged.mjs"
85
86
  },
@@ -1,2 +0,0 @@
1
- import { n as runAuditCommand } from "./audit-B282A3EA.js";
2
- export { runAuditCommand };
@@ -1,2 +0,0 @@
1
- import { a as readBaseline, r as applyBaseline, t as BaselineError } from "./baseline-CuAS2lMk.js";
2
- export { BaselineError, applyBaseline, readBaseline };
@@ -1,3 +0,0 @@
1
- import "./result-BWcYXeRs.js";
2
- import { n as runJsdomAudit } from "./jsdom-B--cEH-G.js";
3
- export { runJsdomAudit };
@@ -1,2 +0,0 @@
1
- import { r as loadAuditConfig } from "./load-yAR4wzez.js";
2
- export { loadAuditConfig };