@holmdigital/engine 2.8.0 → 2.10.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/README.md +5 -2
- package/dist/{chunk-6CGNOKCN.mjs → chunk-KGUYOQMY.mjs} +36 -9
- package/dist/{chunk-AICMJ3YF.mjs → chunk-O5RJOSBZ.mjs} +2 -2
- package/dist/cli/index.js +98 -16
- package/dist/cli/index.mjs +61 -8
- package/dist/{i18n-VUB5WFVC.mjs → i18n-BXFF6TW2.mjs} +1 -1
- package/dist/index.d.mts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +37 -10
- package/dist/index.mjs +2 -2
- package/dist/{plain-report-R2TZYGLD.mjs → plain-report-AWMBH6TM.mjs} +3 -2
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -35,6 +35,7 @@ For a comprehensive guide on CLI flags, CI/CD integration, and configuration fil
|
|
|
35
35
|
- **Configurable Severity Threshold**: Fail CI only on critical/high issues (configurable).
|
|
36
36
|
- **Pseudo-Automation**: Automatically generates Playwright/Puppeteer test scripts for manual verification steps.
|
|
37
37
|
- **PDF Reporting**: Generates beautiful, compliant PDF reports with severity-sorted violations, HTML error counts, and `@HolmDigital/engine` branding.
|
|
38
|
+
- **Plain-Language Reports**: `--plain` (or `--audience plain`) renders the report and PDF in plain language for managers, lawyers, and buyers without a technical background. Findings of the same rule are grouped into one card with an occurrence count, with a business-impact breakdown and Swedish-language fallback.
|
|
38
39
|
- **Type-Safe Results**: Scan results return fully typed `EnrichedReport[]` with `failingNodes` and `legalContext` — zero `as any` casts in the pipeline.
|
|
39
40
|
- **Build-Time Version Injection**: Engine version derived from `package.json` at build time via tsup `define` — CLI, cloud client, and reports always report the correct version.
|
|
40
41
|
- **TypeScript**: Written in TypeScript with full type definitions included.
|
|
@@ -73,6 +74,8 @@ npx hd-a11y-scan <url> [options]
|
|
|
73
74
|
| `--api-key <key>` | API Key for HolmDigital Cloud |
|
|
74
75
|
| `--cloud-url <url>` | Custom Cloud API Endpoint (default: cloud.holmdigital.se) |
|
|
75
76
|
| `--light` | Fast score-only mode — skips HTML validation and detailed legal mapping |
|
|
77
|
+
| `--plain` | Plain-language mode (klarspråksläge): report and PDF in non-technical language for recipients without a technical background. Alias for `--audience plain`. |
|
|
78
|
+
| `--audience <mode>` | Report audience: `developer` (default) or `plain`. |
|
|
76
79
|
|
|
77
80
|
### 🏆 Accessibility Badge
|
|
78
81
|
If your site achieves a **100% score**, the CLI will generate a [Shields.io](https://shields.io/) badge that you can add to your project's README:
|
|
@@ -113,9 +116,9 @@ npx hd-a11y-scan https://hospital.example.com --country US --sector private --st
|
|
|
113
116
|
"url": "https://example.com",
|
|
114
117
|
"timestamp": "2026-01-13T17:05:11.749Z",
|
|
115
118
|
"metadata": {
|
|
116
|
-
"engineVersion": "2.
|
|
119
|
+
"engineVersion": "2.8.0",
|
|
117
120
|
"axeCoreVersion": "4.11.1",
|
|
118
|
-
"standardsVersion": "2.
|
|
121
|
+
"standardsVersion": "2.8.0",
|
|
119
122
|
"scanDuration": 2891,
|
|
120
123
|
"pageTitle": "Example Domain",
|
|
121
124
|
"pageLanguage": "en"
|
|
@@ -56,7 +56,10 @@ var en_default = {
|
|
|
56
56
|
report_tagline: "Accessibility report",
|
|
57
57
|
attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
|
|
58
58
|
fallback_framing: "Technical finding. Ask your developer to review this:",
|
|
59
|
-
occurrences: "{count} occurrences"
|
|
59
|
+
occurrences: "{count} occurrences",
|
|
60
|
+
gate_blocked: "Plain-language (klarspr\xE5k) output is not yet available in '{lang}'.",
|
|
61
|
+
gate_supported: "Languages with klarspr\xE5k: {langs}.",
|
|
62
|
+
gate_howto: "Run without --plain for the developer report, or use a supported language (e.g. --lang sv)."
|
|
60
63
|
}
|
|
61
64
|
};
|
|
62
65
|
|
|
@@ -118,7 +121,10 @@ var sv_default = {
|
|
|
118
121
|
report_tagline: "Tillg\xE4nglighetsrapport",
|
|
119
122
|
attribution: "Rapporten genererades av HolmDigital Engine, en del av HolmDigitals ekosystem f\xF6r tillg\xE4nglighet.",
|
|
120
123
|
fallback_framing: "Tekniskt fynd som din utvecklare beh\xF6ver titta p\xE5.",
|
|
121
|
-
occurrences: "{count} f\xF6rekomster"
|
|
124
|
+
occurrences: "{count} f\xF6rekomster",
|
|
125
|
+
gate_blocked: "Klarspr\xE5k st\xF6ds \xE4nnu inte p\xE5 '{lang}'.",
|
|
126
|
+
gate_supported: "Spr\xE5k med klarspr\xE5k: {langs}.",
|
|
127
|
+
gate_howto: "K\xF6r utan --plain f\xF6r utvecklarrapporten, eller v\xE4lj ett spr\xE5k som st\xF6ds (t.ex. --lang sv)."
|
|
122
128
|
}
|
|
123
129
|
};
|
|
124
130
|
|
|
@@ -180,7 +186,10 @@ var de_default = {
|
|
|
180
186
|
report_tagline: "Accessibility report",
|
|
181
187
|
attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
|
|
182
188
|
fallback_framing: "Technical finding. Ask your developer to review this:",
|
|
183
|
-
occurrences: "{count} occurrences"
|
|
189
|
+
occurrences: "{count} occurrences",
|
|
190
|
+
gate_blocked: "Verst\xE4ndliche Sprache (Klarspr\xE5k) ist f\xFCr '{lang}' noch nicht verf\xFCgbar.",
|
|
191
|
+
gate_supported: "Sprachen mit verst\xE4ndlicher Sprache: {langs}.",
|
|
192
|
+
gate_howto: "Ohne --plain ausf\xFChren f\xFCr den Entwicklerbericht, oder eine unterst\xFCtzte Sprache verwenden (z. B. --lang sv)."
|
|
184
193
|
}
|
|
185
194
|
};
|
|
186
195
|
|
|
@@ -242,7 +251,10 @@ var fr_default = {
|
|
|
242
251
|
report_tagline: "Accessibility report",
|
|
243
252
|
attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
|
|
244
253
|
fallback_framing: "Technical finding. Ask your developer to review this:",
|
|
245
|
-
occurrences: "{count} occurrences"
|
|
254
|
+
occurrences: "{count} occurrences",
|
|
255
|
+
gate_blocked: "Le langage clair (klarspr\xE5k) n'est pas encore disponible en \xAB {lang} \xBB.",
|
|
256
|
+
gate_supported: "Langues avec langage clair : {langs}.",
|
|
257
|
+
gate_howto: "Lancez sans --plain pour le rapport d\xE9veloppeur, ou utilisez une langue prise en charge (par ex. --lang sv)."
|
|
246
258
|
}
|
|
247
259
|
};
|
|
248
260
|
|
|
@@ -304,7 +316,10 @@ var es_default = {
|
|
|
304
316
|
report_tagline: "Accessibility report",
|
|
305
317
|
attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
|
|
306
318
|
fallback_framing: "Technical finding. Ask your developer to review this:",
|
|
307
|
-
occurrences: "{count} occurrences"
|
|
319
|
+
occurrences: "{count} occurrences",
|
|
320
|
+
gate_blocked: "El lenguaje claro (klarspr\xE5k) a\xFAn no est\xE1 disponible en '{lang}'.",
|
|
321
|
+
gate_supported: "Idiomas con lenguaje claro: {langs}.",
|
|
322
|
+
gate_howto: "Ejecuta sin --plain para el informe para desarrolladores, o usa un idioma compatible (p. ej. --lang sv)."
|
|
308
323
|
}
|
|
309
324
|
};
|
|
310
325
|
|
|
@@ -366,7 +381,10 @@ var fi_default = {
|
|
|
366
381
|
report_tagline: "Accessibility report",
|
|
367
382
|
attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
|
|
368
383
|
fallback_framing: "Technical finding. Ask your developer to review this:",
|
|
369
|
-
occurrences: "{count} occurrences"
|
|
384
|
+
occurrences: "{count} occurrences",
|
|
385
|
+
gate_blocked: "Selkokielinen (klarspr\xE5k) raportti ei ole viel\xE4 saatavilla kielell\xE4 '{lang}'.",
|
|
386
|
+
gate_supported: "Kielet, joilla selkokielinen raportti on saatavilla: {langs}.",
|
|
387
|
+
gate_howto: "Aja ilman --plain-valitsinta kehitt\xE4j\xE4raporttia varten tai k\xE4yt\xE4 tuettua kielt\xE4 (esim. --lang sv)."
|
|
370
388
|
}
|
|
371
389
|
};
|
|
372
390
|
|
|
@@ -428,7 +446,10 @@ var dk_default = {
|
|
|
428
446
|
report_tagline: "Accessibility report",
|
|
429
447
|
attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
|
|
430
448
|
fallback_framing: "Technical finding. Ask your developer to review this:",
|
|
431
|
-
occurrences: "{count} occurrences"
|
|
449
|
+
occurrences: "{count} occurrences",
|
|
450
|
+
gate_blocked: "Klarsprog (klarspr\xE5k) er endnu ikke tilg\xE6ngeligt p\xE5 '{lang}'.",
|
|
451
|
+
gate_supported: "Sprog med klarsprog: {langs}.",
|
|
452
|
+
gate_howto: "K\xF8r uden --plain for udviklerrapporten, eller brug et underst\xF8ttet sprog (f.eks. --lang sv)."
|
|
432
453
|
}
|
|
433
454
|
};
|
|
434
455
|
|
|
@@ -490,7 +511,10 @@ var no_default = {
|
|
|
490
511
|
report_tagline: "Accessibility report",
|
|
491
512
|
attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
|
|
492
513
|
fallback_framing: "Technical finding. Ask your developer to review this:",
|
|
493
|
-
occurrences: "{count} occurrences"
|
|
514
|
+
occurrences: "{count} occurrences",
|
|
515
|
+
gate_blocked: "Klarspr\xE5k er enn\xE5 ikke tilgjengelig p\xE5 '{lang}'.",
|
|
516
|
+
gate_supported: "Spr\xE5k med klarspr\xE5k: {langs}.",
|
|
517
|
+
gate_howto: "Kj\xF8r uten --plain for utviklerrapporten, eller bruk et st\xF8ttet spr\xE5k (f.eks. --lang sv)."
|
|
494
518
|
}
|
|
495
519
|
};
|
|
496
520
|
|
|
@@ -552,7 +576,10 @@ var nl_default = {
|
|
|
552
576
|
report_tagline: "Accessibility report",
|
|
553
577
|
attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
|
|
554
578
|
fallback_framing: "Technical finding. Ask your developer to review this:",
|
|
555
|
-
occurrences: "{count} occurrences"
|
|
579
|
+
occurrences: "{count} occurrences",
|
|
580
|
+
gate_blocked: "Begrijpelijke taal (klarspr\xE5k) is nog niet beschikbaar in '{lang}'.",
|
|
581
|
+
gate_supported: "Talen met begrijpelijke taal: {langs}.",
|
|
582
|
+
gate_howto: "Voer uit zonder --plain voor het ontwikkelaarsrapport, of gebruik een ondersteunde taal (bijv. --lang sv)."
|
|
556
583
|
}
|
|
557
584
|
};
|
|
558
585
|
|
|
@@ -138,7 +138,7 @@ var HtmlValidator = class {
|
|
|
138
138
|
// src/core/regulatory-scanner.ts
|
|
139
139
|
import { readFileSync } from "fs";
|
|
140
140
|
function getEngineVersion() {
|
|
141
|
-
return "2.
|
|
141
|
+
return "2.10.0";
|
|
142
142
|
}
|
|
143
143
|
function getStandardsVersion() {
|
|
144
144
|
try {
|
|
@@ -330,7 +330,7 @@ var RegulatoryScanner = class {
|
|
|
330
330
|
async enrichResults(axeResults) {
|
|
331
331
|
const reports = [];
|
|
332
332
|
const { searchRulesByTags, generateRegulatoryReport, getConvergenceRule } = await import("@holmdigital/standards");
|
|
333
|
-
const { getCurrentLang } = await import("./i18n-
|
|
333
|
+
const { getCurrentLang } = await import("./i18n-BXFF6TW2.mjs");
|
|
334
334
|
const lang = getCurrentLang();
|
|
335
335
|
for (const violation of axeResults.violations) {
|
|
336
336
|
let report = generateRegulatoryReport(violation.id, lang);
|
package/dist/cli/index.js
CHANGED
|
@@ -98,7 +98,10 @@ var init_en = __esm({
|
|
|
98
98
|
report_tagline: "Accessibility report",
|
|
99
99
|
attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
|
|
100
100
|
fallback_framing: "Technical finding. Ask your developer to review this:",
|
|
101
|
-
occurrences: "{count} occurrences"
|
|
101
|
+
occurrences: "{count} occurrences",
|
|
102
|
+
gate_blocked: "Plain-language (klarspr\xE5k) output is not yet available in '{lang}'.",
|
|
103
|
+
gate_supported: "Languages with klarspr\xE5k: {langs}.",
|
|
104
|
+
gate_howto: "Run without --plain for the developer report, or use a supported language (e.g. --lang sv)."
|
|
102
105
|
}
|
|
103
106
|
};
|
|
104
107
|
}
|
|
@@ -165,7 +168,10 @@ var init_sv = __esm({
|
|
|
165
168
|
report_tagline: "Tillg\xE4nglighetsrapport",
|
|
166
169
|
attribution: "Rapporten genererades av HolmDigital Engine, en del av HolmDigitals ekosystem f\xF6r tillg\xE4nglighet.",
|
|
167
170
|
fallback_framing: "Tekniskt fynd som din utvecklare beh\xF6ver titta p\xE5.",
|
|
168
|
-
occurrences: "{count} f\xF6rekomster"
|
|
171
|
+
occurrences: "{count} f\xF6rekomster",
|
|
172
|
+
gate_blocked: "Klarspr\xE5k st\xF6ds \xE4nnu inte p\xE5 '{lang}'.",
|
|
173
|
+
gate_supported: "Spr\xE5k med klarspr\xE5k: {langs}.",
|
|
174
|
+
gate_howto: "K\xF6r utan --plain f\xF6r utvecklarrapporten, eller v\xE4lj ett spr\xE5k som st\xF6ds (t.ex. --lang sv)."
|
|
169
175
|
}
|
|
170
176
|
};
|
|
171
177
|
}
|
|
@@ -232,7 +238,10 @@ var init_de = __esm({
|
|
|
232
238
|
report_tagline: "Accessibility report",
|
|
233
239
|
attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
|
|
234
240
|
fallback_framing: "Technical finding. Ask your developer to review this:",
|
|
235
|
-
occurrences: "{count} occurrences"
|
|
241
|
+
occurrences: "{count} occurrences",
|
|
242
|
+
gate_blocked: "Verst\xE4ndliche Sprache (Klarspr\xE5k) ist f\xFCr '{lang}' noch nicht verf\xFCgbar.",
|
|
243
|
+
gate_supported: "Sprachen mit verst\xE4ndlicher Sprache: {langs}.",
|
|
244
|
+
gate_howto: "Ohne --plain ausf\xFChren f\xFCr den Entwicklerbericht, oder eine unterst\xFCtzte Sprache verwenden (z. B. --lang sv)."
|
|
236
245
|
}
|
|
237
246
|
};
|
|
238
247
|
}
|
|
@@ -299,7 +308,10 @@ var init_fr = __esm({
|
|
|
299
308
|
report_tagline: "Accessibility report",
|
|
300
309
|
attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
|
|
301
310
|
fallback_framing: "Technical finding. Ask your developer to review this:",
|
|
302
|
-
occurrences: "{count} occurrences"
|
|
311
|
+
occurrences: "{count} occurrences",
|
|
312
|
+
gate_blocked: "Le langage clair (klarspr\xE5k) n'est pas encore disponible en \xAB {lang} \xBB.",
|
|
313
|
+
gate_supported: "Langues avec langage clair : {langs}.",
|
|
314
|
+
gate_howto: "Lancez sans --plain pour le rapport d\xE9veloppeur, ou utilisez une langue prise en charge (par ex. --lang sv)."
|
|
303
315
|
}
|
|
304
316
|
};
|
|
305
317
|
}
|
|
@@ -366,7 +378,10 @@ var init_es = __esm({
|
|
|
366
378
|
report_tagline: "Accessibility report",
|
|
367
379
|
attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
|
|
368
380
|
fallback_framing: "Technical finding. Ask your developer to review this:",
|
|
369
|
-
occurrences: "{count} occurrences"
|
|
381
|
+
occurrences: "{count} occurrences",
|
|
382
|
+
gate_blocked: "El lenguaje claro (klarspr\xE5k) a\xFAn no est\xE1 disponible en '{lang}'.",
|
|
383
|
+
gate_supported: "Idiomas con lenguaje claro: {langs}.",
|
|
384
|
+
gate_howto: "Ejecuta sin --plain para el informe para desarrolladores, o usa un idioma compatible (p. ej. --lang sv)."
|
|
370
385
|
}
|
|
371
386
|
};
|
|
372
387
|
}
|
|
@@ -433,7 +448,10 @@ var init_fi = __esm({
|
|
|
433
448
|
report_tagline: "Accessibility report",
|
|
434
449
|
attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
|
|
435
450
|
fallback_framing: "Technical finding. Ask your developer to review this:",
|
|
436
|
-
occurrences: "{count} occurrences"
|
|
451
|
+
occurrences: "{count} occurrences",
|
|
452
|
+
gate_blocked: "Selkokielinen (klarspr\xE5k) raportti ei ole viel\xE4 saatavilla kielell\xE4 '{lang}'.",
|
|
453
|
+
gate_supported: "Kielet, joilla selkokielinen raportti on saatavilla: {langs}.",
|
|
454
|
+
gate_howto: "Aja ilman --plain-valitsinta kehitt\xE4j\xE4raporttia varten tai k\xE4yt\xE4 tuettua kielt\xE4 (esim. --lang sv)."
|
|
437
455
|
}
|
|
438
456
|
};
|
|
439
457
|
}
|
|
@@ -500,7 +518,10 @@ var init_dk = __esm({
|
|
|
500
518
|
report_tagline: "Accessibility report",
|
|
501
519
|
attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
|
|
502
520
|
fallback_framing: "Technical finding. Ask your developer to review this:",
|
|
503
|
-
occurrences: "{count} occurrences"
|
|
521
|
+
occurrences: "{count} occurrences",
|
|
522
|
+
gate_blocked: "Klarsprog (klarspr\xE5k) er endnu ikke tilg\xE6ngeligt p\xE5 '{lang}'.",
|
|
523
|
+
gate_supported: "Sprog med klarsprog: {langs}.",
|
|
524
|
+
gate_howto: "K\xF8r uden --plain for udviklerrapporten, eller brug et underst\xF8ttet sprog (f.eks. --lang sv)."
|
|
504
525
|
}
|
|
505
526
|
};
|
|
506
527
|
}
|
|
@@ -567,7 +588,10 @@ var init_no = __esm({
|
|
|
567
588
|
report_tagline: "Accessibility report",
|
|
568
589
|
attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
|
|
569
590
|
fallback_framing: "Technical finding. Ask your developer to review this:",
|
|
570
|
-
occurrences: "{count} occurrences"
|
|
591
|
+
occurrences: "{count} occurrences",
|
|
592
|
+
gate_blocked: "Klarspr\xE5k er enn\xE5 ikke tilgjengelig p\xE5 '{lang}'.",
|
|
593
|
+
gate_supported: "Spr\xE5k med klarspr\xE5k: {langs}.",
|
|
594
|
+
gate_howto: "Kj\xF8r uten --plain for utviklerrapporten, eller bruk et st\xF8ttet spr\xE5k (f.eks. --lang sv)."
|
|
571
595
|
}
|
|
572
596
|
};
|
|
573
597
|
}
|
|
@@ -634,7 +658,10 @@ var init_nl = __esm({
|
|
|
634
658
|
report_tagline: "Accessibility report",
|
|
635
659
|
attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
|
|
636
660
|
fallback_framing: "Technical finding. Ask your developer to review this:",
|
|
637
|
-
occurrences: "{count} occurrences"
|
|
661
|
+
occurrences: "{count} occurrences",
|
|
662
|
+
gate_blocked: "Begrijpelijke taal (klarspr\xE5k) is nog niet beschikbaar in '{lang}'.",
|
|
663
|
+
gate_supported: "Talen met begrijpelijke taal: {langs}.",
|
|
664
|
+
gate_howto: "Voer uit zonder --plain voor het ontwikkelaarsrapport, of gebruik een ondersteunde taal (bijv. --lang sv)."
|
|
638
665
|
}
|
|
639
666
|
};
|
|
640
667
|
}
|
|
@@ -786,7 +813,8 @@ function renderPlainReport(result, lang = "en") {
|
|
|
786
813
|
const badgeText = BADGE_CHALK[level](t(BADGE_KEY[level]));
|
|
787
814
|
const pl = report.plainLanguage;
|
|
788
815
|
const occurrences = group.count > 1 ? `, ${t("plain.occurrences", { count: group.count })}` : "";
|
|
789
|
-
|
|
816
|
+
const heading = pl?.headline ? `${pl.headline} (${report.ruleId})` : report.ruleId;
|
|
817
|
+
console.log(`${index + 1}. ${badgeText}: ${heading}${occurrences}`);
|
|
790
818
|
if (pl) {
|
|
791
819
|
console.log(` ${t("plain.what_happens")} ${pl.whatHappens}`);
|
|
792
820
|
console.log(` ${t("plain.who_is_affected")} ${pl.whoIsAffected}`);
|
|
@@ -1098,7 +1126,7 @@ var HtmlValidator = class {
|
|
|
1098
1126
|
// src/core/regulatory-scanner.ts
|
|
1099
1127
|
var import_node_fs = require("fs");
|
|
1100
1128
|
function getEngineVersion() {
|
|
1101
|
-
return "2.
|
|
1129
|
+
return "2.10.0";
|
|
1102
1130
|
}
|
|
1103
1131
|
function getStandardsVersion() {
|
|
1104
1132
|
try {
|
|
@@ -1912,10 +1940,11 @@ ${sortedGroups.map((group) => {
|
|
|
1912
1940
|
const badgeText = escapeHtml(t(PLAIN_BADGE_KEY[level]));
|
|
1913
1941
|
const pl = report.plainLanguage;
|
|
1914
1942
|
const occurrences = group.count > 1 ? `, ${escapeHtml(t("plain.occurrences", { count: group.count }))}` : "";
|
|
1943
|
+
const headingHtml = pl?.headline ? `${escapeHtml(pl.headline)} <span class="issue-rule-ref">(${escapeHtml(report.ruleId)})</span>` : escapeHtml(report.ruleId);
|
|
1915
1944
|
if (pl) {
|
|
1916
1945
|
return ` <li class="issue-item ${cardClass}">
|
|
1917
1946
|
<span class="badge ${badgeClass}">${badgeText}</span>
|
|
1918
|
-
<strong class="issue-id">${
|
|
1947
|
+
<strong class="issue-id">${headingHtml}${occurrences}</strong>
|
|
1919
1948
|
<dl class="issue-fields">
|
|
1920
1949
|
<dt>${t("plain.what_happens")}</dt><dd>${escapeHtml(pl.whatHappens)}</dd>
|
|
1921
1950
|
<dt>${t("plain.who_is_affected")}</dt><dd>${escapeHtml(pl.whoIsAffected)}</dd>
|
|
@@ -1927,7 +1956,7 @@ ${sortedGroups.map((group) => {
|
|
|
1927
1956
|
const rawDetail = isSwedish ? "" : ` ${escapeHtml(report.remediation.description)}`;
|
|
1928
1957
|
return ` <li class="issue-item ${cardClass}">
|
|
1929
1958
|
<span class="badge ${badgeClass}">${badgeText}</span>
|
|
1930
|
-
<strong class="issue-id">${
|
|
1959
|
+
<strong class="issue-id">${headingHtml}${occurrences}</strong>
|
|
1931
1960
|
<p class="issue-fallback"><span class="fallback-framing">${escapeHtml(t("plain.fallback_framing"))}</span>${rawDetail}</p>
|
|
1932
1961
|
</li>`;
|
|
1933
1962
|
}
|
|
@@ -2077,13 +2106,21 @@ ${sortedGroups.map((group) => {
|
|
|
2077
2106
|
/* ---- Rule ID ---- */
|
|
2078
2107
|
.issue-id {
|
|
2079
2108
|
display: block;
|
|
2109
|
+
font-size: 1.05rem;
|
|
2110
|
+
font-weight: 700;
|
|
2111
|
+
color: #1e293b;
|
|
2112
|
+
margin-bottom: 0.75rem;
|
|
2113
|
+
break-after: avoid;
|
|
2114
|
+
page-break-after: avoid;
|
|
2115
|
+
}
|
|
2116
|
+
|
|
2117
|
+
/* Raw axe rule id as a small, subordinate technical reference next to the
|
|
2118
|
+
Swedish plain-language heading. */
|
|
2119
|
+
.issue-rule-ref {
|
|
2080
2120
|
font-size: 0.78rem;
|
|
2081
2121
|
font-weight: 600;
|
|
2082
2122
|
color: #64748b;
|
|
2083
2123
|
font-family: ui-monospace, 'Cascadia Code', 'Courier New', monospace;
|
|
2084
|
-
margin-bottom: 0.75rem;
|
|
2085
|
-
break-after: avoid;
|
|
2086
|
-
page-break-after: avoid;
|
|
2087
2124
|
}
|
|
2088
2125
|
|
|
2089
2126
|
/* ---- Field label/value pairs ---- */
|
|
@@ -2555,6 +2592,45 @@ async function generateStatement(result, outputPath, lang = "en", format = "html
|
|
|
2555
2592
|
// src/cli/index.ts
|
|
2556
2593
|
init_i18n();
|
|
2557
2594
|
|
|
2595
|
+
// src/reporting/plain-language-support.ts
|
|
2596
|
+
init_cjs_shims();
|
|
2597
|
+
var import_standards2 = require("@holmdigital/standards");
|
|
2598
|
+
var PLAIN_LANGUAGE_CORE_RULES = [
|
|
2599
|
+
"color-contrast",
|
|
2600
|
+
"keyboard-accessible",
|
|
2601
|
+
"alt-text",
|
|
2602
|
+
"form-labels",
|
|
2603
|
+
"link-purpose",
|
|
2604
|
+
"language-of-page",
|
|
2605
|
+
"name-role-value",
|
|
2606
|
+
"landmark-one-main",
|
|
2607
|
+
"heading-order",
|
|
2608
|
+
"region",
|
|
2609
|
+
"target-size"
|
|
2610
|
+
];
|
|
2611
|
+
var CANDIDATE_LANGS = [
|
|
2612
|
+
"en",
|
|
2613
|
+
"sv",
|
|
2614
|
+
"de",
|
|
2615
|
+
"fr",
|
|
2616
|
+
"es",
|
|
2617
|
+
"nl",
|
|
2618
|
+
"no",
|
|
2619
|
+
"fi",
|
|
2620
|
+
"da"
|
|
2621
|
+
];
|
|
2622
|
+
function isEnglish(lang) {
|
|
2623
|
+
return /^en(-|$)/i.test(lang.trim());
|
|
2624
|
+
}
|
|
2625
|
+
function isPlainLanguageSupported(lang) {
|
|
2626
|
+
if (isEnglish(lang)) return true;
|
|
2627
|
+
const byId = new Map((0, import_standards2.getAllConvergenceRules)(lang).map((r) => [r.ruleId, r]));
|
|
2628
|
+
return PLAIN_LANGUAGE_CORE_RULES.every((id) => Boolean(byId.get(id)?.plainLanguage?.headline));
|
|
2629
|
+
}
|
|
2630
|
+
function getPlainLanguageSupportedLanguages() {
|
|
2631
|
+
return CANDIDATE_LANGS.filter((lang) => isPlainLanguageSupported(lang));
|
|
2632
|
+
}
|
|
2633
|
+
|
|
2558
2634
|
// src/cli/cloud-client.ts
|
|
2559
2635
|
init_cjs_shims();
|
|
2560
2636
|
function transformToCloudPayload(result) {
|
|
@@ -2678,6 +2754,12 @@ program.argument("<url>", "URL to scan").option("--lang <code>", "Language code
|
|
|
2678
2754
|
audience: cliOptions.plain ? "plain" : cliOptions.audience || fileConfig.audience || "developer"
|
|
2679
2755
|
};
|
|
2680
2756
|
setLanguage(options.lang);
|
|
2757
|
+
if (options.audience === "plain" && !options.json && !isPlainLanguageSupported(options.lang)) {
|
|
2758
|
+
console.error(import_chalk2.default.red(`\u2717 ${t("plain.gate_blocked", { lang: options.lang })}`));
|
|
2759
|
+
console.error(import_chalk2.default.gray(` ${t("plain.gate_supported", { langs: getPlainLanguageSupportedLanguages().join(", ") })}`));
|
|
2760
|
+
console.error(import_chalk2.default.gray(` ${t("plain.gate_howto")}`));
|
|
2761
|
+
process.exit(1);
|
|
2762
|
+
}
|
|
2681
2763
|
if (!isValidUrl(url)) {
|
|
2682
2764
|
}
|
|
2683
2765
|
if (!options.json) {
|
package/dist/cli/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
generateStatement,
|
|
8
8
|
generateStatementContent,
|
|
9
9
|
getEngineVersion
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-O5RJOSBZ.mjs";
|
|
11
11
|
import {
|
|
12
12
|
groupReportsByRule,
|
|
13
13
|
impactBreakdown
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
getCurrentLang,
|
|
17
17
|
setLanguage,
|
|
18
18
|
t
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-KGUYOQMY.mjs";
|
|
20
20
|
import {
|
|
21
21
|
__dirname
|
|
22
22
|
} from "../chunk-DIBTSSLZ.mjs";
|
|
@@ -411,10 +411,11 @@ ${sortedGroups.map((group) => {
|
|
|
411
411
|
const badgeText = escapeHtml(t(PLAIN_BADGE_KEY[level]));
|
|
412
412
|
const pl = report.plainLanguage;
|
|
413
413
|
const occurrences = group.count > 1 ? `, ${escapeHtml(t("plain.occurrences", { count: group.count }))}` : "";
|
|
414
|
+
const headingHtml = pl?.headline ? `${escapeHtml(pl.headline)} <span class="issue-rule-ref">(${escapeHtml(report.ruleId)})</span>` : escapeHtml(report.ruleId);
|
|
414
415
|
if (pl) {
|
|
415
416
|
return ` <li class="issue-item ${cardClass}">
|
|
416
417
|
<span class="badge ${badgeClass}">${badgeText}</span>
|
|
417
|
-
<strong class="issue-id">${
|
|
418
|
+
<strong class="issue-id">${headingHtml}${occurrences}</strong>
|
|
418
419
|
<dl class="issue-fields">
|
|
419
420
|
<dt>${t("plain.what_happens")}</dt><dd>${escapeHtml(pl.whatHappens)}</dd>
|
|
420
421
|
<dt>${t("plain.who_is_affected")}</dt><dd>${escapeHtml(pl.whoIsAffected)}</dd>
|
|
@@ -426,7 +427,7 @@ ${sortedGroups.map((group) => {
|
|
|
426
427
|
const rawDetail = isSwedish ? "" : ` ${escapeHtml(report.remediation.description)}`;
|
|
427
428
|
return ` <li class="issue-item ${cardClass}">
|
|
428
429
|
<span class="badge ${badgeClass}">${badgeText}</span>
|
|
429
|
-
<strong class="issue-id">${
|
|
430
|
+
<strong class="issue-id">${headingHtml}${occurrences}</strong>
|
|
430
431
|
<p class="issue-fallback"><span class="fallback-framing">${escapeHtml(t("plain.fallback_framing"))}</span>${rawDetail}</p>
|
|
431
432
|
</li>`;
|
|
432
433
|
}
|
|
@@ -576,13 +577,21 @@ ${sortedGroups.map((group) => {
|
|
|
576
577
|
/* ---- Rule ID ---- */
|
|
577
578
|
.issue-id {
|
|
578
579
|
display: block;
|
|
580
|
+
font-size: 1.05rem;
|
|
581
|
+
font-weight: 700;
|
|
582
|
+
color: #1e293b;
|
|
583
|
+
margin-bottom: 0.75rem;
|
|
584
|
+
break-after: avoid;
|
|
585
|
+
page-break-after: avoid;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
/* Raw axe rule id as a small, subordinate technical reference next to the
|
|
589
|
+
Swedish plain-language heading. */
|
|
590
|
+
.issue-rule-ref {
|
|
579
591
|
font-size: 0.78rem;
|
|
580
592
|
font-weight: 600;
|
|
581
593
|
color: #64748b;
|
|
582
594
|
font-family: ui-monospace, 'Cascadia Code', 'Courier New', monospace;
|
|
583
|
-
margin-bottom: 0.75rem;
|
|
584
|
-
break-after: avoid;
|
|
585
|
-
page-break-after: avoid;
|
|
586
595
|
}
|
|
587
596
|
|
|
588
597
|
/* ---- Field label/value pairs ---- */
|
|
@@ -705,6 +714,44 @@ async function generatePDF(htmlContent, outputPath) {
|
|
|
705
714
|
}
|
|
706
715
|
}
|
|
707
716
|
|
|
717
|
+
// src/reporting/plain-language-support.ts
|
|
718
|
+
import { getAllConvergenceRules } from "@holmdigital/standards";
|
|
719
|
+
var PLAIN_LANGUAGE_CORE_RULES = [
|
|
720
|
+
"color-contrast",
|
|
721
|
+
"keyboard-accessible",
|
|
722
|
+
"alt-text",
|
|
723
|
+
"form-labels",
|
|
724
|
+
"link-purpose",
|
|
725
|
+
"language-of-page",
|
|
726
|
+
"name-role-value",
|
|
727
|
+
"landmark-one-main",
|
|
728
|
+
"heading-order",
|
|
729
|
+
"region",
|
|
730
|
+
"target-size"
|
|
731
|
+
];
|
|
732
|
+
var CANDIDATE_LANGS = [
|
|
733
|
+
"en",
|
|
734
|
+
"sv",
|
|
735
|
+
"de",
|
|
736
|
+
"fr",
|
|
737
|
+
"es",
|
|
738
|
+
"nl",
|
|
739
|
+
"no",
|
|
740
|
+
"fi",
|
|
741
|
+
"da"
|
|
742
|
+
];
|
|
743
|
+
function isEnglish(lang) {
|
|
744
|
+
return /^en(-|$)/i.test(lang.trim());
|
|
745
|
+
}
|
|
746
|
+
function isPlainLanguageSupported(lang) {
|
|
747
|
+
if (isEnglish(lang)) return true;
|
|
748
|
+
const byId = new Map(getAllConvergenceRules(lang).map((r) => [r.ruleId, r]));
|
|
749
|
+
return PLAIN_LANGUAGE_CORE_RULES.every((id) => Boolean(byId.get(id)?.plainLanguage?.headline));
|
|
750
|
+
}
|
|
751
|
+
function getPlainLanguageSupportedLanguages() {
|
|
752
|
+
return CANDIDATE_LANGS.filter((lang) => isPlainLanguageSupported(lang));
|
|
753
|
+
}
|
|
754
|
+
|
|
708
755
|
// src/cli/cloud-client.ts
|
|
709
756
|
function transformToCloudPayload(result) {
|
|
710
757
|
const violations = result.reports.map((report) => {
|
|
@@ -827,6 +874,12 @@ program.argument("<url>", "URL to scan").option("--lang <code>", "Language code
|
|
|
827
874
|
audience: cliOptions.plain ? "plain" : cliOptions.audience || fileConfig.audience || "developer"
|
|
828
875
|
};
|
|
829
876
|
setLanguage(options.lang);
|
|
877
|
+
if (options.audience === "plain" && !options.json && !isPlainLanguageSupported(options.lang)) {
|
|
878
|
+
console.error(chalk.red(`\u2717 ${t("plain.gate_blocked", { lang: options.lang })}`));
|
|
879
|
+
console.error(chalk.gray(` ${t("plain.gate_supported", { langs: getPlainLanguageSupportedLanguages().join(", ") })}`));
|
|
880
|
+
console.error(chalk.gray(` ${t("plain.gate_howto")}`));
|
|
881
|
+
process.exit(1);
|
|
882
|
+
}
|
|
830
883
|
if (!isValidUrl(url)) {
|
|
831
884
|
}
|
|
832
885
|
if (!options.json) {
|
|
@@ -919,7 +972,7 @@ program.argument("<url>", "URL to scan").option("--lang <code>", "Language code
|
|
|
919
972
|
console.log(chalk.gray(`
|
|
920
973
|
Scan: ${result.metadata.scanDuration}ms | ${result.metadata.engineVersion}`));
|
|
921
974
|
} else if (options.audience === "plain") {
|
|
922
|
-
const { renderPlainReport } = await import("../plain-report-
|
|
975
|
+
const { renderPlainReport } = await import("../plain-report-AWMBH6TM.mjs");
|
|
923
976
|
renderPlainReport(result, options.lang);
|
|
924
977
|
} else {
|
|
925
978
|
console.log("\n");
|
package/dist/index.d.mts
CHANGED
|
@@ -162,7 +162,10 @@ var plain = {
|
|
|
162
162
|
report_tagline: "Accessibility report",
|
|
163
163
|
attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
|
|
164
164
|
fallback_framing: "Technical finding. Ask your developer to review this:",
|
|
165
|
-
occurrences: "{count} occurrences"
|
|
165
|
+
occurrences: "{count} occurrences",
|
|
166
|
+
gate_blocked: "Plain-language (klarspråk) output is not yet available in '{lang}'.",
|
|
167
|
+
gate_supported: "Languages with klarspråk: {langs}.",
|
|
168
|
+
gate_howto: "Run without --plain for the developer report, or use a supported language (e.g. --lang sv)."
|
|
166
169
|
};
|
|
167
170
|
var en = {
|
|
168
171
|
cli: cli,
|
package/dist/index.d.ts
CHANGED
|
@@ -162,7 +162,10 @@ var plain = {
|
|
|
162
162
|
report_tagline: "Accessibility report",
|
|
163
163
|
attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
|
|
164
164
|
fallback_framing: "Technical finding. Ask your developer to review this:",
|
|
165
|
-
occurrences: "{count} occurrences"
|
|
165
|
+
occurrences: "{count} occurrences",
|
|
166
|
+
gate_blocked: "Plain-language (klarspråk) output is not yet available in '{lang}'.",
|
|
167
|
+
gate_supported: "Languages with klarspråk: {langs}.",
|
|
168
|
+
gate_howto: "Run without --plain for the developer report, or use a supported language (e.g. --lang sv)."
|
|
166
169
|
};
|
|
167
170
|
var en = {
|
|
168
171
|
cli: cli,
|
package/dist/index.js
CHANGED
|
@@ -98,7 +98,10 @@ var init_en = __esm({
|
|
|
98
98
|
report_tagline: "Accessibility report",
|
|
99
99
|
attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
|
|
100
100
|
fallback_framing: "Technical finding. Ask your developer to review this:",
|
|
101
|
-
occurrences: "{count} occurrences"
|
|
101
|
+
occurrences: "{count} occurrences",
|
|
102
|
+
gate_blocked: "Plain-language (klarspr\xE5k) output is not yet available in '{lang}'.",
|
|
103
|
+
gate_supported: "Languages with klarspr\xE5k: {langs}.",
|
|
104
|
+
gate_howto: "Run without --plain for the developer report, or use a supported language (e.g. --lang sv)."
|
|
102
105
|
}
|
|
103
106
|
};
|
|
104
107
|
}
|
|
@@ -165,7 +168,10 @@ var init_sv = __esm({
|
|
|
165
168
|
report_tagline: "Tillg\xE4nglighetsrapport",
|
|
166
169
|
attribution: "Rapporten genererades av HolmDigital Engine, en del av HolmDigitals ekosystem f\xF6r tillg\xE4nglighet.",
|
|
167
170
|
fallback_framing: "Tekniskt fynd som din utvecklare beh\xF6ver titta p\xE5.",
|
|
168
|
-
occurrences: "{count} f\xF6rekomster"
|
|
171
|
+
occurrences: "{count} f\xF6rekomster",
|
|
172
|
+
gate_blocked: "Klarspr\xE5k st\xF6ds \xE4nnu inte p\xE5 '{lang}'.",
|
|
173
|
+
gate_supported: "Spr\xE5k med klarspr\xE5k: {langs}.",
|
|
174
|
+
gate_howto: "K\xF6r utan --plain f\xF6r utvecklarrapporten, eller v\xE4lj ett spr\xE5k som st\xF6ds (t.ex. --lang sv)."
|
|
169
175
|
}
|
|
170
176
|
};
|
|
171
177
|
}
|
|
@@ -232,7 +238,10 @@ var init_de = __esm({
|
|
|
232
238
|
report_tagline: "Accessibility report",
|
|
233
239
|
attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
|
|
234
240
|
fallback_framing: "Technical finding. Ask your developer to review this:",
|
|
235
|
-
occurrences: "{count} occurrences"
|
|
241
|
+
occurrences: "{count} occurrences",
|
|
242
|
+
gate_blocked: "Verst\xE4ndliche Sprache (Klarspr\xE5k) ist f\xFCr '{lang}' noch nicht verf\xFCgbar.",
|
|
243
|
+
gate_supported: "Sprachen mit verst\xE4ndlicher Sprache: {langs}.",
|
|
244
|
+
gate_howto: "Ohne --plain ausf\xFChren f\xFCr den Entwicklerbericht, oder eine unterst\xFCtzte Sprache verwenden (z. B. --lang sv)."
|
|
236
245
|
}
|
|
237
246
|
};
|
|
238
247
|
}
|
|
@@ -299,7 +308,10 @@ var init_fr = __esm({
|
|
|
299
308
|
report_tagline: "Accessibility report",
|
|
300
309
|
attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
|
|
301
310
|
fallback_framing: "Technical finding. Ask your developer to review this:",
|
|
302
|
-
occurrences: "{count} occurrences"
|
|
311
|
+
occurrences: "{count} occurrences",
|
|
312
|
+
gate_blocked: "Le langage clair (klarspr\xE5k) n'est pas encore disponible en \xAB {lang} \xBB.",
|
|
313
|
+
gate_supported: "Langues avec langage clair : {langs}.",
|
|
314
|
+
gate_howto: "Lancez sans --plain pour le rapport d\xE9veloppeur, ou utilisez une langue prise en charge (par ex. --lang sv)."
|
|
303
315
|
}
|
|
304
316
|
};
|
|
305
317
|
}
|
|
@@ -366,7 +378,10 @@ var init_es = __esm({
|
|
|
366
378
|
report_tagline: "Accessibility report",
|
|
367
379
|
attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
|
|
368
380
|
fallback_framing: "Technical finding. Ask your developer to review this:",
|
|
369
|
-
occurrences: "{count} occurrences"
|
|
381
|
+
occurrences: "{count} occurrences",
|
|
382
|
+
gate_blocked: "El lenguaje claro (klarspr\xE5k) a\xFAn no est\xE1 disponible en '{lang}'.",
|
|
383
|
+
gate_supported: "Idiomas con lenguaje claro: {langs}.",
|
|
384
|
+
gate_howto: "Ejecuta sin --plain para el informe para desarrolladores, o usa un idioma compatible (p. ej. --lang sv)."
|
|
370
385
|
}
|
|
371
386
|
};
|
|
372
387
|
}
|
|
@@ -433,7 +448,10 @@ var init_fi = __esm({
|
|
|
433
448
|
report_tagline: "Accessibility report",
|
|
434
449
|
attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
|
|
435
450
|
fallback_framing: "Technical finding. Ask your developer to review this:",
|
|
436
|
-
occurrences: "{count} occurrences"
|
|
451
|
+
occurrences: "{count} occurrences",
|
|
452
|
+
gate_blocked: "Selkokielinen (klarspr\xE5k) raportti ei ole viel\xE4 saatavilla kielell\xE4 '{lang}'.",
|
|
453
|
+
gate_supported: "Kielet, joilla selkokielinen raportti on saatavilla: {langs}.",
|
|
454
|
+
gate_howto: "Aja ilman --plain-valitsinta kehitt\xE4j\xE4raporttia varten tai k\xE4yt\xE4 tuettua kielt\xE4 (esim. --lang sv)."
|
|
437
455
|
}
|
|
438
456
|
};
|
|
439
457
|
}
|
|
@@ -500,7 +518,10 @@ var init_dk = __esm({
|
|
|
500
518
|
report_tagline: "Accessibility report",
|
|
501
519
|
attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
|
|
502
520
|
fallback_framing: "Technical finding. Ask your developer to review this:",
|
|
503
|
-
occurrences: "{count} occurrences"
|
|
521
|
+
occurrences: "{count} occurrences",
|
|
522
|
+
gate_blocked: "Klarsprog (klarspr\xE5k) er endnu ikke tilg\xE6ngeligt p\xE5 '{lang}'.",
|
|
523
|
+
gate_supported: "Sprog med klarsprog: {langs}.",
|
|
524
|
+
gate_howto: "K\xF8r uden --plain for udviklerrapporten, eller brug et underst\xF8ttet sprog (f.eks. --lang sv)."
|
|
504
525
|
}
|
|
505
526
|
};
|
|
506
527
|
}
|
|
@@ -567,7 +588,10 @@ var init_no = __esm({
|
|
|
567
588
|
report_tagline: "Accessibility report",
|
|
568
589
|
attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
|
|
569
590
|
fallback_framing: "Technical finding. Ask your developer to review this:",
|
|
570
|
-
occurrences: "{count} occurrences"
|
|
591
|
+
occurrences: "{count} occurrences",
|
|
592
|
+
gate_blocked: "Klarspr\xE5k er enn\xE5 ikke tilgjengelig p\xE5 '{lang}'.",
|
|
593
|
+
gate_supported: "Spr\xE5k med klarspr\xE5k: {langs}.",
|
|
594
|
+
gate_howto: "Kj\xF8r uten --plain for utviklerrapporten, eller bruk et st\xF8ttet spr\xE5k (f.eks. --lang sv)."
|
|
571
595
|
}
|
|
572
596
|
};
|
|
573
597
|
}
|
|
@@ -634,7 +658,10 @@ var init_nl = __esm({
|
|
|
634
658
|
report_tagline: "Accessibility report",
|
|
635
659
|
attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
|
|
636
660
|
fallback_framing: "Technical finding. Ask your developer to review this:",
|
|
637
|
-
occurrences: "{count} occurrences"
|
|
661
|
+
occurrences: "{count} occurrences",
|
|
662
|
+
gate_blocked: "Begrijpelijke taal (klarspr\xE5k) is nog niet beschikbaar in '{lang}'.",
|
|
663
|
+
gate_supported: "Talen met begrijpelijke taal: {langs}.",
|
|
664
|
+
gate_howto: "Voer uit zonder --plain voor het ontwikkelaarsrapport, of gebruik een ondersteunde taal (bijv. --lang sv)."
|
|
638
665
|
}
|
|
639
666
|
};
|
|
640
667
|
}
|
|
@@ -875,7 +902,7 @@ var HtmlValidator = class {
|
|
|
875
902
|
// src/core/regulatory-scanner.ts
|
|
876
903
|
var import_node_fs = require("fs");
|
|
877
904
|
function getEngineVersion() {
|
|
878
|
-
return "2.
|
|
905
|
+
return "2.10.0";
|
|
879
906
|
}
|
|
880
907
|
function getStandardsVersion() {
|
|
881
908
|
try {
|
package/dist/index.mjs
CHANGED
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
generateStatement,
|
|
6
6
|
generateStatementContent,
|
|
7
7
|
getEngineVersion
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-O5RJOSBZ.mjs";
|
|
9
9
|
import {
|
|
10
10
|
getCurrentLang,
|
|
11
11
|
setLanguage,
|
|
12
12
|
t
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KGUYOQMY.mjs";
|
|
14
14
|
import "./chunk-DIBTSSLZ.mjs";
|
|
15
15
|
export {
|
|
16
16
|
PseudoAutomationEngine,
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getCurrentLang,
|
|
7
7
|
setLanguage,
|
|
8
8
|
t
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KGUYOQMY.mjs";
|
|
10
10
|
import "./chunk-DIBTSSLZ.mjs";
|
|
11
11
|
|
|
12
12
|
// src/reporting/plain-report.ts
|
|
@@ -67,7 +67,8 @@ function renderPlainReport(result, lang = "en") {
|
|
|
67
67
|
const badgeText = BADGE_CHALK[level](t(BADGE_KEY[level]));
|
|
68
68
|
const pl = report.plainLanguage;
|
|
69
69
|
const occurrences = group.count > 1 ? `, ${t("plain.occurrences", { count: group.count })}` : "";
|
|
70
|
-
|
|
70
|
+
const heading = pl?.headline ? `${pl.headline} (${report.ruleId})` : report.ruleId;
|
|
71
|
+
console.log(`${index + 1}. ${badgeText}: ${heading}${occurrences}`);
|
|
71
72
|
if (pl) {
|
|
72
73
|
console.log(` ${t("plain.what_happens")} ${pl.whatHappens}`);
|
|
73
74
|
console.log(` ${t("plain.who_is_affected")} ${pl.whoIsAffected}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holmdigital/engine",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -84,25 +84,25 @@
|
|
|
84
84
|
"dependencies": {
|
|
85
85
|
"@holmdigital/components": "^3.0.0",
|
|
86
86
|
"@holmdigital/standards": "^2.8.0",
|
|
87
|
-
"axe-core": "^4.
|
|
87
|
+
"axe-core": "^4.12.1",
|
|
88
88
|
"chalk": "^5.3.0",
|
|
89
89
|
"commander": "^12.1.0",
|
|
90
|
-
"cosmiconfig": "^9.0.
|
|
91
|
-
"html-validate": "
|
|
90
|
+
"cosmiconfig": "^9.0.2",
|
|
91
|
+
"html-validate": "11.5.3",
|
|
92
92
|
"ora": "^8.1.1",
|
|
93
|
-
"puppeteer": "
|
|
93
|
+
"puppeteer": "25.2.0",
|
|
94
94
|
"react": "^18.3.1 || ^19.0.0",
|
|
95
95
|
"react-dom": "^18.3.1 || ^19.0.0",
|
|
96
96
|
"ws": "^8.18.0"
|
|
97
97
|
},
|
|
98
98
|
"devDependencies": {
|
|
99
99
|
"@types/cosmiconfig": "^5.0.3",
|
|
100
|
-
"@types/node": "^
|
|
100
|
+
"@types/node": "^26.0.0",
|
|
101
101
|
"@types/react": "^18.3.1 || ^19.0.0",
|
|
102
102
|
"@types/react-dom": "^18.3.1 || ^19.0.0",
|
|
103
103
|
"@types/ws": "^8.5.13",
|
|
104
104
|
"tsup": "^8.3.5",
|
|
105
|
-
"typescript": "^
|
|
106
|
-
"vitest": "^4.
|
|
105
|
+
"typescript": "^6.0.3",
|
|
106
|
+
"vitest": "^4.1.9"
|
|
107
107
|
}
|
|
108
108
|
}
|