a11ign 0.1.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 (59) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +140 -0
  3. package/dist/action/post-comment.d.ts +20 -0
  4. package/dist/action/post-comment.d.ts.map +1 -0
  5. package/dist/action/post-comment.js +93 -0
  6. package/dist/action/post-comment.js.map +1 -0
  7. package/dist/action/run.d.ts +2 -0
  8. package/dist/action/run.d.ts.map +1 -0
  9. package/dist/action/run.js +119 -0
  10. package/dist/action/run.js.map +1 -0
  11. package/dist/action/summary.d.ts +180 -0
  12. package/dist/action/summary.d.ts.map +1 -0
  13. package/dist/action/summary.js +355 -0
  14. package/dist/action/summary.js.map +1 -0
  15. package/dist/cli.d.ts +279 -0
  16. package/dist/cli.d.ts.map +1 -0
  17. package/dist/cli.js +1028 -0
  18. package/dist/cli.js.map +1 -0
  19. package/dist/fault-remediation.d.ts +87 -0
  20. package/dist/fault-remediation.d.ts.map +1 -0
  21. package/dist/fault-remediation.js +156 -0
  22. package/dist/fault-remediation.js.map +1 -0
  23. package/dist/forms/config.d.ts +69 -0
  24. package/dist/forms/config.d.ts.map +1 -0
  25. package/dist/forms/config.js +185 -0
  26. package/dist/forms/config.js.map +1 -0
  27. package/dist/forms/coverage.d.ts +51 -0
  28. package/dist/forms/coverage.d.ts.map +1 -0
  29. package/dist/forms/coverage.js +80 -0
  30. package/dist/forms/coverage.js.map +1 -0
  31. package/dist/forms/draft.d.ts +62 -0
  32. package/dist/forms/draft.d.ts.map +1 -0
  33. package/dist/forms/draft.js +165 -0
  34. package/dist/forms/draft.js.map +1 -0
  35. package/dist/index.d.ts +10 -0
  36. package/dist/index.d.ts.map +1 -0
  37. package/dist/index.js +9 -0
  38. package/dist/index.js.map +1 -0
  39. package/dist/report.d.ts +48 -0
  40. package/dist/report.d.ts.map +1 -0
  41. package/dist/report.js +322 -0
  42. package/dist/report.js.map +1 -0
  43. package/dist/scan/axe-results.d.ts +25 -0
  44. package/dist/scan/axe-results.d.ts.map +1 -0
  45. package/dist/scan/axe-results.js +111 -0
  46. package/dist/scan/axe-results.js.map +1 -0
  47. package/dist/scan/axe.d.ts +158 -0
  48. package/dist/scan/axe.d.ts.map +1 -0
  49. package/dist/scan/axe.js +203 -0
  50. package/dist/scan/axe.js.map +1 -0
  51. package/dist/scan/page-title.d.ts +3 -0
  52. package/dist/scan/page-title.d.ts.map +1 -0
  53. package/dist/scan/page-title.js +41 -0
  54. package/dist/scan/page-title.js.map +1 -0
  55. package/dist/scan/run-axe.d.ts +2 -0
  56. package/dist/scan/run-axe.d.ts.map +1 -0
  57. package/dist/scan/run-axe.js +39 -0
  58. package/dist/scan/run-axe.js.map +1 -0
  59. package/package.json +60 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,YAAY,EAA2C,MAAM,eAAe,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAe,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;AAC9G,OAAO,EAAE,WAAW,EAAE,UAAU,EAAmC,MAAM,sBAAsB,CAAC;AAChG,OAAO,EAAE,yBAAyB,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;A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,IAAI,GAAG,CAAC,KAAK,EAAE,CAAC;YAC1E,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC;QAC3C,CAAC;QACD,uGAAuG;QACvG,kGAAkG;QAClG,8FAA8F;QAC9F,sGAAsG;QACtG,mGAAmG;QACnG,OAAO,CAAC,IAAI,CAAC,GAAG,YAAY,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACpE,CAAC,CAAC,CAAC"}
