@holmdigital/engine 2.5.1 → 2.5.4
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 +7 -5
- package/dist/{chunk-KOTT5C66.mjs → chunk-TJN6AU7G.mjs} +9 -6
- package/dist/cli/index.js +10 -6
- package/dist/cli/index.mjs +2 -1
- package/dist/index.js +9 -6
- package/dist/index.mjs +1 -1
- package/package.json +27 -9
package/README.md
CHANGED
|
@@ -21,8 +21,8 @@ For a comprehensive guide on CLI flags, CI/CD integration, and configuration fil
|
|
|
21
21
|
|
|
22
22
|
## Features
|
|
23
23
|
|
|
24
|
-
- **Regulatory Mapping**: Maps technical failures to EU laws (EN 301 549, EAA), international laws (Australian DDA), and **U.S. ADA (Title II state/local, Title III private sector) + Section 508 (federal agencies)**.
|
|
25
|
-
- **Sector-Aware US Routing**: `--country US --sector public` references **ADA Title II + Section 508** (DOJ enforcement); `--sector private` references **ADA Title III** (DOJ enforcement).
|
|
24
|
+
- **Regulatory Mapping**: Maps technical failures to EU laws (EN 301 549, EAA), international laws (Australian DDA), and **U.S. ADA (Title II state/local, Title III private sector) + Section 508 (federal agencies) + HHS Section 504 (HHS-funded healthcare/research)**.
|
|
25
|
+
- **Sector-Aware US Routing**: `--country US --sector public` references **ADA Title II + Section 508** (DOJ enforcement); `--sector private` references **ADA Title III + HHS Section 504** (DOJ + HHS OCR enforcement) — covering both general public-accommodations exposure and HHS-funded healthcare obligations in a single statement.
|
|
26
26
|
- **HTML Structure Validation**: Built-in `html-validate` checks to prevent false positives/negatives.
|
|
27
27
|
- **Internationalization (i18n)**:
|
|
28
28
|
- **CLI output**: 9 locale files (`en`, `sv`, `no`, `fi`, `da`, `de`, `fr`, `es`, `nl`) + 4 English aliases (`en-gb`, `en-us`, `en-ca`, `en-au`) that fall back to `en`.
|
|
@@ -98,8 +98,10 @@ npx hd-a11y-scan https://example.com --light --json
|
|
|
98
98
|
# U.S. state/local government statement (ADA Title II + Section 508, DOJ)
|
|
99
99
|
npx hd-a11y-scan https://example.gov --country US --sector public --statement statement.md --lang en-us
|
|
100
100
|
|
|
101
|
-
# U.S. private sector
|
|
101
|
+
# U.S. private sector statement (ADA Title III + HHS Section 504, DOJ + HHS OCR)
|
|
102
|
+
# Covers general "public accommodation" exposure AND HHS-funded healthcare obligations
|
|
102
103
|
npx hd-a11y-scan https://shop.example.com --country US --sector private --statement statement.md --lang en-us
|
|
104
|
+
npx hd-a11y-scan https://hospital.example.com --country US --sector private --statement statement.md --lang en-us
|
|
103
105
|
```
|
|
104
106
|
|
|
105
107
|
## JSON Output
|
|
@@ -109,9 +111,9 @@ npx hd-a11y-scan https://shop.example.com --country US --sector private --statem
|
|
|
109
111
|
"url": "https://example.com",
|
|
110
112
|
"timestamp": "2026-01-13T17:05:11.749Z",
|
|
111
113
|
"metadata": {
|
|
112
|
-
"engineVersion": "2.
|
|
114
|
+
"engineVersion": "2.5.3",
|
|
113
115
|
"axeCoreVersion": "4.11.1",
|
|
114
|
-
"standardsVersion": "
|
|
116
|
+
"standardsVersion": "2.5.2",
|
|
115
117
|
"scanDuration": 2891,
|
|
116
118
|
"pageTitle": "Example Domain",
|
|
117
119
|
"pageLanguage": "en"
|
|
@@ -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.5.
|
|
141
|
+
return "2.5.4";
|
|
142
142
|
}
|
|
143
143
|
function getStandardsVersion() {
|
|
144
144
|
try {
|
|
@@ -205,7 +205,7 @@ var RegulatoryScanner = class {
|
|
|
205
205
|
timeout: 1e4,
|
|
206
206
|
concurrency: 2
|
|
207
207
|
});
|
|
208
|
-
} catch
|
|
208
|
+
} catch {
|
|
209
209
|
this.log("Network busy, proceeding with scan anyway...");
|
|
210
210
|
}
|
|
211
211
|
pageTitle = await page.title();
|
|
@@ -685,7 +685,7 @@ async function generateStatementContent(result, lang = "en", format = "html", me
|
|
|
685
685
|
const logoBuffer = await fs.readFile(p);
|
|
686
686
|
logoUrl = `data:image/jpeg;base64,${logoBuffer.toString("base64")}`;
|
|
687
687
|
break;
|
|
688
|
-
} catch
|
|
688
|
+
} catch {
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
691
|
} catch (e) {
|
|
@@ -705,8 +705,10 @@ async function generateStatementContent(result, lang = "en", format = "html", me
|
|
|
705
705
|
url: "https://holmdigital.se"
|
|
706
706
|
},
|
|
707
707
|
logoUrl,
|
|
708
|
-
|
|
709
|
-
|
|
708
|
+
// Placeholders make it obvious the consumer must supply real contact info.
|
|
709
|
+
// Previous fallback leaked HolmDigital's own contact details into customer statements.
|
|
710
|
+
contactEmail: metadata?.contactEmail || "[YOUR EMAIL]",
|
|
711
|
+
phoneNumber: metadata?.phoneNumber || "[YOUR PHONE]",
|
|
710
712
|
responseTime: metadata?.responseTime || RESPONSE_TIME_DEFAULT[lang] || RESPONSE_TIME_DEFAULT["en"],
|
|
711
713
|
nonComplianceItems,
|
|
712
714
|
locale: lang,
|
|
@@ -823,7 +825,8 @@ async function generateStatementContent(result, lang = "en", format = "html", me
|
|
|
823
825
|
const s508 = usLaws.find((l) => l.id === "us-508");
|
|
824
826
|
return s508 ? `${adaLaw.fullName} (${adaLaw.law}) & ${s508.fullName} (${s508.law})` : `${adaLaw.fullName} (${adaLaw.law})`;
|
|
825
827
|
}
|
|
826
|
-
|
|
828
|
+
const hhs504 = usLaws.find((l) => l.euFramework === "REHAB" && l.scope === "private");
|
|
829
|
+
return hhs504 ? `${adaLaw.fullName} (${adaLaw.law}) & ${hhs504.fullName} (${hhs504.law})` : `${adaLaw.fullName} (${adaLaw.law})`;
|
|
827
830
|
}
|
|
828
831
|
}
|
|
829
832
|
const law = getNationalLawByFramework(sector === "private" ? "EAA" : "WAD", country);
|
package/dist/cli/index.js
CHANGED
|
@@ -783,7 +783,7 @@ var HtmlValidator = class {
|
|
|
783
783
|
// src/core/regulatory-scanner.ts
|
|
784
784
|
var import_node_fs = require("fs");
|
|
785
785
|
function getEngineVersion() {
|
|
786
|
-
return "2.5.
|
|
786
|
+
return "2.5.4";
|
|
787
787
|
}
|
|
788
788
|
function getStandardsVersion() {
|
|
789
789
|
try {
|
|
@@ -850,7 +850,7 @@ var RegulatoryScanner = class {
|
|
|
850
850
|
timeout: 1e4,
|
|
851
851
|
concurrency: 2
|
|
852
852
|
});
|
|
853
|
-
} catch
|
|
853
|
+
} catch {
|
|
854
854
|
this.log("Network busy, proceeding with scan anyway...");
|
|
855
855
|
}
|
|
856
856
|
pageTitle = await page.title();
|
|
@@ -1414,6 +1414,7 @@ function generateReportHTML(result, sector = "public") {
|
|
|
1414
1414
|
<div class="meta">
|
|
1415
1415
|
<div>${t("report.scan_target", { url: result.url })}</div>
|
|
1416
1416
|
<div>${t("report.generated", { date: formatDate(result.timestamp) })}</div>
|
|
1417
|
+
${sector ? `<div style="margin-top: 0.25rem; font-size: 0.75rem; font-weight: 600; color: ${sector === "private" ? "#7c3aed" : "#1d4ed8"};">${sector === "private" ? "Private sector (EAA)" : "Public sector (WAD)"}</div>` : ""}
|
|
1417
1418
|
${generateBadgeUrl(result.score) ? `<div style="margin-top: 0.5rem;"><img src="${generateBadgeUrl(result.score)}" alt="Accessibility Status: 100% Compliant" /></div>` : ""}
|
|
1418
1419
|
</div>
|
|
1419
1420
|
</div>
|
|
@@ -1673,7 +1674,7 @@ async function generateStatementContent(result, lang = "en", format = "html", me
|
|
|
1673
1674
|
const logoBuffer = await import_promises.default.readFile(p);
|
|
1674
1675
|
logoUrl = `data:image/jpeg;base64,${logoBuffer.toString("base64")}`;
|
|
1675
1676
|
break;
|
|
1676
|
-
} catch
|
|
1677
|
+
} catch {
|
|
1677
1678
|
}
|
|
1678
1679
|
}
|
|
1679
1680
|
} catch (e) {
|
|
@@ -1693,8 +1694,10 @@ async function generateStatementContent(result, lang = "en", format = "html", me
|
|
|
1693
1694
|
url: "https://holmdigital.se"
|
|
1694
1695
|
},
|
|
1695
1696
|
logoUrl,
|
|
1696
|
-
|
|
1697
|
-
|
|
1697
|
+
// Placeholders make it obvious the consumer must supply real contact info.
|
|
1698
|
+
// Previous fallback leaked HolmDigital's own contact details into customer statements.
|
|
1699
|
+
contactEmail: metadata?.contactEmail || "[YOUR EMAIL]",
|
|
1700
|
+
phoneNumber: metadata?.phoneNumber || "[YOUR PHONE]",
|
|
1698
1701
|
responseTime: metadata?.responseTime || RESPONSE_TIME_DEFAULT[lang] || RESPONSE_TIME_DEFAULT["en"],
|
|
1699
1702
|
nonComplianceItems,
|
|
1700
1703
|
locale: lang,
|
|
@@ -1811,7 +1814,8 @@ async function generateStatementContent(result, lang = "en", format = "html", me
|
|
|
1811
1814
|
const s508 = usLaws.find((l) => l.id === "us-508");
|
|
1812
1815
|
return s508 ? `${adaLaw.fullName} (${adaLaw.law}) & ${s508.fullName} (${s508.law})` : `${adaLaw.fullName} (${adaLaw.law})`;
|
|
1813
1816
|
}
|
|
1814
|
-
|
|
1817
|
+
const hhs504 = usLaws.find((l) => l.euFramework === "REHAB" && l.scope === "private");
|
|
1818
|
+
return hhs504 ? `${adaLaw.fullName} (${adaLaw.law}) & ${hhs504.fullName} (${hhs504.law})` : `${adaLaw.fullName} (${adaLaw.law})`;
|
|
1815
1819
|
}
|
|
1816
1820
|
}
|
|
1817
1821
|
const law = (0, import_standards.getNationalLawByFramework)(sector === "private" ? "EAA" : "WAD", country);
|
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-TJN6AU7G.mjs";
|
|
11
11
|
import {
|
|
12
12
|
getCurrentLang,
|
|
13
13
|
setLanguage,
|
|
@@ -230,6 +230,7 @@ function generateReportHTML(result, sector = "public") {
|
|
|
230
230
|
<div class="meta">
|
|
231
231
|
<div>${t("report.scan_target", { url: result.url })}</div>
|
|
232
232
|
<div>${t("report.generated", { date: formatDate(result.timestamp) })}</div>
|
|
233
|
+
${sector ? `<div style="margin-top: 0.25rem; font-size: 0.75rem; font-weight: 600; color: ${sector === "private" ? "#7c3aed" : "#1d4ed8"};">${sector === "private" ? "Private sector (EAA)" : "Public sector (WAD)"}</div>` : ""}
|
|
233
234
|
${generateBadgeUrl(result.score) ? `<div style="margin-top: 0.5rem;"><img src="${generateBadgeUrl(result.score)}" alt="Accessibility Status: 100% Compliant" /></div>` : ""}
|
|
234
235
|
</div>
|
|
235
236
|
</div>
|
package/dist/index.js
CHANGED
|
@@ -677,7 +677,7 @@ var HtmlValidator = class {
|
|
|
677
677
|
// src/core/regulatory-scanner.ts
|
|
678
678
|
var import_node_fs = require("fs");
|
|
679
679
|
function getEngineVersion() {
|
|
680
|
-
return "2.5.
|
|
680
|
+
return "2.5.4";
|
|
681
681
|
}
|
|
682
682
|
function getStandardsVersion() {
|
|
683
683
|
try {
|
|
@@ -744,7 +744,7 @@ var RegulatoryScanner = class {
|
|
|
744
744
|
timeout: 1e4,
|
|
745
745
|
concurrency: 2
|
|
746
746
|
});
|
|
747
|
-
} catch
|
|
747
|
+
} catch {
|
|
748
748
|
this.log("Network busy, proceeding with scan anyway...");
|
|
749
749
|
}
|
|
750
750
|
pageTitle = await page.title();
|
|
@@ -1225,7 +1225,7 @@ async function generateStatementContent(result, lang = "en", format = "html", me
|
|
|
1225
1225
|
const logoBuffer = await import_promises.default.readFile(p);
|
|
1226
1226
|
logoUrl = `data:image/jpeg;base64,${logoBuffer.toString("base64")}`;
|
|
1227
1227
|
break;
|
|
1228
|
-
} catch
|
|
1228
|
+
} catch {
|
|
1229
1229
|
}
|
|
1230
1230
|
}
|
|
1231
1231
|
} catch (e) {
|
|
@@ -1245,8 +1245,10 @@ async function generateStatementContent(result, lang = "en", format = "html", me
|
|
|
1245
1245
|
url: "https://holmdigital.se"
|
|
1246
1246
|
},
|
|
1247
1247
|
logoUrl,
|
|
1248
|
-
|
|
1249
|
-
|
|
1248
|
+
// Placeholders make it obvious the consumer must supply real contact info.
|
|
1249
|
+
// Previous fallback leaked HolmDigital's own contact details into customer statements.
|
|
1250
|
+
contactEmail: metadata?.contactEmail || "[YOUR EMAIL]",
|
|
1251
|
+
phoneNumber: metadata?.phoneNumber || "[YOUR PHONE]",
|
|
1250
1252
|
responseTime: metadata?.responseTime || RESPONSE_TIME_DEFAULT[lang] || RESPONSE_TIME_DEFAULT["en"],
|
|
1251
1253
|
nonComplianceItems,
|
|
1252
1254
|
locale: lang,
|
|
@@ -1363,7 +1365,8 @@ async function generateStatementContent(result, lang = "en", format = "html", me
|
|
|
1363
1365
|
const s508 = usLaws.find((l) => l.id === "us-508");
|
|
1364
1366
|
return s508 ? `${adaLaw.fullName} (${adaLaw.law}) & ${s508.fullName} (${s508.law})` : `${adaLaw.fullName} (${adaLaw.law})`;
|
|
1365
1367
|
}
|
|
1366
|
-
|
|
1368
|
+
const hhs504 = usLaws.find((l) => l.euFramework === "REHAB" && l.scope === "private");
|
|
1369
|
+
return hhs504 ? `${adaLaw.fullName} (${adaLaw.law}) & ${hhs504.fullName} (${hhs504.law})` : `${adaLaw.fullName} (${adaLaw.law})`;
|
|
1367
1370
|
}
|
|
1368
1371
|
}
|
|
1369
1372
|
const law = (0, import_standards.getNationalLawByFramework)(sector === "private" ? "EAA" : "WAD", country);
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holmdigital/engine",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -19,11 +19,25 @@
|
|
|
19
19
|
},
|
|
20
20
|
"exports": {
|
|
21
21
|
".": {
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
"import": {
|
|
23
|
+
"types": "./dist/index.d.mts",
|
|
24
|
+
"default": "./dist/index.mjs"
|
|
25
|
+
},
|
|
26
|
+
"require": {
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"default": "./dist/index.js"
|
|
29
|
+
}
|
|
25
30
|
},
|
|
26
|
-
"./cli":
|
|
31
|
+
"./cli": {
|
|
32
|
+
"import": {
|
|
33
|
+
"types": "./dist/cli/index.d.mts",
|
|
34
|
+
"default": "./dist/cli/index.mjs"
|
|
35
|
+
},
|
|
36
|
+
"require": {
|
|
37
|
+
"types": "./dist/cli/index.d.ts",
|
|
38
|
+
"default": "./dist/cli/index.js"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
27
41
|
},
|
|
28
42
|
"files": [
|
|
29
43
|
"dist",
|
|
@@ -36,7 +50,11 @@
|
|
|
36
50
|
"test:ci": "vitest run",
|
|
37
51
|
"test:integration": "vitest run --config vitest.integration.config.ts",
|
|
38
52
|
"lint": "eslint src",
|
|
39
|
-
"
|
|
53
|
+
"typecheck": "tsc --noEmit",
|
|
54
|
+
"prepublishOnly": "npm run verify",
|
|
55
|
+
"check:exports": "publint --strict",
|
|
56
|
+
"check:types": "attw --pack . --ignore-rules no-resolution",
|
|
57
|
+
"verify": "npm run build && npm run lint && npm run typecheck && npm run check:exports && npm run check:types && npm run test:ci"
|
|
40
58
|
},
|
|
41
59
|
"keywords": [
|
|
42
60
|
"accessibility",
|
|
@@ -60,8 +78,8 @@
|
|
|
60
78
|
"author": "Holm Digital AB",
|
|
61
79
|
"license": "MIT",
|
|
62
80
|
"dependencies": {
|
|
63
|
-
"@holmdigital/components": "^2.
|
|
64
|
-
"@holmdigital/standards": "
|
|
81
|
+
"@holmdigital/components": "^2.7.0",
|
|
82
|
+
"@holmdigital/standards": "^2.5.3",
|
|
65
83
|
"axe-core": "^4.11.1",
|
|
66
84
|
"chalk": "^5.3.0",
|
|
67
85
|
"commander": "^12.1.0",
|
|
@@ -83,4 +101,4 @@
|
|
|
83
101
|
"typescript": "^5.7.2",
|
|
84
102
|
"vitest": "^4.0.16"
|
|
85
103
|
}
|
|
86
|
-
}
|
|
104
|
+
}
|