@holmdigital/engine 2.3.2 → 2.4.1

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 CHANGED
@@ -14,16 +14,16 @@ Most accessibility tools give you technical errors (e.g., "Color contrast must b
14
14
  It handles the heavy lifting of:
15
15
  1. **Mapping** technical failures to specific legal clauses.
16
16
  2. **Validating** HTML structure to ensure test accuracy.
17
- 3. **Reporting** in multiple languages (EN, SV, NO, FI, DA, NL, DE, FR, ES, IT, PT, PL) for non-technical stakeholders.
17
+ 3. **Reporting** in multiple languages (EN, SV, NO, FI, DA, NL, DE, FR, ES, IT, PT, PL, EN-AU) for non-technical stakeholders.
18
18
  4. **CI/CD Pipeline Integration** with automatic enforcement.
19
19
 
20
20
  For a comprehensive guide on CLI flags, CI/CD integration, and configuration files, see the **[Engine Library Catalog](../../docs/reference/engine.md)**.
21
21
 
22
22
  ## Features
23
23
 
24
- - **Regulatory Mapping**: Maps technical failures to EU laws (EN 301 549, EAA).
24
+ - **Regulatory Mapping**: Maps technical failures to EU laws (EN 301 549, EAA) and international laws (Australian DDA).
25
25
  - **HTML Structure Validation**: Built-in `html-validate` checks to prevent false positives/negatives.
26
- - **Internationalization (i18n)**: Comprehensive support for 12 languages: English (`en`), Swedish (`sv`), Norwegian (`no`), Finnish (`fi`), Danish (`da`), German (`de`), French (`fr`), Spanish (`es`), Dutch (`nl`), Italian (`it`), Portuguese (`pt`), and Polish (`pl`).
26
+ - **Internationalization (i18n)**: Comprehensive support for 13 languages: English (`en`), Swedish (`sv`), Norwegian (`no`), Finnish (`fi`), Danish (`da`), German (`de`), French (`fr`), Spanish (`es`), Dutch (`nl`), Italian (`it`), Portuguese (`pt`), Polish (`pl`), and Australian English (`en-au`).
27
27
  - **Template-Driven Accessibility Statements**: Generates modern, glassmorphism-styled statements using externalized JSON templates for each language, allowing for professional legal phrasing and deep customization.
28
28
  - **Multi-Company Metadata**: Easily customize statements via CLI flags or `.a11yrc` for scalable client generation.
29
29
  - **Enriched JUnit XML**: Professional CI/CD reports including scan duration, page title, engine metadata, and **detailed failing node** snippets (Target + HTML).
@@ -60,7 +60,7 @@ npx hd-a11y-scan <url> [options]
60
60
  | `--phone <number>` | Contact phone for the statement metadata |
61
61
  | `--response-time <val>` | Response time for the statement metadata |
62
62
  | `--publish-date <date>` | Publish date for the website (YYYY-MM-DD) |
63
- | `--country <code>` | Country code for enforcement body (`SE`, `NO`, `DE`, `IT`, `PT`, `PL`, etc.) |
63
+ | `--country <code>` | Country code for enforcement body (`SE`, `NO`, `DE`, `IT`, `PT`, `PL`, `AU`, etc.) |
64
64
  | `--sector <type>` | Sector type: `public` (WAD) or `private` (EAA). Default: `public` |
65
65
  | `--viewport <size>` | Set viewport size (`mobile`, `tablet`, `desktop`, or custom `1024x768`) |
66
66
  | `--generate-tests` | Generate Pseudo-Automation tests |
@@ -372,6 +372,7 @@ var locales = {
372
372
  "en-gb": en_default,
373
373
  "en-us": en_default,
374
374
  "en-ca": en_default,
375
+ "en-au": en_default,
375
376
  "da": dk_default,
376
377
  "nb": no_default
377
378
  // Norwegian Bokmål alias
@@ -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.3.2";
141
+ return "2.4.1";
142
142
  }
143
143
  function getStandardsVersion() {
144
144
  try {
@@ -289,7 +289,7 @@ var RegulatoryScanner = class {
289
289
  const risk = impactToRisk[impact] || "medium";
290
290
  return {
291
291
  ruleId: violation.id,
292
- wcagCriteria: violation.tags.find((t) => t.startsWith("wcag")) || "Unknown",
292
+ wcagCriteria: violation.tags.find((t) => t.startsWith("wcag")) || (violation.tags.includes("best-practice") ? "Best Practice" : "Unknown"),
293
293
  en301549Criteria: "",
294
294
  dosLagenReference: "",
295
295
  diggRisk: risk,
@@ -323,7 +323,7 @@ var RegulatoryScanner = class {
323
323
  async enrichResults(axeResults) {
324
324
  const reports = [];
325
325
  const { searchRulesByTags, generateRegulatoryReport, getConvergenceRule } = await import("@holmdigital/standards");
326
- const { getCurrentLang } = await import("./i18n-6XB3K2PH.mjs");
326
+ const { getCurrentLang } = await import("./i18n-ZLEGILHH.mjs");
327
327
  const lang = getCurrentLang();
328
328
  for (const violation of axeResults.violations) {
329
329
  let report = generateRegulatoryReport(violation.id, lang);
@@ -352,25 +352,38 @@ var RegulatoryScanner = class {
352
352
  }))
353
353
  });
354
354
  } else {
355
+ const isBestPractice = violation.tags.includes("best-practice");
356
+ const riskLevel = isBestPractice ? "low" : "medium";
357
+ const FALLBACK_STRINGS = {
358
+ sv: { bestPracticeRef: "Rekommendation (ej lagkrav)", manualRef: "Kr\xE4ver manuell bed\xF6mning", bestPracticeRationale: "Best practice \u2014 rekommenderas f\xF6r b\xE4ttre tillg\xE4nglighet men \xE4r inget specifikt WCAG-krav.", unmappedRationale: "Detta fel uppt\xE4cktes av scannern men saknar specifik mappning i HolmDigital-databasen." },
359
+ no: { bestPracticeRef: "Anbefaling (ikke lovkrav)", manualRef: "Krever manuell vurdering", bestPracticeRationale: "Best practice \u2014 anbefales for bedre tilgjengelighet, men er ikke et spesifikt WCAG-krav.", unmappedRationale: "Denne feilen ble oppdaget av skanneren, men mangler spesifikk kartlegging i HolmDigital-databasen." },
360
+ fi: { bestPracticeRef: "Suositus (ei lakis\xE4\xE4teinen)", manualRef: "Vaatii manuaalisen arvioinnin", bestPracticeRationale: "Best practice \u2014 suositellaan paremman saavutettavuuden vuoksi, mutta ei ole erityinen WCAG-vaatimus.", unmappedRationale: "T\xE4m\xE4 virhe havaittiin skannerilla, mutta sille ei ole tarkkaa kartoitusta HolmDigital-tietokannassa." },
361
+ de: { bestPracticeRef: "Empfehlung (keine gesetzliche Pflicht)", manualRef: "Erfordert manuelle Bewertung", bestPracticeRationale: "Best Practice \u2014 empfohlen f\xFCr bessere Barrierefreiheit, aber keine spezifische WCAG-Anforderung.", unmappedRationale: "Dieser Fehler wurde vom Scanner erkannt, hat aber keine spezifische Zuordnung in der HolmDigital-Datenbank." },
362
+ fr: { bestPracticeRef: "Recommandation (non obligatoire)", manualRef: "N\xE9cessite une \xE9valuation manuelle", bestPracticeRationale: "Bonne pratique \u2014 recommand\xE9e pour une meilleure accessibilit\xE9, mais pas une exigence WCAG sp\xE9cifique.", unmappedRationale: "Cette erreur a \xE9t\xE9 d\xE9tect\xE9e par le scanner mais n'a pas de correspondance sp\xE9cifique dans la base HolmDigital." },
363
+ es: { bestPracticeRef: "Recomendaci\xF3n (no obligatorio)", manualRef: "Requiere evaluaci\xF3n manual", bestPracticeRationale: "Buena pr\xE1ctica \u2014 recomendada para mejor accesibilidad, pero no es un requisito WCAG espec\xEDfico.", unmappedRationale: "Este error fue detectado por el esc\xE1ner pero no tiene una correspondencia espec\xEDfica en la base de datos de HolmDigital." },
364
+ nl: { bestPracticeRef: "Aanbeveling (geen wettelijke verplichting)", manualRef: "Vereist handmatige beoordeling", bestPracticeRationale: "Best practice \u2014 aanbevolen voor betere toegankelijkheid, maar geen specifieke WCAG-eis.", unmappedRationale: "Deze fout is gedetecteerd door de scanner maar heeft geen specifieke toewijzing in de HolmDigital-database." },
365
+ da: { bestPracticeRef: "Anbefaling (ikke lovkrav)", manualRef: "Kr\xE6ver manuel vurdering", bestPracticeRationale: "Best practice \u2014 anbefales for bedre tilg\xE6ngelighed, men er ikke et specifikt WCAG-krav.", unmappedRationale: "Denne fejl blev opdaget af scanneren, men mangler specifik kortl\xE6gning i HolmDigital-databasen." },
366
+ en: { bestPracticeRef: "Recommendation (not a legal requirement)", manualRef: "Requires manual assessment", bestPracticeRationale: "Best practice \u2014 recommended for better accessibility but not a specific WCAG requirement.", unmappedRationale: "This issue was detected by the scanner but has no specific mapping in the HolmDigital database." }
367
+ };
368
+ const fallback = FALLBACK_STRINGS[lang] || FALLBACK_STRINGS["en"];
355
369
  reports.push({
356
370
  ruleId: violation.id,
357
- wcagCriteria: "Unknown",
358
- en301549Criteria: "Unknown",
359
- dosLagenReference: "Kr\xE4ver manuell bed\xF6mning",
360
- diggRisk: "medium",
361
- // Default risk
362
- eaaImpact: "medium",
371
+ wcagCriteria: isBestPractice ? "Best Practice" : "Unknown",
372
+ en301549Criteria: isBestPractice ? "N/A" : "Unknown",
373
+ dosLagenReference: isBestPractice ? fallback.bestPracticeRef : fallback.manualRef,
374
+ diggRisk: riskLevel,
375
+ eaaImpact: riskLevel,
363
376
  remediation: {
364
377
  description: violation.help,
365
378
  technicalGuidance: violation.description,
366
379
  component: void 0
367
380
  },
368
381
  holmdigitalInsight: {
369
- diggRisk: "medium",
370
- eaaImpact: "medium",
382
+ diggRisk: riskLevel,
383
+ eaaImpact: riskLevel,
371
384
  reasoning: violation.help,
372
385
  swedishInterpretation: violation.help,
373
- priorityRationale: "Detta fel uppt\xE4cktes av scannern men saknar specifik mappning i HolmDigital-databasen."
386
+ priorityRationale: isBestPractice ? fallback.bestPracticeRationale : fallback.unmappedRationale
374
387
  },
375
388
  testability: {
376
389
  automated: true,
@@ -563,7 +576,8 @@ var EVALUATION_METHOD = {
563
576
  pl: "Automatyczne skanowanie za pomoc\u0105 @holmdigital/engine",
564
577
  "en-gb": "Automated scan via @holmdigital/engine",
565
578
  "en-us": "Automated scan via @holmdigital/engine",
566
- "en-ca": "Automated scan via @holmdigital/engine"
579
+ "en-ca": "Automated scan via @holmdigital/engine",
580
+ "en-au": "Automated scan via @holmdigital/engine"
567
581
  };
568
582
  var STATUS_LABELS = {
569
583
  sv: { full: "Fullt ut f\xF6renlig", partial: "Delvis f\xF6renlig", "non-compliant": "Inte f\xF6renlig" },
@@ -581,7 +595,8 @@ var STATUS_LABELS = {
581
595
  pl: { full: "W pe\u0142ni zgodny", partial: "Cz\u0119\u015Bciowo zgodny", "non-compliant": "Niezgodny" },
582
596
  "en-gb": { full: "Fully compliant", partial: "Partially compliant", "non-compliant": "Non-compliant" },
583
597
  "en-us": { full: "Fully compliant", partial: "Partially compliant", "non-compliant": "Non-compliant" },
584
- "en-ca": { full: "Fully compliant", partial: "Partially compliant", "non-compliant": "Non-compliant" }
598
+ "en-ca": { full: "Fully compliant", partial: "Partially compliant", "non-compliant": "Non-compliant" },
599
+ "en-au": { full: "Fully compliant", partial: "Partially compliant", "non-compliant": "Non-compliant" }
585
600
  };
586
601
  var RESPONSE_TIME_DEFAULT = {
587
602
  sv: "2 dagar",
@@ -599,7 +614,8 @@ var RESPONSE_TIME_DEFAULT = {
599
614
  pl: "2 dni",
600
615
  "en-gb": "2 days",
601
616
  "en-us": "2 days",
602
- "en-ca": "2 days"
617
+ "en-ca": "2 days",
618
+ "en-au": "2 days"
603
619
  };
604
620
  async function generateStatementContent(result, lang = "en", format = "html", metadata) {
605
621
  const templatePath = path.join(__dirname, "templates", `${lang}.json`);
@@ -644,7 +660,8 @@ async function generateStatementContent(result, lang = "en", format = "html", me
644
660
  "pl": "PL",
645
661
  "uk": "GB",
646
662
  "us": "US",
647
- "ca": "CA"
663
+ "ca": "CA",
664
+ "au": "AU"
648
665
  };
649
666
  try {
650
667
  const hostname = new URL(result.url).hostname;
@@ -788,9 +805,14 @@ async function generateStatementContent(result, lang = "en", format = "html", me
788
805
  "{<third party>}": props.generatorTool?.name || "HolmDigital Engine",
789
806
  "{<enforcement_body>}": getEnforcementBody(country, sector),
790
807
  "{<national_law>}": (() => {
808
+ if (country === "AU") {
809
+ const ddaLaw = getNationalLawByFramework("DDA", "AU");
810
+ return ddaLaw ? `${ddaLaw.fullName}` : "Disability Discrimination Act 1992 (Cth)";
811
+ }
791
812
  const law = getNationalLawByFramework(sector === "private" ? "EAA" : "WAD", country);
792
813
  return law ? `${law.fullName} (${law.law})` : "";
793
814
  })(),
815
+ "{<ahrc_url>}": "https://www.humanrights.gov.au/complaints",
794
816
  "{<brister>}": nonComplianceItems.length > 0 ? nonComplianceItems.map((item) => `* ${item}`).join("\n") : lang === "sv" ? "Inga k\xE4nda brister." : "No known issues.",
795
817
  "{<puutteet>}": nonComplianceItems.length > 0 ? nonComplianceItems.map((item) => `* ${item}`).join("\n") : lang === "fi" ? "Ei tiedossa olevia puutteita." : "No known issues.",
796
818
  "{<gebreken>}": nonComplianceItems.length > 0 ? nonComplianceItems.map((item) => `* ${item}`).join("\n") : lang === "nl" ? "Geen bekende gebreken." : "No known issues.",
package/dist/cli/index.js CHANGED
@@ -514,6 +514,7 @@ var init_i18n = __esm({
514
514
  "en-gb": en_default,
515
515
  "en-us": en_default,
516
516
  "en-ca": en_default,
517
+ "en-au": en_default,
517
518
  "da": dk_default,
518
519
  "nb": no_default
519
520
  // Norwegian Bokmål alias
@@ -782,7 +783,7 @@ var HtmlValidator = class {
782
783
  // src/core/regulatory-scanner.ts
783
784
  var import_node_fs = require("fs");
784
785
  function getEngineVersion() {
785
- return "2.3.2";
786
+ return "2.4.1";
786
787
  }
787
788
  function getStandardsVersion() {
788
789
  try {
@@ -933,7 +934,7 @@ var RegulatoryScanner = class {
933
934
  const risk = impactToRisk[impact] || "medium";
934
935
  return {
935
936
  ruleId: violation.id,
936
- wcagCriteria: violation.tags.find((t2) => t2.startsWith("wcag")) || "Unknown",
937
+ wcagCriteria: violation.tags.find((t2) => t2.startsWith("wcag")) || (violation.tags.includes("best-practice") ? "Best Practice" : "Unknown"),
937
938
  en301549Criteria: "",
938
939
  dosLagenReference: "",
939
940
  diggRisk: risk,
@@ -996,25 +997,38 @@ var RegulatoryScanner = class {
996
997
  }))
997
998
  });
998
999
  } else {
1000
+ const isBestPractice = violation.tags.includes("best-practice");
1001
+ const riskLevel = isBestPractice ? "low" : "medium";
1002
+ const FALLBACK_STRINGS = {
1003
+ sv: { bestPracticeRef: "Rekommendation (ej lagkrav)", manualRef: "Kr\xE4ver manuell bed\xF6mning", bestPracticeRationale: "Best practice \u2014 rekommenderas f\xF6r b\xE4ttre tillg\xE4nglighet men \xE4r inget specifikt WCAG-krav.", unmappedRationale: "Detta fel uppt\xE4cktes av scannern men saknar specifik mappning i HolmDigital-databasen." },
1004
+ no: { bestPracticeRef: "Anbefaling (ikke lovkrav)", manualRef: "Krever manuell vurdering", bestPracticeRationale: "Best practice \u2014 anbefales for bedre tilgjengelighet, men er ikke et spesifikt WCAG-krav.", unmappedRationale: "Denne feilen ble oppdaget av skanneren, men mangler spesifikk kartlegging i HolmDigital-databasen." },
1005
+ fi: { bestPracticeRef: "Suositus (ei lakis\xE4\xE4teinen)", manualRef: "Vaatii manuaalisen arvioinnin", bestPracticeRationale: "Best practice \u2014 suositellaan paremman saavutettavuuden vuoksi, mutta ei ole erityinen WCAG-vaatimus.", unmappedRationale: "T\xE4m\xE4 virhe havaittiin skannerilla, mutta sille ei ole tarkkaa kartoitusta HolmDigital-tietokannassa." },
1006
+ de: { bestPracticeRef: "Empfehlung (keine gesetzliche Pflicht)", manualRef: "Erfordert manuelle Bewertung", bestPracticeRationale: "Best Practice \u2014 empfohlen f\xFCr bessere Barrierefreiheit, aber keine spezifische WCAG-Anforderung.", unmappedRationale: "Dieser Fehler wurde vom Scanner erkannt, hat aber keine spezifische Zuordnung in der HolmDigital-Datenbank." },
1007
+ fr: { bestPracticeRef: "Recommandation (non obligatoire)", manualRef: "N\xE9cessite une \xE9valuation manuelle", bestPracticeRationale: "Bonne pratique \u2014 recommand\xE9e pour une meilleure accessibilit\xE9, mais pas une exigence WCAG sp\xE9cifique.", unmappedRationale: "Cette erreur a \xE9t\xE9 d\xE9tect\xE9e par le scanner mais n'a pas de correspondance sp\xE9cifique dans la base HolmDigital." },
1008
+ es: { bestPracticeRef: "Recomendaci\xF3n (no obligatorio)", manualRef: "Requiere evaluaci\xF3n manual", bestPracticeRationale: "Buena pr\xE1ctica \u2014 recomendada para mejor accesibilidad, pero no es un requisito WCAG espec\xEDfico.", unmappedRationale: "Este error fue detectado por el esc\xE1ner pero no tiene una correspondencia espec\xEDfica en la base de datos de HolmDigital." },
1009
+ nl: { bestPracticeRef: "Aanbeveling (geen wettelijke verplichting)", manualRef: "Vereist handmatige beoordeling", bestPracticeRationale: "Best practice \u2014 aanbevolen voor betere toegankelijkheid, maar geen specifieke WCAG-eis.", unmappedRationale: "Deze fout is gedetecteerd door de scanner maar heeft geen specifieke toewijzing in de HolmDigital-database." },
1010
+ da: { bestPracticeRef: "Anbefaling (ikke lovkrav)", manualRef: "Kr\xE6ver manuel vurdering", bestPracticeRationale: "Best practice \u2014 anbefales for bedre tilg\xE6ngelighed, men er ikke et specifikt WCAG-krav.", unmappedRationale: "Denne fejl blev opdaget af scanneren, men mangler specifik kortl\xE6gning i HolmDigital-databasen." },
1011
+ en: { bestPracticeRef: "Recommendation (not a legal requirement)", manualRef: "Requires manual assessment", bestPracticeRationale: "Best practice \u2014 recommended for better accessibility but not a specific WCAG requirement.", unmappedRationale: "This issue was detected by the scanner but has no specific mapping in the HolmDigital database." }
1012
+ };
1013
+ const fallback = FALLBACK_STRINGS[lang] || FALLBACK_STRINGS["en"];
999
1014
  reports.push({
1000
1015
  ruleId: violation.id,
1001
- wcagCriteria: "Unknown",
1002
- en301549Criteria: "Unknown",
1003
- dosLagenReference: "Kr\xE4ver manuell bed\xF6mning",
1004
- diggRisk: "medium",
1005
- // Default risk
1006
- eaaImpact: "medium",
1016
+ wcagCriteria: isBestPractice ? "Best Practice" : "Unknown",
1017
+ en301549Criteria: isBestPractice ? "N/A" : "Unknown",
1018
+ dosLagenReference: isBestPractice ? fallback.bestPracticeRef : fallback.manualRef,
1019
+ diggRisk: riskLevel,
1020
+ eaaImpact: riskLevel,
1007
1021
  remediation: {
1008
1022
  description: violation.help,
1009
1023
  technicalGuidance: violation.description,
1010
1024
  component: void 0
1011
1025
  },
1012
1026
  holmdigitalInsight: {
1013
- diggRisk: "medium",
1014
- eaaImpact: "medium",
1027
+ diggRisk: riskLevel,
1028
+ eaaImpact: riskLevel,
1015
1029
  reasoning: violation.help,
1016
1030
  swedishInterpretation: violation.help,
1017
- priorityRationale: "Detta fel uppt\xE4cktes av scannern men saknar specifik mappning i HolmDigital-databasen."
1031
+ priorityRationale: isBestPractice ? fallback.bestPracticeRationale : fallback.unmappedRationale
1018
1032
  },
1019
1033
  testability: {
1020
1034
  automated: true,
@@ -1547,7 +1561,8 @@ var EVALUATION_METHOD = {
1547
1561
  pl: "Automatyczne skanowanie za pomoc\u0105 @holmdigital/engine",
1548
1562
  "en-gb": "Automated scan via @holmdigital/engine",
1549
1563
  "en-us": "Automated scan via @holmdigital/engine",
1550
- "en-ca": "Automated scan via @holmdigital/engine"
1564
+ "en-ca": "Automated scan via @holmdigital/engine",
1565
+ "en-au": "Automated scan via @holmdigital/engine"
1551
1566
  };
1552
1567
  var STATUS_LABELS = {
1553
1568
  sv: { full: "Fullt ut f\xF6renlig", partial: "Delvis f\xF6renlig", "non-compliant": "Inte f\xF6renlig" },
@@ -1565,7 +1580,8 @@ var STATUS_LABELS = {
1565
1580
  pl: { full: "W pe\u0142ni zgodny", partial: "Cz\u0119\u015Bciowo zgodny", "non-compliant": "Niezgodny" },
1566
1581
  "en-gb": { full: "Fully compliant", partial: "Partially compliant", "non-compliant": "Non-compliant" },
1567
1582
  "en-us": { full: "Fully compliant", partial: "Partially compliant", "non-compliant": "Non-compliant" },
1568
- "en-ca": { full: "Fully compliant", partial: "Partially compliant", "non-compliant": "Non-compliant" }
1583
+ "en-ca": { full: "Fully compliant", partial: "Partially compliant", "non-compliant": "Non-compliant" },
1584
+ "en-au": { full: "Fully compliant", partial: "Partially compliant", "non-compliant": "Non-compliant" }
1569
1585
  };
1570
1586
  var RESPONSE_TIME_DEFAULT = {
1571
1587
  sv: "2 dagar",
@@ -1583,7 +1599,8 @@ var RESPONSE_TIME_DEFAULT = {
1583
1599
  pl: "2 dni",
1584
1600
  "en-gb": "2 days",
1585
1601
  "en-us": "2 days",
1586
- "en-ca": "2 days"
1602
+ "en-ca": "2 days",
1603
+ "en-au": "2 days"
1587
1604
  };
1588
1605
  async function generateStatementContent(result, lang = "en", format = "html", metadata) {
1589
1606
  const templatePath = import_path.default.join(__dirname, "templates", `${lang}.json`);
@@ -1628,7 +1645,8 @@ async function generateStatementContent(result, lang = "en", format = "html", me
1628
1645
  "pl": "PL",
1629
1646
  "uk": "GB",
1630
1647
  "us": "US",
1631
- "ca": "CA"
1648
+ "ca": "CA",
1649
+ "au": "AU"
1632
1650
  };
1633
1651
  try {
1634
1652
  const hostname = new URL(result.url).hostname;
@@ -1772,9 +1790,14 @@ async function generateStatementContent(result, lang = "en", format = "html", me
1772
1790
  "{<third party>}": props.generatorTool?.name || "HolmDigital Engine",
1773
1791
  "{<enforcement_body>}": (0, import_standards.getEnforcementBody)(country, sector),
1774
1792
  "{<national_law>}": (() => {
1793
+ if (country === "AU") {
1794
+ const ddaLaw = (0, import_standards.getNationalLawByFramework)("DDA", "AU");
1795
+ return ddaLaw ? `${ddaLaw.fullName}` : "Disability Discrimination Act 1992 (Cth)";
1796
+ }
1775
1797
  const law = (0, import_standards.getNationalLawByFramework)(sector === "private" ? "EAA" : "WAD", country);
1776
1798
  return law ? `${law.fullName} (${law.law})` : "";
1777
1799
  })(),
1800
+ "{<ahrc_url>}": "https://www.humanrights.gov.au/complaints",
1778
1801
  "{<brister>}": nonComplianceItems.length > 0 ? nonComplianceItems.map((item) => `* ${item}`).join("\n") : lang === "sv" ? "Inga k\xE4nda brister." : "No known issues.",
1779
1802
  "{<puutteet>}": nonComplianceItems.length > 0 ? nonComplianceItems.map((item) => `* ${item}`).join("\n") : lang === "fi" ? "Ei tiedossa olevia puutteita." : "No known issues.",
1780
1803
  "{<gebreken>}": nonComplianceItems.length > 0 ? nonComplianceItems.map((item) => `* ${item}`).join("\n") : lang === "nl" ? "Geen bekende gebreken." : "No known issues.",
@@ -7,12 +7,12 @@ import {
7
7
  generateStatement,
8
8
  generateStatementContent,
9
9
  getEngineVersion
10
- } from "../chunk-W7FF74PN.mjs";
10
+ } from "../chunk-FDDZKXUT.mjs";
11
11
  import {
12
12
  getCurrentLang,
13
13
  setLanguage,
14
14
  t
15
- } from "../chunk-MGIEQZMZ.mjs";
15
+ } from "../chunk-FBGKWDZT.mjs";
16
16
  import "../chunk-DIBTSSLZ.mjs";
17
17
 
18
18
  // src/cli/index.ts
@@ -0,0 +1,41 @@
1
+ {
2
+ "title": "Accessibility of {<website>}",
3
+ "intro": "This statement describes how {<organisation>} addresses accessibility under the {<national_law>}. {<organisation>} is committed to ensuring its website is accessible to people with disability in accordance with WCAG 2.2 Level AA, as recommended by the {<enforcement_body>}.",
4
+ "sections": [
5
+ {
6
+ "id": "how-accessible",
7
+ "title": "How accessible is this website?",
8
+ "content": "{There are no known accessibility issues with this website./We know some parts of this website are not fully accessible. See the section on known accessibility barriers below for more information./This website has significant accessibility barriers. See the section on known accessibility barriers below for more information.}"
9
+ },
10
+ {
11
+ "id": "what-to-do",
12
+ "title": "What to do if you experience accessibility issues",
13
+ "content": "If you experience difficulty accessing any part of this website, please contact us.\n\n[Our normal response time is {<response time>}.]\n\n[You can also contact us:\n\n* by email: {<email address>}\n* by phone: {<telephone number>}]"
14
+ },
15
+ {
16
+ "id": "reporting",
17
+ "title": "Reporting accessibility problems",
18
+ "content": "We are always working to improve the accessibility of this website. If you find a problem that is not listed on this page, or if you believe we are not meeting the requirements described here, please contact us.\n\nIf you are not satisfied with our response, you may lodge a complaint with the {<enforcement_body>} under the {<national_law>}. The AHRC complaint form is available at {<ahrc_url>}."
19
+ },
20
+ {
21
+ "id": "non-accessible",
22
+ "title": "Known accessibility barriers",
23
+ "content": "[\n{<issues>}\n]"
24
+ },
25
+ {
26
+ "id": "wcag-conformance",
27
+ "title": "Technical information about accessibility",
28
+ "content": "{This website is fully compliant with WCAG 2.2 Level AA./This website is partially compliant with WCAG 2.2 Level AA, due to the barriers listed above./This website is not compliant with WCAG 2.2 Level AA. The known barriers are listed above.}\n\nWCAG 2.2 Level AA is the standard recommended by the {<enforcement_body>} under the {<national_law>}."
29
+ },
30
+ {
31
+ "id": "dta-policy",
32
+ "title": "Australian Government digital policy",
33
+ "content": "Federal government agencies are subject to the Digital Transformation Agency (DTA) Digital Experience Policy, which has included the Digital Inclusion Standard since 1 January 2025 for new services and 1 July 2025 for existing services. The Digital Inclusion Standard requires Commonwealth agencies to meet WCAG 2.2 Level AA.\n\nThis statement was prepared in accordance with best practice guidance from the DTA and the Australian Human Rights Commission (AHRC)."
34
+ },
35
+ {
36
+ "id": "testing",
37
+ "title": "How we tested this website",
38
+ "content": "{We have performed a self-assessment (internal testing) of {<website>}./{<third party>} has tested {<website>}./We have estimated the accessibility without testing.}\n\nThe last assessment was made on {<assessment date>}.\n\n[Assessment method: {<method>}]\n\nThe statement was last updated on {<update date>}."
39
+ }
40
+ ]
41
+ }
@@ -2,7 +2,7 @@ import {
2
2
  getCurrentLang,
3
3
  setLanguage,
4
4
  t
5
- } from "./chunk-MGIEQZMZ.mjs";
5
+ } from "./chunk-FBGKWDZT.mjs";
6
6
  import "./chunk-DIBTSSLZ.mjs";
7
7
  export {
8
8
  getCurrentLang,
package/dist/index.js CHANGED
@@ -514,6 +514,7 @@ var init_i18n = __esm({
514
514
  "en-gb": en_default,
515
515
  "en-us": en_default,
516
516
  "en-ca": en_default,
517
+ "en-au": en_default,
517
518
  "da": dk_default,
518
519
  "nb": no_default
519
520
  // Norwegian Bokmål alias
@@ -676,7 +677,7 @@ var HtmlValidator = class {
676
677
  // src/core/regulatory-scanner.ts
677
678
  var import_node_fs = require("fs");
678
679
  function getEngineVersion() {
679
- return "2.3.2";
680
+ return "2.4.1";
680
681
  }
681
682
  function getStandardsVersion() {
682
683
  try {
@@ -827,7 +828,7 @@ var RegulatoryScanner = class {
827
828
  const risk = impactToRisk[impact] || "medium";
828
829
  return {
829
830
  ruleId: violation.id,
830
- wcagCriteria: violation.tags.find((t2) => t2.startsWith("wcag")) || "Unknown",
831
+ wcagCriteria: violation.tags.find((t2) => t2.startsWith("wcag")) || (violation.tags.includes("best-practice") ? "Best Practice" : "Unknown"),
831
832
  en301549Criteria: "",
832
833
  dosLagenReference: "",
833
834
  diggRisk: risk,
@@ -890,25 +891,38 @@ var RegulatoryScanner = class {
890
891
  }))
891
892
  });
892
893
  } else {
894
+ const isBestPractice = violation.tags.includes("best-practice");
895
+ const riskLevel = isBestPractice ? "low" : "medium";
896
+ const FALLBACK_STRINGS = {
897
+ sv: { bestPracticeRef: "Rekommendation (ej lagkrav)", manualRef: "Kr\xE4ver manuell bed\xF6mning", bestPracticeRationale: "Best practice \u2014 rekommenderas f\xF6r b\xE4ttre tillg\xE4nglighet men \xE4r inget specifikt WCAG-krav.", unmappedRationale: "Detta fel uppt\xE4cktes av scannern men saknar specifik mappning i HolmDigital-databasen." },
898
+ no: { bestPracticeRef: "Anbefaling (ikke lovkrav)", manualRef: "Krever manuell vurdering", bestPracticeRationale: "Best practice \u2014 anbefales for bedre tilgjengelighet, men er ikke et spesifikt WCAG-krav.", unmappedRationale: "Denne feilen ble oppdaget av skanneren, men mangler spesifikk kartlegging i HolmDigital-databasen." },
899
+ fi: { bestPracticeRef: "Suositus (ei lakis\xE4\xE4teinen)", manualRef: "Vaatii manuaalisen arvioinnin", bestPracticeRationale: "Best practice \u2014 suositellaan paremman saavutettavuuden vuoksi, mutta ei ole erityinen WCAG-vaatimus.", unmappedRationale: "T\xE4m\xE4 virhe havaittiin skannerilla, mutta sille ei ole tarkkaa kartoitusta HolmDigital-tietokannassa." },
900
+ de: { bestPracticeRef: "Empfehlung (keine gesetzliche Pflicht)", manualRef: "Erfordert manuelle Bewertung", bestPracticeRationale: "Best Practice \u2014 empfohlen f\xFCr bessere Barrierefreiheit, aber keine spezifische WCAG-Anforderung.", unmappedRationale: "Dieser Fehler wurde vom Scanner erkannt, hat aber keine spezifische Zuordnung in der HolmDigital-Datenbank." },
901
+ fr: { bestPracticeRef: "Recommandation (non obligatoire)", manualRef: "N\xE9cessite une \xE9valuation manuelle", bestPracticeRationale: "Bonne pratique \u2014 recommand\xE9e pour une meilleure accessibilit\xE9, mais pas une exigence WCAG sp\xE9cifique.", unmappedRationale: "Cette erreur a \xE9t\xE9 d\xE9tect\xE9e par le scanner mais n'a pas de correspondance sp\xE9cifique dans la base HolmDigital." },
902
+ es: { bestPracticeRef: "Recomendaci\xF3n (no obligatorio)", manualRef: "Requiere evaluaci\xF3n manual", bestPracticeRationale: "Buena pr\xE1ctica \u2014 recomendada para mejor accesibilidad, pero no es un requisito WCAG espec\xEDfico.", unmappedRationale: "Este error fue detectado por el esc\xE1ner pero no tiene una correspondencia espec\xEDfica en la base de datos de HolmDigital." },
903
+ nl: { bestPracticeRef: "Aanbeveling (geen wettelijke verplichting)", manualRef: "Vereist handmatige beoordeling", bestPracticeRationale: "Best practice \u2014 aanbevolen voor betere toegankelijkheid, maar geen specifieke WCAG-eis.", unmappedRationale: "Deze fout is gedetecteerd door de scanner maar heeft geen specifieke toewijzing in de HolmDigital-database." },
904
+ da: { bestPracticeRef: "Anbefaling (ikke lovkrav)", manualRef: "Kr\xE6ver manuel vurdering", bestPracticeRationale: "Best practice \u2014 anbefales for bedre tilg\xE6ngelighed, men er ikke et specifikt WCAG-krav.", unmappedRationale: "Denne fejl blev opdaget af scanneren, men mangler specifik kortl\xE6gning i HolmDigital-databasen." },
905
+ en: { bestPracticeRef: "Recommendation (not a legal requirement)", manualRef: "Requires manual assessment", bestPracticeRationale: "Best practice \u2014 recommended for better accessibility but not a specific WCAG requirement.", unmappedRationale: "This issue was detected by the scanner but has no specific mapping in the HolmDigital database." }
906
+ };
907
+ const fallback = FALLBACK_STRINGS[lang] || FALLBACK_STRINGS["en"];
893
908
  reports.push({
894
909
  ruleId: violation.id,
895
- wcagCriteria: "Unknown",
896
- en301549Criteria: "Unknown",
897
- dosLagenReference: "Kr\xE4ver manuell bed\xF6mning",
898
- diggRisk: "medium",
899
- // Default risk
900
- eaaImpact: "medium",
910
+ wcagCriteria: isBestPractice ? "Best Practice" : "Unknown",
911
+ en301549Criteria: isBestPractice ? "N/A" : "Unknown",
912
+ dosLagenReference: isBestPractice ? fallback.bestPracticeRef : fallback.manualRef,
913
+ diggRisk: riskLevel,
914
+ eaaImpact: riskLevel,
901
915
  remediation: {
902
916
  description: violation.help,
903
917
  technicalGuidance: violation.description,
904
918
  component: void 0
905
919
  },
906
920
  holmdigitalInsight: {
907
- diggRisk: "medium",
908
- eaaImpact: "medium",
921
+ diggRisk: riskLevel,
922
+ eaaImpact: riskLevel,
909
923
  reasoning: violation.help,
910
924
  swedishInterpretation: violation.help,
911
- priorityRationale: "Detta fel uppt\xE4cktes av scannern men saknar specifik mappning i HolmDigital-databasen."
925
+ priorityRationale: isBestPractice ? fallback.bestPracticeRationale : fallback.unmappedRationale
912
926
  },
913
927
  testability: {
914
928
  automated: true,
@@ -1102,7 +1116,8 @@ var EVALUATION_METHOD = {
1102
1116
  pl: "Automatyczne skanowanie za pomoc\u0105 @holmdigital/engine",
1103
1117
  "en-gb": "Automated scan via @holmdigital/engine",
1104
1118
  "en-us": "Automated scan via @holmdigital/engine",
1105
- "en-ca": "Automated scan via @holmdigital/engine"
1119
+ "en-ca": "Automated scan via @holmdigital/engine",
1120
+ "en-au": "Automated scan via @holmdigital/engine"
1106
1121
  };
1107
1122
  var STATUS_LABELS = {
1108
1123
  sv: { full: "Fullt ut f\xF6renlig", partial: "Delvis f\xF6renlig", "non-compliant": "Inte f\xF6renlig" },
@@ -1120,7 +1135,8 @@ var STATUS_LABELS = {
1120
1135
  pl: { full: "W pe\u0142ni zgodny", partial: "Cz\u0119\u015Bciowo zgodny", "non-compliant": "Niezgodny" },
1121
1136
  "en-gb": { full: "Fully compliant", partial: "Partially compliant", "non-compliant": "Non-compliant" },
1122
1137
  "en-us": { full: "Fully compliant", partial: "Partially compliant", "non-compliant": "Non-compliant" },
1123
- "en-ca": { full: "Fully compliant", partial: "Partially compliant", "non-compliant": "Non-compliant" }
1138
+ "en-ca": { full: "Fully compliant", partial: "Partially compliant", "non-compliant": "Non-compliant" },
1139
+ "en-au": { full: "Fully compliant", partial: "Partially compliant", "non-compliant": "Non-compliant" }
1124
1140
  };
1125
1141
  var RESPONSE_TIME_DEFAULT = {
1126
1142
  sv: "2 dagar",
@@ -1138,7 +1154,8 @@ var RESPONSE_TIME_DEFAULT = {
1138
1154
  pl: "2 dni",
1139
1155
  "en-gb": "2 days",
1140
1156
  "en-us": "2 days",
1141
- "en-ca": "2 days"
1157
+ "en-ca": "2 days",
1158
+ "en-au": "2 days"
1142
1159
  };
1143
1160
  async function generateStatementContent(result, lang = "en", format = "html", metadata) {
1144
1161
  const templatePath = import_path.default.join(__dirname, "templates", `${lang}.json`);
@@ -1183,7 +1200,8 @@ async function generateStatementContent(result, lang = "en", format = "html", me
1183
1200
  "pl": "PL",
1184
1201
  "uk": "GB",
1185
1202
  "us": "US",
1186
- "ca": "CA"
1203
+ "ca": "CA",
1204
+ "au": "AU"
1187
1205
  };
1188
1206
  try {
1189
1207
  const hostname = new URL(result.url).hostname;
@@ -1327,9 +1345,14 @@ async function generateStatementContent(result, lang = "en", format = "html", me
1327
1345
  "{<third party>}": props.generatorTool?.name || "HolmDigital Engine",
1328
1346
  "{<enforcement_body>}": (0, import_standards.getEnforcementBody)(country, sector),
1329
1347
  "{<national_law>}": (() => {
1348
+ if (country === "AU") {
1349
+ const ddaLaw = (0, import_standards.getNationalLawByFramework)("DDA", "AU");
1350
+ return ddaLaw ? `${ddaLaw.fullName}` : "Disability Discrimination Act 1992 (Cth)";
1351
+ }
1330
1352
  const law = (0, import_standards.getNationalLawByFramework)(sector === "private" ? "EAA" : "WAD", country);
1331
1353
  return law ? `${law.fullName} (${law.law})` : "";
1332
1354
  })(),
1355
+ "{<ahrc_url>}": "https://www.humanrights.gov.au/complaints",
1333
1356
  "{<brister>}": nonComplianceItems.length > 0 ? nonComplianceItems.map((item) => `* ${item}`).join("\n") : lang === "sv" ? "Inga k\xE4nda brister." : "No known issues.",
1334
1357
  "{<puutteet>}": nonComplianceItems.length > 0 ? nonComplianceItems.map((item) => `* ${item}`).join("\n") : lang === "fi" ? "Ei tiedossa olevia puutteita." : "No known issues.",
1335
1358
  "{<gebreken>}": nonComplianceItems.length > 0 ? nonComplianceItems.map((item) => `* ${item}`).join("\n") : lang === "nl" ? "Geen bekende gebreken." : "No known issues.",
package/dist/index.mjs CHANGED
@@ -5,12 +5,12 @@ import {
5
5
  generateStatement,
6
6
  generateStatementContent,
7
7
  getEngineVersion
8
- } from "./chunk-W7FF74PN.mjs";
8
+ } from "./chunk-FDDZKXUT.mjs";
9
9
  import {
10
10
  getCurrentLang,
11
11
  setLanguage,
12
12
  t
13
- } from "./chunk-MGIEQZMZ.mjs";
13
+ } from "./chunk-FBGKWDZT.mjs";
14
14
  import "./chunk-DIBTSSLZ.mjs";
15
15
  export {
16
16
  PseudoAutomationEngine,
@@ -0,0 +1,41 @@
1
+ {
2
+ "title": "Accessibility of {<website>}",
3
+ "intro": "This statement describes how {<organisation>} addresses accessibility under the {<national_law>}. {<organisation>} is committed to ensuring its website is accessible to people with disability in accordance with WCAG 2.2 Level AA, as recommended by the {<enforcement_body>}.",
4
+ "sections": [
5
+ {
6
+ "id": "how-accessible",
7
+ "title": "How accessible is this website?",
8
+ "content": "{There are no known accessibility issues with this website./We know some parts of this website are not fully accessible. See the section on known accessibility barriers below for more information./This website has significant accessibility barriers. See the section on known accessibility barriers below for more information.}"
9
+ },
10
+ {
11
+ "id": "what-to-do",
12
+ "title": "What to do if you experience accessibility issues",
13
+ "content": "If you experience difficulty accessing any part of this website, please contact us.\n\n[Our normal response time is {<response time>}.]\n\n[You can also contact us:\n\n* by email: {<email address>}\n* by phone: {<telephone number>}]"
14
+ },
15
+ {
16
+ "id": "reporting",
17
+ "title": "Reporting accessibility problems",
18
+ "content": "We are always working to improve the accessibility of this website. If you find a problem that is not listed on this page, or if you believe we are not meeting the requirements described here, please contact us.\n\nIf you are not satisfied with our response, you may lodge a complaint with the {<enforcement_body>} under the {<national_law>}. The AHRC complaint form is available at {<ahrc_url>}."
19
+ },
20
+ {
21
+ "id": "non-accessible",
22
+ "title": "Known accessibility barriers",
23
+ "content": "[\n{<issues>}\n]"
24
+ },
25
+ {
26
+ "id": "wcag-conformance",
27
+ "title": "Technical information about accessibility",
28
+ "content": "{This website is fully compliant with WCAG 2.2 Level AA./This website is partially compliant with WCAG 2.2 Level AA, due to the barriers listed above./This website is not compliant with WCAG 2.2 Level AA. The known barriers are listed above.}\n\nWCAG 2.2 Level AA is the standard recommended by the {<enforcement_body>} under the {<national_law>}."
29
+ },
30
+ {
31
+ "id": "dta-policy",
32
+ "title": "Australian Government digital policy",
33
+ "content": "Federal government agencies are subject to the Digital Transformation Agency (DTA) Digital Experience Policy, which has included the Digital Inclusion Standard since 1 January 2025 for new services and 1 July 2025 for existing services. The Digital Inclusion Standard requires Commonwealth agencies to meet WCAG 2.2 Level AA.\n\nThis statement was prepared in accordance with best practice guidance from the DTA and the Australian Human Rights Commission (AHRC)."
34
+ },
35
+ {
36
+ "id": "testing",
37
+ "title": "How we tested this website",
38
+ "content": "{We have performed a self-assessment (internal testing) of {<website>}./{<third party>} has tested {<website>}./We have estimated the accessibility without testing.}\n\nThe last assessment was made on {<assessment date>}.\n\n[Assessment method: {<method>}]\n\nThe statement was last updated on {<update date>}."
39
+ }
40
+ ]
41
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@holmdigital/engine",
3
- "version": "2.3.2",
3
+ "version": "2.4.1",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -60,7 +60,7 @@
60
60
  "author": "Holm Digital AB",
61
61
  "license": "MIT",
62
62
  "dependencies": {
63
- "@holmdigital/components": "^2.2.0",
63
+ "@holmdigital/components": "^2.3.0",
64
64
  "@holmdigital/standards": "*",
65
65
  "axe-core": "^4.11.1",
66
66
  "chalk": "^5.3.0",