@@ -0,0 +1,87 @@
1
+ /**
2
+ * A stranger meeting `nvda.start failed: NVDA is not supported` learns nothing from the bare message —
3
+ * that knowledge lives in `docs/nvda-worker-runbook.md` and in the heads of whoever has debugged this
4
+ * before. An error a user cannot act on is a support request, and there is nobody to answer it.
5
+ *
6
+ * Every fault code the worker can report over the wire (`packages/nvda-worker/src/capture-faults.mjs`'s
7
+ * `FAULT`) gets an entry here naming three things: WHAT happened, WHAT TO TRY, and WHERE TO LOOK for
8
+ * more. #81 extended this table to a JUDGE-layer fault too — `packages/scorer/python/score.py`'s
9
+ * `ArtifactSchemaMismatch.FAULT`, which reaches this table via `local-judge.ts`'s `scoreCapture` reading
10
+ * a parseable line the Python process prints on stdout, not over HTTP — the shape differs but the reason
11
+ * for having a table at all does not: a caller must not have to parse a message to act on a failure.
12
+ *
13
+ * DUPLICATED, deliberately: `@a11ign/nvda-worker` is not a dependency of this package.
14
+ * `isolation-smoke.mjs` asserts it must not be — the CLI speaks HTTP to a worker, and importing that
15
+ * package once already broke the published bundle (it reaches guidepup, which throws at import wherever
16
+ * there is no screen reader; see `cli.ts`'s own comment on `no-win32-imports.test.ts`'s finding). So the
17
+ * four fault-code STRINGS below are copied rather than imported, and pinned equal to
18
+ * `capture-faults.mjs`'s `FAULT` values by `fault-remediation.test.ts` — which reads that file by its
19
+ * relative SOURCE path, in a TEST only, never as a production import, so the pin cannot be fooled by a
20
+ * stale published `dist` the way a production cross-package import could be.
21
+ *
22
+ * #398 EXTENDED THIS TABLE TO CLIENT-SIDE DOUBTS, NOT ONLY WORKER FAULTS: `wrong-content` and
23
+ * `contained` are `CaptureDoubt`'s two values (`@a11ign/evidence/verify`) — a capture the worker
24
+ * returned as a 200, that this tool nonetheless doubts describes the page. They share this table
25
+ * because a caller meeting either one needs the identical WHAT/TRY/WHERE shape a worker fault gets, not
26
+ * a bare hand-written sentence — `formatDoubtMessage` gives them their own preamble so "This capture may
27
+ * not describe the page" is never confused with "The worker's capture failed", which would misdescribe a
28
+ * successful HTTP response this tool merely doubts the CONTENT of.
29
+ */
30
+ export interface FaultRemediation {
31
+ /** What the fault code means, in plain language. */
32
+ readonly what: string;
33
+ /** What a caller of this CLI can actually try — not "read the source". */
34
+ readonly tryThis: string;
35
+ /** Where the deeper reference lives, for whoever operates the worker. */
36
+ readonly whereToLook: string;
37
+ }
38
+ export declare const FAULT_REMEDIATION: Record<string, FaultRemediation>;
39
+ /** The remediation for a fault code, or `undefined` for one this file does not yet know about. */
40
+ export declare function remediationFor(fault: string): FaultRemediation | undefined;
41
+ /**
42
+ * The full message a person sees for a worker-reported fault — never the bare `(fault: <code>)`
43
+ * `describeWorkerError` used to stop at. A fault this file has not been taught yet still says so
44
+ * explicitly, rather than silently falling back to nothing: "no remediation recorded" is itself
45
+ * information, and a NEW fault shipping with no entry here is exactly the gap this file exists to close.
46
+ */
47
+ export declare function formatFaultMessage(fault: string, message: string | undefined,
48
+ /**
49
+ * How far a PARTIAL capture got before the fault, when the worker reported one — issue #336. "We ran
50
+ * out of time after N marks" and "we could not read your page at all" are different findings, and
51
+ * only one of them invites a retry; bundled into one object rather than two more parameters, per this
52
+ * repo's own rule against growing positional argument lists.
53
+ */
54
+ progress?: {
55
+ reachedPhase?: string;
56
+ markCount?: number;
57
+ }): string;
58
+ /**
59
+ * The full message for a `CaptureDoubt` (`@a11ign/evidence/verify`) — a capture the worker returned as a
60
+ * SUCCESS, that this tool nonetheless doubts describes the page. #398: printed only after the whole
61
+ * capture finished, which is why the reporting path matters as much as the wording does — see this row's
62
+ * own issue for the timing half. Deliberately its own function rather than a `formatFaultMessage` call:
63
+ * "The worker's capture failed" would misdescribe a 200 OK response whose CONTENT is merely suspect.
64
+ */
65
+ export declare function formatDoubtMessage(doubt: string, detail: string): string;
66
+ /**
67
+ * The early, IN-FLIGHT half of #398's "contained" doubt — #426. `formatDoubtMessage` above is a VERDICT
68
+ * printed once the whole capture has finished; this is an observation from partway through it, and the
69
+ * wording says so rather than reading like the final answer. "A capture is not an instant" (this
70
+ * project's own rule, `verify.ts`'s consent-overlay incident): the overlay was present for some probes
71
+ * and gone for others on a real page, so a notice that does not say WHEN it looked inherits that
72
+ * ambiguity instead of resolving it.
73
+ *
74
+ * **Deliberately NOT consent-specific, corrected before this shipped rather than after.** The first draft
75
+ * named a consent overlay outright; #426's own fleet validation fired the identical notice on hubspot.com,
76
+ * a positive from a different mechanism entirely (#398's own "reached almost none of this page"). A
77
+ * consent-specific sentence would have been wrong on that page while being right on theregister.com's real
78
+ * consent wall — so the wording states only what both mechanisms share and nothing this early reader
79
+ * cannot actually tell apart.
80
+ *
81
+ * Never a rejection, and cannot become one from here — `capture-client.mjs`'s `onProgress` return value
82
+ * is unused, so nothing this prints can touch whether the capture continues. It fires once per capture
83
+ * (`cli.ts`'s `captureViaWorker` tracks that) precisely so five minutes of silence does not read as five
84
+ * minutes of the SAME warning repeating.
85
+ */
86
+ export declare function formatEarlyContainmentNotice(observedAtMs: number): string;
87
+ //# sourceMappingURL=fault-remediation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fault-remediation.d.ts","sourceRoot":"","sources":["../src/fault-remediation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,WAAW,gBAAgB;IAC/B,oDAAoD;IACpD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,0EAA0E;IAC1E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,yEAAyE;IACzE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CA8E9D,CAAC;AAEF,kGAAkG;AAClG,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,CAE1E;AAiBD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS;AAC3E;;;;;GAKG;AACH,QAAQ,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAQlE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAExE;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,4BAA4B,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAKzE"}
@@ -0,0 +1,156 @@
1
+ export const FAULT_REMEDIATION = {
2
+ "screen-reader-mute": {
3
+ what: "NVDA on the worker is running and answering keystrokes, but has stopped speaking.",
4
+ tryThis: "The worker already retries this once on a fresh NVDA before reporting it, so a second "
5
+ + "attempt from here is unlikely to help by itself — retry the capture anyway (a cold NVDA start "
6
+ + "clears most cases), and if it keeps happening on a worker you operate, see the runbook.",
7
+ whereToLook: "docs/nvda-worker-runbook.md, \"What degrades is NVDA's speech channel\" — or ask "
8
+ + "whoever operates that worker to read it.",
9
+ },
10
+ "screen-reader-start-failed": {
11
+ what: "NVDA would not start on the worker at all.",
12
+ tryThis: "Retry the capture — this is usually a guest still settling after auto-logon and clears on "
13
+ + "its own. If it persists on a worker you operate, the exact wording matters: \"NVDA is not "
14
+ + "supported\" and \"NVDA not installed\" read almost identically and are different problems.",
15
+ whereToLook: "docs/nvda-worker-runbook.md, \"nvda.start failed: NVDA is not supported\" — or ask "
16
+ + "whoever operates that worker to read it.",
17
+ },
18
+ "page-unreachable": {
19
+ what: "The browser on the worker could not reach the requested page at all.",
20
+ tryThis: "Check the URL loads in an ordinary browser from wherever the WORKER sits, not just from "
21
+ + "this machine — a `localhost` URL only works if the worker itself is local, and a page server "
22
+ + "that stopped running produces exactly this fault.",
23
+ whereToLook: "the URL you passed, and whether the worker can reach it — this is rarely a worker-side "
24
+ + "problem to escalate.",
25
+ },
26
+ "wrong-page": {
27
+ what: "The browser on the worker reached A page, but it was not the one requested.",
28
+ tryThis: "Check for a redirect, a consent/cookie interstitial the site added, or a cached response "
29
+ + "from a page server serving stale content.",
30
+ whereToLook: "the target site's own behaviour for the URL you passed — compare what it does in an "
31
+ + "ordinary browser.",
32
+ },
33
+ "hard-timeout": {
34
+ what: "The capture ran too long and the worker abandoned it before your page was fully read. This "
35
+ + "is the documented failure mode of a heavy page (many images and headings, a form, a consent "
36
+ + "banner) — the same shape docs/try-it.md tells a first reader to point this at.",
37
+ tryThis: "Retrying will not help by itself — the worker already spent its whole budget. If the page "
38
+ + "has a lot of content, try narrowing the task to a smaller flow first (a single form, not a "
39
+ + "whole checkout) to see whether the tool completes at all on that site; if it does, the full "
40
+ + "page may simply need a longer budget than this worker is configured for.",
41
+ whereToLook: "the `reachedPhase` this message names, if one is given — that is how far the capture "
42
+ + "got before it ran out of time, not a guess. docs/nvda-worker-runbook.md if you operate this "
43
+ + "worker and want to raise the timeout.",
44
+ },
45
+ "artifact-schema-mismatch": {
46
+ what: "The shipped scorer weights and the code running them disagree about the evidence format "
47
+ + "(schema version, encoder hash, feature order, feature scale, or feature multipliers). This is a "
48
+ + "known state of the current release, not a problem with your machine or your install.",
49
+ tryThis: "There is nothing to try locally — retrying will not help, because the mismatch is between "
50
+ + "two things this tool ships together and did not this time. Wait for a new release; if none has "
51
+ + "been announced, file an issue naming this fault code.",
52
+ whereToLook: "this is expected while a model migration is in progress — check the project's release "
53
+ + "notes or open issues for a note about it before assuming it is new.",
54
+ },
55
+ // #398: the two `CaptureDoubt` values (`@a11ign/evidence/verify`) -- CLIENT-SIDE judgements about a
56
+ // capture the worker returned successfully, never a worker-reported `fault`. They share this table
57
+ // because a caller meeting either one needs the identical WHAT/TRY/WHERE shape, not a bare sentence --
58
+ // and `formatDoubtMessage` below gives them their own preamble rather than borrowing
59
+ // `formatFaultMessage`'s "The worker's capture failed", which would misdescribe a 200 OK response this
60
+ // tool merely doubts the CONTENT of.
61
+ "wrong-content": {
62
+ what: "After retrying, the capture still does not appear to be about the page you asked for -- most "
63
+ + "likely a stale browser window showing chrome or a previous page rather than the one requested.",
64
+ tryThis: "Check the URL loads correctly in an ordinary browser, and that nothing (a redirect, a "
65
+ + "geofence, a login wall) sends it somewhere else before the page you expect appears.",
66
+ whereToLook: "the target URL's own behaviour -- this is rarely something to fix in this tool.",
67
+ },
68
+ "contained": {
69
+ what: "The screen reader reached the right page (the title matches) but read almost none of it -- "
70
+ + "the documented shape of opening on a cookie or consent overlay that Escape did not dismiss. "
71
+ + "Reporting no findings rather than describing the dialog is deliberate: an overlay's own text is "
72
+ + "not a finding about your page.",
73
+ tryThis: "Run again against a URL that skips the banner -- a staging build, or a page reached with "
74
+ + "the cookie already set -- or tell us: an overlay Escape could not dismiss is a defect in this "
75
+ + "tool, not in your page.",
76
+ whereToLook: "docs/try-it.md, \"The consent banner is the real risk\" -- the same guidance a first "
77
+ + "reader is sent before they run this at all.",
78
+ },
79
+ };
80
+ /** The remediation for a fault code, or `undefined` for one this file does not yet know about. */
81
+ export function remediationFor(fault) {
82
+ return FAULT_REMEDIATION[fault];
83
+ }
84
+ /**
85
+ * The WHAT/TRY/WHERE tail shared by every message this file formats, regardless of the sentence in front
86
+ * of it — split out so `formatFaultMessage` (a worker-reported failure) and `formatDoubtMessage` (a
87
+ * client-side doubt about an otherwise-successful capture, #398) can each supply their own framing
88
+ * without duplicating the "no remediation recorded yet" fallback or the field-by-field formatting.
89
+ */
90
+ function remediationTail(code) {
91
+ const remediation = remediationFor(code);
92
+ if (!remediation) {
93
+ return `\n No remediation is recorded for this code yet — please file an issue naming it.`;
94
+ }
95
+ return `\n What happened: ${remediation.what}\n Try: ${remediation.tryThis}\n`
96
+ + ` See: ${remediation.whereToLook}`;
97
+ }
98
+ /**
99
+ * The full message a person sees for a worker-reported fault — never the bare `(fault: <code>)`
100
+ * `describeWorkerError` used to stop at. A fault this file has not been taught yet still says so
101
+ * explicitly, rather than silently falling back to nothing: "no remediation recorded" is itself
102
+ * information, and a NEW fault shipping with no entry here is exactly the gap this file exists to close.
103
+ */
104
+ export function formatFaultMessage(fault, message,
105
+ /**
106
+ * How far a PARTIAL capture got before the fault, when the worker reported one — issue #336. "We ran
107
+ * out of time after N marks" and "we could not read your page at all" are different findings, and
108
+ * only one of them invites a retry; bundled into one object rather than two more parameters, per this
109
+ * repo's own rule against growing positional argument lists.
110
+ */
111
+ progress) {
112
+ const base = `The worker's capture failed: ${message ?? "no message given"} (fault: ${fault}).`;
113
+ const progressLine = progress?.reachedPhase
114
+ ? `\n Got as far as: "${progress.reachedPhase}"`
115
+ + (typeof progress.markCount === "number"
116
+ ? ` (${progress.markCount} progress mark(s) recorded before stopping)` : "")
117
+ : "";
118
+ return `${base}${progressLine}${remediationTail(fault)}`;
119
+ }
120
+ /**
121
+ * The full message for a `CaptureDoubt` (`@a11ign/evidence/verify`) — a capture the worker returned as a
122
+ * SUCCESS, that this tool nonetheless doubts describes the page. #398: printed only after the whole
123
+ * capture finished, which is why the reporting path matters as much as the wording does — see this row's
124
+ * own issue for the timing half. Deliberately its own function rather than a `formatFaultMessage` call:
125
+ * "The worker's capture failed" would misdescribe a 200 OK response whose CONTENT is merely suspect.
126
+ */
127
+ export function formatDoubtMessage(doubt, detail) {
128
+ return `This capture may not describe the page: ${detail} (${doubt}).${remediationTail(doubt)}`;
129
+ }
130
+ /**
131
+ * The early, IN-FLIGHT half of #398's "contained" doubt — #426. `formatDoubtMessage` above is a VERDICT
132
+ * printed once the whole capture has finished; this is an observation from partway through it, and the
133
+ * wording says so rather than reading like the final answer. "A capture is not an instant" (this
134
+ * project's own rule, `verify.ts`'s consent-overlay incident): the overlay was present for some probes
135
+ * and gone for others on a real page, so a notice that does not say WHEN it looked inherits that
136
+ * ambiguity instead of resolving it.
137
+ *
138
+ * **Deliberately NOT consent-specific, corrected before this shipped rather than after.** The first draft
139
+ * named a consent overlay outright; #426's own fleet validation fired the identical notice on hubspot.com,
140
+ * a positive from a different mechanism entirely (#398's own "reached almost none of this page"). A
141
+ * consent-specific sentence would have been wrong on that page while being right on theregister.com's real
142
+ * consent wall — so the wording states only what both mechanisms share and nothing this early reader
143
+ * cannot actually tell apart.
144
+ *
145
+ * Never a rejection, and cannot become one from here — `capture-client.mjs`'s `onProgress` return value
146
+ * is unused, so nothing this prints can touch whether the capture continues. It fires once per capture
147
+ * (`cli.ts`'s `captureViaWorker` tracks that) precisely so five minutes of silence does not read as five
148
+ * minutes of the SAME warning repeating.
149
+ */
150
+ export function formatEarlyContainmentNotice(observedAtMs) {
151
+ const seconds = (observedAtMs / 1000).toFixed(1);
152
+ return `NOTICE (as of ${seconds}s into this capture — not the final result): the screen reader has `
153
+ + `reached almost none of this page. The capture is still running; this may still clear.`
154
+ + `${remediationTail("contained")}`;
155
+ }
156
+ //# sourceMappingURL=fault-remediation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fault-remediation.js","sourceRoot":"","sources":["../src/fault-remediation.ts"],"names":[],"mappings":"AAsCA,MAAM,CAAC,MAAM,iBAAiB,GAAqC;IACjE,oBAAoB,EAAE;QACpB,IAAI,EAAE,mFAAmF;QACzF,OAAO,EAAE,wFAAwF;cAC7F,gGAAgG;cAChG,yFAAyF;QAC7F,WAAW,EAAE,mFAAmF;cAC5F,0CAA0C;KAC/C;IACD,4BAA4B,EAAE;QAC5B,IAAI,EAAE,4CAA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IACjD,OAAO,iBAAiB,OAAO,qEAAqE;UAChG,uFAAuF;UACvF,GAAG,eAAe,CAAC,WAAW,CAAC,EAAE,CAAC;AACxC,CAAC"}
@@ -0,0 +1,69 @@
1
+ /** v1 accepts these two and nothing else — see `assertStateName`. */
2
+ export declare const STATE_NAMES: readonly ["error", "success"];
3
+ export type StateName = (typeof STATE_NAMES)[number];
4
+ /**
5
+ * One field, addressed the way a screen reader user addresses it.
6
+ *
7
+ * By ACCESSIBLE NAME, never by selector. Playwright moved to `getByLabel`/`getByRole` for robustness;
8
+ * here it is also the only choice consistent with what this tool is, and it pays a dividend no
9
+ * selector-based design can: a field that cannot be addressed by its accessible name is a FINDING rather
10
+ * than a configuration error. If `"Email address"` will not bind because the input has no name, that IS
11
+ * the 4.1.2 failure, and a screen reader user cannot address it either.
12
+ */
13
+ export interface FieldSpec {
14
+ field: string;
15
+ /** Disambiguator, and the PRIMARY one: how a screen reader user tells two `"Address line 1"` apart. */
16
+ within?: string;
17
+ /** Fallback disambiguator, for a collision with no group to name. 1-based, as a person counts. */
18
+ nth?: number;
19
+ /** Text to type. */
20
+ value?: string;
21
+ /** An option to select — a different verb because a combo box is not an edit. */
22
+ choose?: string;
23
+ /** A checkbox or radio to set. */
24
+ check?: boolean;
25
+ }
26
+ export interface StateSpec {
27
+ state: StateName;
28
+ /** What you expect to be rejected, in your words. Recorded so a run that hears NO error can say what it expected. */
29
+ because?: string;
30
+ fields: FieldSpec[];
31
+ }
32
+ export interface FormSpec {
33
+ /** The form's accessible name. */
34
+ form: string;
35
+ /** The accessible name of the control that submits it. */
36
+ submit: string;
37
+ states: StateSpec[];
38
+ }
39
+ export interface FormsConfig {
40
+ version: 1;
41
+ /** The only origin this file may be applied to. */
42
+ origin: string;
43
+ forms: FormSpec[];
44
+ }
45
+ /** Thrown with a sentence a person can act on. A config error must never be a stack trace. */
46
+ export declare class FormsConfigError extends Error {
47
+ constructor(message: string);
48
+ }
49
+ /**
50
+ * Parse and validate a forms config.
51
+ *
52
+ * Rejects loudly rather than tolerantly, and the asymmetry with `axe-results.ts` is deliberate: that
53
+ * module is tolerant because "axe results" means several packagings of the same substance, whereas THIS
54
+ * file instructs the tool to type into and submit somebody's live form. A misunderstood field there
55
+ * produces a wrong count; here it produces a real action on a real site.
56
+ */
57
+ export declare function parseFormsConfig(text: string, path?: string): FormsConfig;
58
+ /**
59
+ * May this config be applied to this URL?
60
+ *
61
+ * The guard is the origin and not the full URL, because a config describes a SITE's forms and a run names
62
+ * one page of it. Compared by parsed origin rather than by string prefix: `https://example.com` must not
63
+ * match `https://example.com.attacker.test`, which a `startsWith` would accept.
64
+ *
65
+ * This file holds data its author considered safe to send TO THAT SITE. Applying it elsewhere would send
66
+ * it somewhere they never agreed to, so a mismatch is a refusal and never a warning.
67
+ */
68
+ export declare function refuseIfWrongOrigin(config: FormsConfig, url: string): void;
69
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/forms/config.ts"],"names":[],"mappings":"AAqBA,qEAAqE;AACrE,eAAO,MAAM,WAAW,+BAAgC,CAAC;AACzD,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD;;;;;;;;GAQG;AACH,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,uGAAuG;IACvG,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kGAAkG;IAClG,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,oBAAoB;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,SAAS,CAAC;IACjB,qHAAqH;IACrH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,QAAQ;IACvB,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,0DAA0D;IAC1D,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,CAAC,CAAC;IACX,mDAAmD;IACnD,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB;AAED,8FAA8F;AAC9F,qBAAa,gBAAiB,SAAQ,KAAK;gBAC7B,OAAO,EAAE,MAAM;CAI5B;AAiGD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,SAAqB,GAAG,WAAW,CAwBrF;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAe1E"}
@@ -0,0 +1,185 @@
1
+ /**
2
+ * The forms configuration — ADR 0024.
3
+ *
4
+ * Four criteria are only observable once a form has been submitted or typed into (3.3.1, 3.3.3, 4.1.3,
5
+ * 3.2.2), and the probes that produce that evidence are OFF for a page we do not own, because pressing
6
+ * *Book* on somebody's production site is not a review. What makes submitting acceptable is the site's
7
+ * owner telling us what to put in the form — so the consent problem is an API problem, and this is the API.
8
+ *
9
+ * A form is configured with named STATES rather than with values plus a submit button. That is the
10
+ * decision the whole file rests on and ADR 0024 records why: "submit empty" was a PROXY for "produce an
11
+ * error", and on a real form the proxy is often wrong — the field may be optional, the button may be
12
+ * disabled until valid, validation may be client-side and never announce. The site's owner knows what
13
+ * their form rejects. Declaring it removes the guess, and it makes the destructive act separately
14
+ * consentable: a `success` state is the licence to complete the form, and its absence is an instruction
15
+ * rather than a gap.
16
+ *
17
+ * PURE. No file reads, no network, no worker. That is why the whole config layer can be proven before any
18
+ * Windows machine is involved, which is the reason it is built first.
19
+ */
20
+ import { parse as parseYaml } from "yaml";
21
+ /** v1 accepts these two and nothing else — see `assertStateName`. */
22
+ export const STATE_NAMES = ["error", "success"];
23
+ /** Thrown with a sentence a person can act on. A config error must never be a stack trace. */
24
+ export class FormsConfigError extends Error {
25
+ constructor(message) {
26
+ super(message);
27
+ this.name = "FormsConfigError";
28
+ }
29
+ }
30
+ /**
31
+ * Annotated on the CONST, not on the arrow, and that is load-bearing rather than stylistic: TypeScript
32
+ * only treats a call as never-returning for control-flow narrowing when the identifier carries an
33
+ * explicit type annotation. Written as `(message: string): never =>` it still throws at runtime while
34
+ * every `if (bad) fail(...)` below fails to narrow, so each one needs a cast — which is how a validator
35
+ * ends up full of assertions that hide the shape it is validating.
36
+ */
37
+ const fail = (message) => {
38
+ throw new FormsConfigError(message);
39
+ };
40
+ const isObject = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
41
+ /**
42
+ * Exactly one verb per field, and the count is checked rather than the presence.
43
+ *
44
+ * `value`, `choose` and `check` are three verbs because a control's type decides what "supplying a value"
45
+ * means, and using one verb for all three would make the config lie about what the tool did to the page.
46
+ * Zero verbs is a field nobody said what to do with; two is a field with contradictory instructions, and
47
+ * silently preferring one would make the file's meaning depend on this function's order.
48
+ */
49
+ function assertOneVerb(field, where) {
50
+ const verbs = ["value", "choose", "check"].filter((verb) => field[verb] !== undefined);
51
+ if (verbs.length === 1)
52
+ return;
53
+ fail(verbs.length === 0
54
+ ? `${where} says nothing to do with "${String(field.field)}". Give it one of value:, choose: or check:.`
55
+ : `${where} gives "${String(field.field)}" more than one instruction (${verbs.join(", ")}). `
56
+ + "A field takes exactly one of value:, choose: or check:.");
57
+ }
58
+ function parseField(raw, where) {
59
+ if (!isObject(raw))
60
+ fail(`${where} has a field entry that is not a mapping.`);
61
+ const entry = raw;
62
+ if (typeof entry.field !== "string" || entry.field.trim() === "") {
63
+ fail(`${where} has a field with no field: name. Name it as the screen reader announces it.`);
64
+ }
65
+ assertOneVerb(entry, where);
66
+ if (entry.nth !== undefined && (typeof entry.nth !== "number" || entry.nth < 1)) {
67
+ fail(`${where}: nth: on "${String(entry.field)}" counts from 1, as a person counts.`);
68
+ }
69
+ return entry;
70
+ }
71
+ /**
72
+ * v1 accepts `error` and `success` and nothing else.
73
+ *
74
+ * A FIXED vocabulary is what makes "properly tested" computable: each criterion declares which states it
75
+ * needs, so a config carrying only an error state can be reported as giving half an answer for 4.1.3
76
+ * rather than a whole one. Free-text state names would turn that back into a judgement. Custom states are
77
+ * v2, alongside multi-step flows.
78
+ */
79
+ function assertStateName(value, where) {
80
+ if (!STATE_NAMES.includes(value)) {
81
+ fail(`${where}: state: must be ${STATE_NAMES.join(" or ")}, not ${JSON.stringify(value)}. `
82
+ + "v1 uses a fixed vocabulary so that which criteria a config can answer is computable.");
83
+ }
84
+ }
85
+ function parseState(raw, where) {
86
+ if (!isObject(raw))
87
+ fail(`${where} has a state entry that is not a mapping.`);
88
+ const entry = raw;
89
+ assertStateName(entry.state, where);
90
+ if (!Array.isArray(entry.fields) || entry.fields.length === 0) {
91
+ fail(`${where}: the "${String(entry.state)}" state lists no fields:, so there is nothing to put in the form.`);
92
+ }
93
+ const label = `${where} state "${String(entry.state)}"`;
94
+ return {
95
+ state: entry.state,
96
+ because: typeof entry.because === "string" ? entry.because : undefined,
97
+ fields: entry.fields.map((field) => parseField(field, label)),
98
+ };
99
+ }
100
+ function parseForm(raw, index) {
101
+ if (!isObject(raw))
102
+ fail(`forms[${index}] is not a mapping.`);
103
+ const entry = raw;
104
+ const where = typeof entry.form === "string" ? `form "${entry.form}"` : `forms[${index}]`;
105
+ if (typeof entry.form !== "string" || entry.form.trim() === "") {
106
+ fail(`forms[${index}] has no form: name. Use the form's accessible name, as the screen reader announces it.`);
107
+ }
108
+ if (typeof entry.submit !== "string" || entry.submit.trim() === "") {
109
+ fail(`${where} has no submit: control. Name the control that submits it.`);
110
+ }
111
+ if (!Array.isArray(entry.states) || entry.states.length === 0) {
112
+ fail(`${where} declares no states:. A form is configured with the states you can put it in — `
113
+ + `${STATE_NAMES.join(" and ")}.`);
114
+ }
115
+ return {
116
+ form: entry.form,
117
+ submit: entry.submit,
118
+ states: entry.states.map((state) => parseState(state, where)),
119
+ };
120
+ }
121
+ /**
122
+ * Parse and validate a forms config.
123
+ *
124
+ * Rejects loudly rather than tolerantly, and the asymmetry with `axe-results.ts` is deliberate: that
125
+ * module is tolerant because "axe results" means several packagings of the same substance, whereas THIS
126
+ * file instructs the tool to type into and submit somebody's live form. A misunderstood field there
127
+ * produces a wrong count; here it produces a real action on a real site.
128
+ */
129
+ export function parseFormsConfig(text, path = "the forms config") {
130
+ let parsed;
131
+ try {
132
+ parsed = parseYaml(text);
133
+ }
134
+ catch (cause) {
135
+ throw new FormsConfigError(`${path} is not valid YAML: ${cause.message}`);
136
+ }
137
+ if (!isObject(parsed))
138
+ fail(`${path} is empty or is not a mapping.`);
139
+ const doc = parsed;
140
+ if (doc.version !== 1) {
141
+ fail(`${path}: version: must be 1 (found ${JSON.stringify(doc.version ?? null)}).`);
142
+ }
143
+ if (typeof doc.origin !== "string" || doc.origin.trim() === "") {
144
+ fail(`${path}: origin: is required. It names the only site this file may be applied to, and it is `
145
+ + "what stops a staging config being aimed at production.");
146
+ }
147
+ if (!Array.isArray(doc.forms) || doc.forms.length === 0) {
148
+ fail(`${path}: forms: lists nothing, so this file would do nothing.`);
149
+ }
150
+ return {
151
+ version: 1,
152
+ origin: doc.origin,
153
+ forms: doc.forms.map(parseForm),
154
+ };
155
+ }
156
+ /**
157
+ * May this config be applied to this URL?
158
+ *
159
+ * The guard is the origin and not the full URL, because a config describes a SITE's forms and a run names
160
+ * one page of it. Compared by parsed origin rather than by string prefix: `https://example.com` must not
161
+ * match `https://example.com.attacker.test`, which a `startsWith` would accept.
162
+ *
163
+ * This file holds data its author considered safe to send TO THAT SITE. Applying it elsewhere would send
164
+ * it somewhere they never agreed to, so a mismatch is a refusal and never a warning.
165
+ */
166
+ export function refuseIfWrongOrigin(config, url) {
167
+ const originOf = (value) => {
168
+ try {
169
+ return new URL(value).origin;
170
+ }
171
+ catch {
172
+ return null;
173
+ }
174
+ };
175
+ const declared = originOf(config.origin);
176
+ const target = originOf(url);
177
+ if (declared === null)
178
+ fail(`origin: ${JSON.stringify(config.origin)} is not a URL.`);
179
+ if (target !== null && target === declared)
180
+ return;
181
+ fail(`This forms config declares origin ${declared}, and the run is against ${target ?? url}. `
182
+ + "Refusing: the values in a forms config were supplied for one site, and sending them to another "
183
+ + "is not something a tool may decide to do.");
184
+ }
185
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/forms/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAE1C,qEAAqE;AACrE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,SAAS,CAAU,CAAC;AAgDzD,8FAA8F;AAC9F,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACzC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;CACF;AAED;;;;;;GAMG;AACH,MAAM,IAAI,GAA+B,CAAC,OAAO,EAAE,EAAE;IACnD,MAAM,IAAI,gBAAgB,CAAC,OAAO,CAAC,CAAC;AACtC,CAAC,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,CAAU,EAAgC,EAAE,CAC5D,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAE3D;;;;;;;GAOG;AACH,SAAS,aAAa,CAAC,KAA8B,EAAE,KAAa;IAClE,MAAM,KAAK,GAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAW,CAAC,MAAM,CAAC,CAAC,IAAI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