bfsg-scanner 0.1.0 → 0.2.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.
- package/CHANGELOG.md +19 -2
- package/README.md +103 -9
- package/dist/cli/run.js +10 -1
- package/dist/cli/run.js.map +1 -1
- package/dist/config/schema.d.ts +11 -10
- package/dist/config/schema.js +1 -0
- package/dist/config/schema.js.map +1 -1
- package/dist/discovery/robots.js.map +1 -1
- package/dist/report/build.js.map +1 -1
- package/dist/report/verdict.d.ts +1 -1
- package/dist/scan/scan.js +8 -0
- package/dist/scan/scan.js.map +1 -1
- package/dist/scan/types.d.ts +7 -0
- package/dist/shared/package-info.js.map +1 -1
- package/docs/adr/0009-minimum-node-version.md +45 -0
- package/docs/adr/0010-settle-delay-before-the-scan.md +57 -0
- package/package.json +10 -10
- package/schema/report.v1.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,23 @@ follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## [0.2.0] - 2026-09-09
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- `settleMs` config key / `--settle <ms>` flag — a pause between `load` and
|
|
14
|
+
the scan, so a client-rendered page (a single-page app, or one that
|
|
15
|
+
fetches its translations after load) is scanned hydrated rather than as
|
|
16
|
+
its initial shell. Defaults to `0`; a server-rendered page is unaffected.
|
|
17
|
+
See ADR 0010.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- Minimum supported Node is now 22 (was 24). See ADR 0009.
|
|
22
|
+
- `schema/report.v1.json`: the `node.target` items are expressed as a
|
|
23
|
+
`oneOf` (a string, or an array of strings) rather than a type union, so
|
|
24
|
+
the schema passes ajv strict mode. The same reports validate and
|
|
25
|
+
`schemaVersion` stays 1.
|
|
10
26
|
|
|
11
27
|
## [0.1.0] - 2026-09-01
|
|
12
28
|
|
|
@@ -35,5 +51,6 @@ First release.
|
|
|
35
51
|
- Distributable package: a `bfsg-scanner` bin and a `dist` build that
|
|
36
52
|
excludes tests.
|
|
37
53
|
|
|
38
|
-
[Unreleased]: https://github.com/MihaelaAghirculesei/bfsg-scanner/compare/v0.
|
|
54
|
+
[Unreleased]: https://github.com/MihaelaAghirculesei/bfsg-scanner/compare/v0.2.0...HEAD
|
|
55
|
+
[0.2.0]: https://github.com/MihaelaAghirculesei/bfsg-scanner/compare/v0.1.0...v0.2.0
|
|
39
56
|
[0.1.0]: https://github.com/MihaelaAghirculesei/bfsg-scanner/releases/tag/v0.1.0
|
package/README.md
CHANGED
|
@@ -1,13 +1,43 @@
|
|
|
1
1
|
# bfsg-scanner
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[
|
|
5
|
-
|
|
6
|
-
[
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/bfsg-scanner)
|
|
4
|
+
[](https://github.com/MihaelaAghirculesei/bfsg-scanner/actions/workflows/ci.yml)
|
|
5
|
+
[](https://www.npmjs.com/package/bfsg-scanner#provenance)
|
|
6
|
+
[](https://nodejs.org)
|
|
7
|
+
[](./LICENSE)
|
|
8
|
+
|
|
9
|
+
**Since 28 June 2025, Germany's [BFSG](https://www.gesetze-im-internet.de/bfsg/)
|
|
10
|
+
has made digital accessibility a legal requirement for many consumer-facing
|
|
11
|
+
businesses — online shops, banking, booking, ticketing and more.**
|
|
12
|
+
`bfsg-scanner` scans a whole site for
|
|
13
|
+
[WCAG 2.1 AA](https://www.w3.org/TR/WCAG21/) breaches and turns them into a
|
|
14
|
+
citeable conformance report you can file as a record or use to gate a release.
|
|
15
|
+
|
|
16
|
+
Built on [Playwright](https://playwright.dev) and
|
|
17
|
+
[axe-core](https://github.com/dequelabs/axe-core). Every finding is mapped
|
|
18
|
+
through [EN 301 549](https://www.etsi.org/deliver/etsi_en/301500_301599/301549/)
|
|
19
|
+
to the BFSG clause it breaches — not left as a bare rule ID.
|
|
20
|
+
|
|
21
|
+
Requires **Node.js ≥ 22**.
|
|
22
|
+
|
|
23
|
+
> **How I use it:** a one-command accessibility audit of a client site before
|
|
24
|
+
> launch. Pointed at the W3C's
|
|
25
|
+
> [deliberately inaccessible demo](https://www.w3.org/WAI/demos/bad/), a run
|
|
26
|
+
> flags **24 issues across 5 pages** — 11 critical, 13 serious — each tagged
|
|
27
|
+
> with its WCAG success criterion and EN 301 549 clause, in one PDF for the file.
|
|
28
|
+
|
|
29
|
+
> **Field-tested:** a 9-page run against a real production site
|
|
30
|
+
> ([aghirculesei.pages.dev](https://aghirculesei.pages.dev)) surfaced five WCAG
|
|
31
|
+
> 2.1 AA breaches the manual review had missed — an unlabelled form control, a
|
|
32
|
+
> malformed `tablist`, a keyboard-trapped scroll region, sub-4.5:1 toggle
|
|
33
|
+
> labels, colour-only links — each mapped to its EN 301 549 clause. All fixed;
|
|
34
|
+
> the site now scans clean.
|
|
35
|
+
|
|
36
|
+
[](https://mihaelaaghirculesei.github.io/bfsg-scanner/)
|
|
37
|
+
|
|
38
|
+
<sub>A real run against the W3C WAI Before/After Demonstration ·
|
|
39
|
+
[open the rendered report](https://mihaelaaghirculesei.github.io/bfsg-scanner/) ·
|
|
40
|
+
[HTML](./examples/report.html) · [JSON](./examples/report.json) · [PDF](./examples/report.pdf)</sub>
|
|
11
41
|
|
|
12
42
|
## What it does
|
|
13
43
|
|
|
@@ -21,6 +51,25 @@ Requires **Node.js ≥ 24**.
|
|
|
21
51
|
4. **Exits non-zero** when violations reach a configurable severity
|
|
22
52
|
threshold, so a CI job can gate a merge on accessibility.
|
|
23
53
|
|
|
54
|
+
## Why not pa11y-ci or Lighthouse CI?
|
|
55
|
+
|
|
56
|
+
For a raw WCAG signal in CI, those tools are a fine choice and more mature.
|
|
57
|
+
`bfsg-scanner` exists for the case where the output has to stand as a
|
|
58
|
+
**compliance record under German law**, not just a passing check:
|
|
59
|
+
|
|
60
|
+
- **Every finding is resolved to an EN 301 549 clause**, the harmonised
|
|
61
|
+
standard § 4 BFSG grants a presumption of conformity against — so the
|
|
62
|
+
report cites the provision at issue, not a bare `axe` rule ID.
|
|
63
|
+
- **The artefact is the deliverable.** A single self-contained PDF, in German
|
|
64
|
+
or English, that leads with a pass/fail verdict and the breached clauses —
|
|
65
|
+
something you can attach to a file, a contract, or an audit response.
|
|
66
|
+
- **Site-wide in one command**, with sitemap + `robots.txt`-aware crawl,
|
|
67
|
+
per-host rate limiting and an identifiable User-Agent — no per-URL list to
|
|
68
|
+
maintain.
|
|
69
|
+
|
|
70
|
+
It does not replace a manual audit: automated checks catch a fraction of WCAG.
|
|
71
|
+
It makes the part a machine *can* check citeable and repeatable.
|
|
72
|
+
|
|
24
73
|
## Quick start
|
|
25
74
|
|
|
26
75
|
```sh
|
|
@@ -43,7 +92,7 @@ Install it for repeated use with `npm i -g bfsg-scanner`.
|
|
|
43
92
|
```sh
|
|
44
93
|
git clone https://github.com/MihaelaAghirculesei/bfsg-scanner.git
|
|
45
94
|
cd bfsg-scanner
|
|
46
|
-
npm
|
|
95
|
+
npm ci
|
|
47
96
|
npx playwright install chromium
|
|
48
97
|
npm run build
|
|
49
98
|
node dist/cli/index.js --help # or `npm link` for the bfsg-scanner command
|
|
@@ -63,6 +112,7 @@ bfsg-scanner [url] [options]
|
|
|
63
112
|
| `--report-language <l>` | `de` \| `en` (default: `de`). |
|
|
64
113
|
| `--output-dir <dir>` | Directory for the report files (default: `reports`). |
|
|
65
114
|
| `--format <list>` | Comma-separated subset of `json,html,pdf` (default: all three). |
|
|
115
|
+
| `--settle <ms>` | Pause after `load`, before the scan, for a client-rendered page to hydrate (default: `0`). |
|
|
66
116
|
| `-h, --help` | Show help and exit. |
|
|
67
117
|
| `-V, --version` | Print the version and exit. |
|
|
68
118
|
|
|
@@ -78,6 +128,7 @@ A YAML file — `bfsg.config.yaml` by default, or `--config <path>`. Only
|
|
|
78
128
|
baseUrl: "https://example.de" # required
|
|
79
129
|
|
|
80
130
|
maxPages: 50 # sitemap + crawl combined
|
|
131
|
+
settleMs: 0 # pause after load before the scan (see below)
|
|
81
132
|
wcagTags: # axe rule sets to run
|
|
82
133
|
- wcag2a
|
|
83
134
|
- wcag2aa
|
|
@@ -95,6 +146,14 @@ reportFormats: # any non-empty subset of json | html | pdf
|
|
|
95
146
|
CLI flags override the matching config key. See the annotated
|
|
96
147
|
[`bfsg.config.yaml`](./bfsg.config.yaml) in this repo for a working example.
|
|
97
148
|
|
|
149
|
+
**`settleMs`** — the scan reads the DOM as soon as the page fires `load`.
|
|
150
|
+
For a server-rendered site that is the finished page and `0` is right. A
|
|
151
|
+
site that renders in the browser — a single-page app, or one that fetches
|
|
152
|
+
its translations after load — is still a shell at that point, and the scan
|
|
153
|
+
would flag controls that populate a moment later. Set `settleMs` to a bit
|
|
154
|
+
more than that site's slowest post-load render (`1000`–`3000` is typical);
|
|
155
|
+
it is added to every page's scan time.
|
|
156
|
+
|
|
98
157
|
## Output
|
|
99
158
|
|
|
100
159
|
Written to `outputDir`, overwritten each run:
|
|
@@ -122,6 +181,27 @@ The terminal prints a summary and the distinct breached clauses.
|
|
|
122
181
|
`3` outranks `1`: a run with unreachable pages scanned an incomplete site, so
|
|
123
182
|
"no violations found" would be a claim the data cannot support.
|
|
124
183
|
|
|
184
|
+
## Use in CI
|
|
185
|
+
|
|
186
|
+
The non-zero exit at or above `--fail-on` lets a CI job block a merge on
|
|
187
|
+
accessibility. A GitHub Actions step:
|
|
188
|
+
|
|
189
|
+
```yaml
|
|
190
|
+
- uses: actions/setup-node@v4
|
|
191
|
+
with:
|
|
192
|
+
node-version: 22
|
|
193
|
+
- run: npx playwright install --with-deps chromium
|
|
194
|
+
- run: npx bfsg-scanner https://staging.example.de --fail-on serious
|
|
195
|
+
- if: always()
|
|
196
|
+
uses: actions/upload-artifact@v4
|
|
197
|
+
with:
|
|
198
|
+
name: accessibility-report
|
|
199
|
+
path: reports/
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
`--fail-on serious` fails the step on any `serious` or `critical` finding;
|
|
203
|
+
`if: always()` keeps the report even on a failing run.
|
|
204
|
+
|
|
125
205
|
## How the clause mapping works
|
|
126
206
|
|
|
127
207
|
axe-core's rule metadata already carries the mapping: a rule tagged
|
|
@@ -138,10 +218,24 @@ This tool sends real traffic to whatever site you point it at. Scan only
|
|
|
138
218
|
sites you own or are authorised to test. See
|
|
139
219
|
[`docs/SCANNING-ETHICS.md`](./docs/SCANNING-ETHICS.md).
|
|
140
220
|
|
|
221
|
+
## Not in scope (yet)
|
|
222
|
+
|
|
223
|
+
Deliberate omissions for now, not oversights:
|
|
224
|
+
|
|
225
|
+
- per-rule waivers / ignore lists
|
|
226
|
+
- a baseline and run-to-run diff
|
|
227
|
+
- scanning behind authentication
|
|
228
|
+
- multi-site batch runs
|
|
229
|
+
- GitHub Actions `::error::` annotations
|
|
230
|
+
|
|
141
231
|
## Design decisions
|
|
142
232
|
|
|
143
233
|
Each significant choice is recorded as an ADR in [`docs/adr/`](./docs/adr).
|
|
144
234
|
|
|
235
|
+
## Security
|
|
236
|
+
|
|
237
|
+
To report a vulnerability in the tool, see [`SECURITY.md`](./SECURITY.md).
|
|
238
|
+
|
|
145
239
|
## License
|
|
146
240
|
|
|
147
241
|
[MIT](./LICENSE)
|
package/dist/cli/run.js
CHANGED
|
@@ -21,6 +21,8 @@ Options:
|
|
|
21
21
|
--report-language <l> de | en (default: de).
|
|
22
22
|
--output-dir <dir> Directory for the report files (default: reports).
|
|
23
23
|
--format <list> Comma-separated subset of json,html,pdf (default: all three).
|
|
24
|
+
--settle <ms> Pause after load, before the scan, for client-rendered
|
|
25
|
+
pages to hydrate (default: 0).
|
|
24
26
|
-h, --help Show this help and exit.
|
|
25
27
|
-V, --version Print the version and exit.
|
|
26
28
|
|
|
@@ -38,6 +40,7 @@ const OPTIONS = {
|
|
|
38
40
|
'report-language': { type: 'string' },
|
|
39
41
|
'output-dir': { type: 'string' },
|
|
40
42
|
format: { type: 'string' },
|
|
43
|
+
settle: { type: 'string' },
|
|
41
44
|
};
|
|
42
45
|
function safeParseArgs(argv) {
|
|
43
46
|
try {
|
|
@@ -78,6 +81,12 @@ export function parseCliArgs(argv) {
|
|
|
78
81
|
if (values['output-dir'] !== undefined) {
|
|
79
82
|
overrides.outputDir = values['output-dir'];
|
|
80
83
|
}
|
|
84
|
+
if (values.settle !== undefined) {
|
|
85
|
+
// Kept as a raw value like the others; `configSchema` rejects a
|
|
86
|
+
// non-numeric or out-of-range --settle with a clear message.
|
|
87
|
+
const parsed = Number(values.settle);
|
|
88
|
+
overrides.settleMs = Number.isNaN(parsed) ? values.settle : parsed;
|
|
89
|
+
}
|
|
81
90
|
if (values.format !== undefined) {
|
|
82
91
|
overrides.reportFormats = values.format
|
|
83
92
|
.split(',')
|
|
@@ -156,7 +165,7 @@ export async function run(argv, deps = {}) {
|
|
|
156
165
|
}
|
|
157
166
|
}
|
|
158
167
|
async function scanAndReport(config, urls, browser) {
|
|
159
|
-
const result = await scan(urls, { wcagTags: config.wcagTags }, { browser });
|
|
168
|
+
const result = await scan(urls, { wcagTags: config.wcagTags, settleMs: config.settleMs }, { browser });
|
|
160
169
|
const report = buildReport(result, {
|
|
161
170
|
baseUrl: config.baseUrl,
|
|
162
171
|
wcagTags: config.wcagTags,
|
package/dist/cli/run.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/cli/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAgB,QAAQ,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAe,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,e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@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const wcagTagSchema: z.ZodEnum<{
|
|
3
|
-
wcag2a: "wcag2a";
|
|
4
|
-
wcag2aa: "wcag2aa";
|
|
5
3
|
wcag21a: "wcag21a";
|
|
6
4
|
wcag21aa: "wcag21aa";
|
|
5
|
+
wcag2a: "wcag2a";
|
|
6
|
+
wcag2aa: "wcag2aa";
|
|
7
7
|
}>;
|
|
8
8
|
export declare const failOnSchema: z.ZodEnum<{
|
|
9
9
|
critical: "critical";
|
|
10
|
-
serious: "serious";
|
|
11
|
-
moderate: "moderate";
|
|
12
10
|
minor: "minor";
|
|
11
|
+
moderate: "moderate";
|
|
12
|
+
serious: "serious";
|
|
13
13
|
}>;
|
|
14
14
|
export declare const reportLanguageSchema: z.ZodEnum<{
|
|
15
15
|
de: "de";
|
|
16
16
|
en: "en";
|
|
17
17
|
}>;
|
|
18
18
|
export declare const reportFormatSchema: z.ZodEnum<{
|
|
19
|
-
json: "json";
|
|
20
19
|
html: "html";
|
|
20
|
+
json: "json";
|
|
21
21
|
pdf: "pdf";
|
|
22
22
|
}>;
|
|
23
23
|
export declare const configSchema: z.ZodObject<{
|
|
24
24
|
baseUrl: z.ZodURL;
|
|
25
25
|
maxPages: z.ZodDefault<z.ZodNumber>;
|
|
26
|
+
settleMs: z.ZodDefault<z.ZodNumber>;
|
|
26
27
|
wcagTags: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
27
|
-
wcag2a: "wcag2a";
|
|
28
|
-
wcag2aa: "wcag2aa";
|
|
29
28
|
wcag21a: "wcag21a";
|
|
30
29
|
wcag21aa: "wcag21aa";
|
|
30
|
+
wcag2a: "wcag2a";
|
|
31
|
+
wcag2aa: "wcag2aa";
|
|
31
32
|
}>>>;
|
|
32
33
|
excludePaths: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
33
34
|
outputDir: z.ZodDefault<z.ZodString>;
|
|
34
35
|
failOn: z.ZodDefault<z.ZodEnum<{
|
|
35
36
|
critical: "critical";
|
|
36
|
-
serious: "serious";
|
|
37
|
-
moderate: "moderate";
|
|
38
37
|
minor: "minor";
|
|
38
|
+
moderate: "moderate";
|
|
39
|
+
serious: "serious";
|
|
39
40
|
}>>;
|
|
40
41
|
reportLanguage: z.ZodDefault<z.ZodEnum<{
|
|
41
42
|
de: "de";
|
|
42
43
|
en: "en";
|
|
43
44
|
}>>;
|
|
44
45
|
reportFormats: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
45
|
-
json: "json";
|
|
46
46
|
html: "html";
|
|
47
|
+
json: "json";
|
|
47
48
|
pdf: "pdf";
|
|
48
49
|
}>>>;
|
|
49
50
|
}, z.core.$strict>;
|
package/dist/config/schema.js
CHANGED
|
@@ -6,6 +6,7 @@ export const reportFormatSchema = z.enum(['json', 'html', 'pdf']);
|
|
|
6
6
|
export const configSchema = z.strictObject({
|
|
7
7
|
baseUrl: z.url(),
|
|
8
8
|
maxPages: z.number().int().positive().max(1000).default(50),
|
|
9
|
+
settleMs: z.number().int().min(0).max(60_000).default(0),
|
|
9
10
|
wcagTags: z.array(wcagTagSchema).min(1).default(['wcag2a', 'wcag2aa', 'wcag21aa']),
|
|
10
11
|
excludePaths: z.array(z.string()).default([]),
|
|
11
12
|
outputDir: z.string().min(1).default('reports'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AAElF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;AAEjF,MAAM,CAAC,MAAM,oBA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,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAChF,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,IAAI,OAAO,GAAG,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACpE,OAAO,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AAClC,CAAC;AAED,SAAS,QAAQ,CAAC,IAAY;IAC5B,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC9D,CAAC;AAED,SAAS,YAAY,CAAC,IAAY;IAChC,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACpC,OAAO,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;AAC5D,CAAC"}
|
package/dist/report/build.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/report/build.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAWzD,OAAO,EAAE,cAAc,EAAwB,MAAM,cAAc,CAAC;AASpE;;;;GAIG;AACH,MAAM,UAAU,WAAW,CACzB,UAAsB,EACtB,MAAoB,EACpB,
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/report/build.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,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C,GAAG,CAAC,EAAE,CAAC,CAAC;YAClC,CAAC;YACD,KAAK,MAAM,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;gBAC9C,uBAAuB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACtC,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO;QACL,YAAY,EAAE,KAAK,CAAC,MAAM;QAC1B,WAAW;QACX,mBAAmB;QACnB,eAAe;QACf,kBAAkB,EAAE,QAAQ;QAC5B,uBAAuB,EAAE,CAAC,GAAG,uBAAuB,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC;QACzE,uBAAuB,EAAE,CAAC,GAAG,uBAAuB,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC;KAC1E,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,MAAmB;IACvC,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,UAAU,CAAC;QAChB,KAAK,SAAS,CAAC;QACf,KAAK,UAAU,CAAC;QAChB,KAAK,OAAO;YACV,OAAO,MAAM,CAAC;QAChB;YACE,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC"}
|
package/dist/report/verdict.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { ReportImpactCounts } from './types.js';
|
|
|
4
4
|
* axe-core impacts from least to most severe. Index position is the rank;
|
|
5
5
|
* a finding meets a threshold when its rank is at or above the threshold's.
|
|
6
6
|
*/
|
|
7
|
-
export declare const IMPACT_RANK: readonly [
|
|
7
|
+
export declare const IMPACT_RANK: readonly ['minor', 'moderate', 'serious', 'critical'];
|
|
8
8
|
export type ImpactThreshold = (typeof IMPACT_RANK)[number];
|
|
9
9
|
/**
|
|
10
10
|
* True when `impact` is at least as severe as `threshold`.
|
package/dist/scan/scan.js
CHANGED
|
@@ -7,6 +7,7 @@ const DEFAULT_TIMEOUT_MS = 15_000;
|
|
|
7
7
|
const DEFAULT_RETRIES = 1;
|
|
8
8
|
const DEFAULT_CONCURRENCY = 3;
|
|
9
9
|
const DEFAULT_HOST_RATE_LIMIT_MS = 1_000;
|
|
10
|
+
const DEFAULT_SETTLE_MS = 0;
|
|
10
11
|
export async function scan(urls, options, deps = {}) {
|
|
11
12
|
const concurrency = options.concurrency ?? DEFAULT_CONCURRENCY;
|
|
12
13
|
const rateLimiter = new HostRateLimiter(options.hostRateLimitMs ?? DEFAULT_HOST_RATE_LIMIT_MS);
|
|
@@ -25,6 +26,7 @@ export async function scan(urls, options, deps = {}) {
|
|
|
25
26
|
async function scanPage(browser, url, options, rateLimiter) {
|
|
26
27
|
const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
27
28
|
const retries = options.retries ?? DEFAULT_RETRIES;
|
|
29
|
+
const settleMs = options.settleMs ?? DEFAULT_SETTLE_MS;
|
|
28
30
|
const host = safeHost(url);
|
|
29
31
|
let lastError;
|
|
30
32
|
for (let attempt = 0; attempt <= retries; attempt += 1) {
|
|
@@ -35,6 +37,12 @@ async function scanPage(browser, url, options, rateLimiter) {
|
|
|
35
37
|
try {
|
|
36
38
|
const page = await context.newPage();
|
|
37
39
|
await page.goto(url, { waitUntil: 'load', timeout: timeoutMs });
|
|
40
|
+
// Give a client-rendered page time to hydrate and fetch what it needs
|
|
41
|
+
// (e.g. its translations) before axe reads the DOM. Off by default;
|
|
42
|
+
// `load` is enough for a server-rendered page.
|
|
43
|
+
if (settleMs > 0) {
|
|
44
|
+
await page.waitForTimeout(settleMs);
|
|
45
|
+
}
|
|
38
46
|
const results = await new AxeBuilder({ page }).withTags([...options.wcagTags]).analyze();
|
|
39
47
|
return {
|
|
40
48
|
status: 'ok',
|
package/dist/scan/scan.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scan.js","sourceRoot":"","sources":["../../src/scan/scan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAgB,QAAQ,EAAE,MAAM,Y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MAAM,CAAC,IAAI;QACjB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACjC,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,cAAc,EAAE,IAAI,CAAC,cAAc,IAAI,IAAI;SAC5C,CAAC,CAAC;KACJ,CAAC;AACJ,CAAC"}
|
package/dist/scan/types.d.ts
CHANGED
|
@@ -39,6 +39,13 @@ export interface ScanOptions {
|
|
|
39
39
|
readonly wcagTags: readonly string[];
|
|
40
40
|
/** Navigation timeout per attempt, in milliseconds. Defaults to 15000. */
|
|
41
41
|
readonly timeoutMs?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Extra pause after `load` fires, before axe runs, in milliseconds.
|
|
44
|
+
* Defaults to 0. Raise it for a page that finishes rendering in the
|
|
45
|
+
* browser — a single-page app, or one that fetches its translations
|
|
46
|
+
* after load — so the scan asserts on the hydrated DOM, not the shell.
|
|
47
|
+
*/
|
|
48
|
+
readonly settleMs?: number;
|
|
42
49
|
/** Extra attempts after the first one fails. Defaults to 1 (two attempts total). */
|
|
43
50
|
readonly retries?: number;
|
|
44
51
|
/** Maximum number of pages scanned in parallel. Defaults to 3. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-info.js","sourceRoot":"","sources":["../../src/shared/package-info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAOvC;;;;GAIG;AACH,MAAM,UAAU,QAAQ;IACtB,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,GAAG,CAAC,oBAAoB,EAAE,
|
|
1
|
+
{"version":3,"file":"package-info.js","sourceRoot":"","sources":["../../src/shared/package-info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAOvC;;;;GAIG;AACH,MAAM,UAAU,QAAQ;IACtB,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,GAAG,CAAC,oBAAoB,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAG1F,CAAC;IACF,OAAO,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,IAAI,cAAc,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,IAAI,OAAO,EAAE,CAAC;AAC/E,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# 9. Minimum supported Node.js is 22
|
|
2
|
+
|
|
3
|
+
Date: 2026-09-07
|
|
4
|
+
|
|
5
|
+
## Status
|
|
6
|
+
|
|
7
|
+
Accepted
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
|
|
11
|
+
`engines.node` was set to `>=24.0.0` when the package was first prepared for
|
|
12
|
+
release. That was the version the work happened on, not a considered floor:
|
|
13
|
+
nothing in the code needs Node 24. The runtime surface is `node:fs`,
|
|
14
|
+
`node:path`, `node:http`, `node:util` `parseArgs`, and the global `fetch`.
|
|
15
|
+
`parseArgs` has been stable since 20.0.0 and `fetch` since 21.0.0, so both
|
|
16
|
+
are stable with no experimental warning from 22 onward.
|
|
17
|
+
|
|
18
|
+
Requiring 24 excludes the current LTS line from `npx bfsg-scanner` and from
|
|
19
|
+
the GitHub Actions snippet in the README for no benefit. Node 20 is out of
|
|
20
|
+
its maintenance window, so it is not a candidate.
|
|
21
|
+
|
|
22
|
+
## Decision
|
|
23
|
+
|
|
24
|
+
Set `engines.node` to **`>=22.0.0`**.
|
|
25
|
+
|
|
26
|
+
- `.nvmrc` / `.node-version` stay at the current release (24.19.0): that is
|
|
27
|
+
what contributors develop on and what the required `ci` check and the
|
|
28
|
+
release workflow run. The floor is what the package *supports*, not what
|
|
29
|
+
day-to-day work uses.
|
|
30
|
+
- `cross-platform.yml` gains a `node` matrix axis — `['22', '24.19.0']` on
|
|
31
|
+
Windows and macOS — so the minimum is actually exercised on every PR
|
|
32
|
+
rather than only asserted in `package.json`.
|
|
33
|
+
- The README CI example uses `node-version: 22` to match the floor.
|
|
34
|
+
|
|
35
|
+
## Consequences
|
|
36
|
+
|
|
37
|
+
- The advisory cross-platform run doubles to four jobs (two OSes × two Node
|
|
38
|
+
versions). It stays advisory; a failure on the `22` leg is the signal to
|
|
39
|
+
either raise the floor deliberately or fix the incompatibility.
|
|
40
|
+
- No Linux job runs the `22` leg — the required `ci` check keeps its single
|
|
41
|
+
`.nvmrc` build so the `ci` status name stays stable for branch
|
|
42
|
+
protection. If a Linux-specific, Node-22-specific regression ever slips
|
|
43
|
+
through, promoting the cross-platform matrix to required is the fix.
|
|
44
|
+
- A future need for a Node 24 API is not blocked; it just has to be a
|
|
45
|
+
deliberate bump of this floor, with this ADR superseded.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# 10. A settle delay before the scan
|
|
2
|
+
|
|
3
|
+
Date: 2026-09-08
|
|
4
|
+
|
|
5
|
+
## Status
|
|
6
|
+
|
|
7
|
+
Accepted
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
|
|
11
|
+
`scanPage` navigates with `waitUntil: 'load'` and runs axe immediately
|
|
12
|
+
after. `load` fires when the initial document and its subresources have
|
|
13
|
+
loaded — but not after client-side work that follows: a single-page app
|
|
14
|
+
hydrating, a framework upgrading its components, a page fetching its
|
|
15
|
+
translations and swapping them into the DOM.
|
|
16
|
+
|
|
17
|
+
Run against a statically-rendered site that localises in the browser, the
|
|
18
|
+
scan sees the pre-hydration shell: empty translated strings, controls not
|
|
19
|
+
yet wired up. axe then reports contentless links and unlabelled controls
|
|
20
|
+
that a real user never meets. Field use turned this up — a production
|
|
21
|
+
portfolio flagged an "empty" call-to-action that is fully populated a
|
|
22
|
+
moment after `load`.
|
|
23
|
+
|
|
24
|
+
`waitUntil: 'networkidle'` is the obvious lever but a poor default: the
|
|
25
|
+
Playwright docs discourage it, and a page with analytics beacons or
|
|
26
|
+
long-polling never goes idle, so every scan would pay the full navigation
|
|
27
|
+
timeout.
|
|
28
|
+
|
|
29
|
+
## Decision
|
|
30
|
+
|
|
31
|
+
Add **`settleMs`** — a fixed pause between `load` and the axe run.
|
|
32
|
+
|
|
33
|
+
- Config key `settleMs`, CLI flag `--settle <ms>`, `ScanOptions.settleMs`.
|
|
34
|
+
- **Default `0`.** A server-rendered page is complete at `load`; nothing
|
|
35
|
+
changes for it, and no existing scan slows down or shifts its result
|
|
36
|
+
without the operator asking.
|
|
37
|
+
- Bounded 0–60000 by `configSchema`. A non-numeric `--settle` is a
|
|
38
|
+
configuration error (exit 2), like every other bad flag.
|
|
39
|
+
- Applied per attempt, so a retry waits again.
|
|
40
|
+
|
|
41
|
+
The knob is deliberately dumb — a flat wait, not a heuristic. It is
|
|
42
|
+
predictable, trivial to reason about, and the operator sets it against a
|
|
43
|
+
site they know. `networkidle` and friends can be layered on later if a
|
|
44
|
+
real need appears; this covers the reported case without a smart default
|
|
45
|
+
that could regress a well-behaved site.
|
|
46
|
+
|
|
47
|
+
## Consequences
|
|
48
|
+
|
|
49
|
+
- Scanning a client-rendered site now means picking a value: enough for
|
|
50
|
+
the slowest hydrate/fetch on that site, added to every page's scan time.
|
|
51
|
+
The README's configuration section says so.
|
|
52
|
+
- `settleMs` sits alongside `maxPages` as a config-only tuning field with
|
|
53
|
+
a matching CLI override; `run` passes `config.settleMs` into `scan`.
|
|
54
|
+
- The report envelope and `schemaVersion` are untouched — this changes
|
|
55
|
+
*when* the DOM is read, not the shape of what is written.
|
|
56
|
+
- A page that renders after `load` but sooner than `settleMs` just waits
|
|
57
|
+
out the remainder; the delay is a ceiling on staleness, not a target.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bfsg-scanner",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "WCAG 2.1 AA / BFSG compliance scanner built on Playwright and axe-core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accessibility",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"author": "Mihaela Aghirculesei",
|
|
28
28
|
"type": "module",
|
|
29
29
|
"engines": {
|
|
30
|
-
"node": ">=
|
|
30
|
+
"node": ">=22.0.0"
|
|
31
31
|
},
|
|
32
32
|
"bin": {
|
|
33
33
|
"bfsg-scanner": "dist/cli/index.js"
|
|
@@ -56,18 +56,18 @@
|
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@axe-core/playwright": "4.13.0",
|
|
58
58
|
"axe-core": "4.13.0",
|
|
59
|
-
"fast-xml-parser": "5.11.
|
|
60
|
-
"playwright": "1.
|
|
59
|
+
"fast-xml-parser": "5.11.1",
|
|
60
|
+
"playwright": "1.63.0",
|
|
61
61
|
"yaml": "2.9.0",
|
|
62
|
-
"zod": "4.4
|
|
62
|
+
"zod": "4.5.4"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@biomejs/biome": "2.5.
|
|
66
|
-
"@types/node": "24.
|
|
65
|
+
"@biomejs/biome": "2.5.12",
|
|
66
|
+
"@types/node": "24.13.3",
|
|
67
67
|
"ajv": "8.20.0",
|
|
68
|
-
"rimraf": "6.
|
|
69
|
-
"tsx": "4.23.
|
|
70
|
-
"typescript": "
|
|
68
|
+
"rimraf": "6.1.3",
|
|
69
|
+
"tsx": "4.23.13",
|
|
70
|
+
"typescript": "7.0.2",
|
|
71
71
|
"vitest": "4.1.11"
|
|
72
72
|
}
|
|
73
73
|
}
|
package/schema/report.v1.json
CHANGED
|
@@ -144,8 +144,10 @@
|
|
|
144
144
|
"target": {
|
|
145
145
|
"type": "array",
|
|
146
146
|
"items": {
|
|
147
|
-
"
|
|
148
|
-
|
|
147
|
+
"oneOf": [
|
|
148
|
+
{ "type": "string" },
|
|
149
|
+
{ "type": "array", "items": { "type": "string" } }
|
|
150
|
+
]
|
|
149
151
|
}
|
|
150
152
|
},
|
|
151
153
|
"html": { "type": "string" },
|