@holmdigital/engine 3.0.2 → 3.1.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.
@@ -8,7 +8,7 @@ import {
8
8
  generateStatementContent,
9
9
  getEngineVersion,
10
10
  isBadgeWithheldByRobustness
11
- } from "../chunk-VF73LLSO.mjs";
11
+ } from "../chunk-356E3K2G.mjs";
12
12
  import {
13
13
  groupReportsByRule,
14
14
  impactBreakdown,
@@ -19,7 +19,11 @@ import {
19
19
  getCurrentLang,
20
20
  setLanguage,
21
21
  t
22
- } from "../chunk-QUCGL754.mjs";
22
+ } from "../chunk-RNCZ2GNY.mjs";
23
+ import {
24
+ needsReviewOf,
25
+ violationsOf
26
+ } from "../chunk-QEHLOWUK.mjs";
23
27
  import {
24
28
  __dirname
25
29
  } from "../chunk-DIBTSSLZ.mjs";
@@ -108,6 +112,24 @@ function generateReportHTML(result, sector = "public", audience = "developer", p
108
112
  const highCount = result.stats.high;
109
113
  const htmlErrorsCount = result.htmlValidation?.errors?.length ?? 0;
110
114
  const scoreColor = result.score > 90 ? "#16a34a" : result.score > 70 ? "#eab308" : "#dc2626";
115
+ const needsReviewReports = needsReviewOf(result.reports);
116
+ const needsReviewSection = needsReviewReports.length === 0 ? "" : `
117
+ <div class="section-title">${t("report.needs_review_title", { count: needsReviewReports.length })}</div>
118
+ <p style="font-size: 0.9rem; color: #64748b; margin-bottom: 0.75rem;">${t("report.needs_review_note")}</p>
119
+ ${needsReviewReports.map((report) => `
120
+ <div class="violation-card">
121
+ <div class="violation-header">
122
+ <div class="violation-title">${report.ruleId}</div>
123
+ <div><span class="badge">needs review</span></div>
124
+ </div>
125
+ <div class="violation-meta">
126
+ WCAG ${report.wcagCriteria} \u2022 EN 301 549 ${report.en301549Criteria}
127
+ </div>
128
+ <div style="font-size: 0.95rem; color: #334155; line-height: 1.5;">
129
+ ${report.holmdigitalInsight.reasoning}
130
+ </div>
131
+ </div>
132
+ `).join("")}`;
111
133
  return `
112
134
  <!DOCTYPE html>
113
135
  <html lang="${getCurrentLang()}">
@@ -339,7 +361,7 @@ function generateReportHTML(result, sector = "public", audience = "developer", p
339
361
 
340
362
  <div class="section-title">${t("report.detailed_violations")}</div>
341
363
 
342
- ${[...result.reports].sort((a, b) => {
364
+ ${violationsOf(result.reports).sort((a, b) => {
343
365
  const severityOrder = { critical: 0, high: 1, medium: 2, low: 3 };
344
366
  const aRisk = a.holmdigitalInsight.diggRisk.toLowerCase();
345
367
  const bRisk = b.holmdigitalInsight.diggRisk.toLowerCase();
@@ -373,7 +395,7 @@ function generateReportHTML(result, sector = "public", audience = "developer", p
373
395
  ` : ""}
374
396
  </div>
375
397
  `;
376
- }).join("")}
398
+ }).join("")}${needsReviewSection}
377
399
  ${renderNoScriptSection(result)}
378
400
  <footer>
379
401
  ${t("report.footer", { version: getEngineVersion() })}
@@ -437,14 +459,16 @@ function generatePlainReportHTML(result, plainFallbackFrom) {
437
459
  const logoDataUri = getLogoDataUri();
438
460
  const fallbackName = plainFallbackFrom ? languageDisplayName(plainFallbackFrom) : "";
439
461
  const noticeHtml = fallbackName ? `<p class="plain-fallback-notice">${escapeHtml(t("plain.gate_fallback", { lang: fallbackName }))}</p>` : "";
440
- const sortedGroups = groupReportsByRule(result.reports).sort((a, b) => {
462
+ const violations = violationsOf(result.reports);
463
+ const needsReview = needsReviewOf(result.reports);
464
+ const sortedGroups = groupReportsByRule(violations).sort((a, b) => {
441
465
  const aLevel = PLAIN_IMPACT_ORDER[plainLevelOf(a.report)] ?? 4;
442
466
  const bLevel = PLAIN_IMPACT_ORDER[plainLevelOf(b.report)] ?? 4;
443
467
  return aLevel - bLevel;
444
468
  });
445
- const count = result.reports.length;
469
+ const count = violations.length;
446
470
  const unit = count === 1 ? t("plain.intro_unit_singular") : t("plain.intro_unit_plural");
447
- const breakdownText = impactBreakdown(result.reports, plainLevelOf, PLAIN_IMPACT_ORDER).map((b) => `${b.count} ${escapeHtml(t(PLAIN_BADGE_KEY[b.level]))}`).join(", ");
471
+ const breakdownText = impactBreakdown(violations, plainLevelOf, PLAIN_IMPACT_ORDER).map((b) => `${b.count} ${escapeHtml(t(PLAIN_BADGE_KEY[b.level]))}`).join(", ");
448
472
  const isSwedish = lang === "sv";
449
473
  const itemsHtml = sortedGroups.length === 0 ? `<p>${t("plain.empty_state")}</p>` : `<ul class="issue-list">
450
474
  ${sortedGroups.map((group) => {
@@ -477,6 +501,22 @@ ${sortedGroups.map((group) => {
477
501
  }
478
502
  }).join("\n")}
479
503
  </ul>`;
504
+ const needsReviewHtml = needsReview.length === 0 ? "" : `<section class="needs-review">
505
+ <h2 class="needs-review-heading">${escapeHtml(t("plain.needs_review_heading", { count: needsReview.length }))}</h2>
506
+ <p class="needs-review-intro">${escapeHtml(t("plain.needs_review_intro"))}</p>
507
+ <ul class="needs-review-list">
508
+ ${needsReview.map((report) => {
509
+ const pl = report.plainLanguage;
510
+ const heading = pl?.headline ? `${escapeHtml(pl.headline)} <span class="issue-rule-ref">(${escapeHtml(report.ruleId)})</span>` : escapeHtml(report.ruleId);
511
+ return ` <li>${heading}</li>`;
512
+ }).join("\n")}
513
+ </ul>
514
+ </section>`;
515
+ const introHtml = violations.length === 0 ? "" : `<div class="intro">
516
+ <p>${t("plain.intro_framing")}</p>
517
+ <p>${t("plain.intro_found", { count, unit })}</p>
518
+ <p class="intro-breakdown">${count} ${escapeHtml(unit)}: ${breakdownText}</p>
519
+ </div>`;
480
520
  return `<!DOCTYPE html>
481
521
  <html lang="${lang}">
482
522
  <head>
@@ -692,6 +732,34 @@ ${sortedGroups.map((group) => {
692
732
  page-break-before: avoid;
693
733
  }
694
734
 
735
+ /* ---- Needs review (cantTell): kept visually distinct from the barrier
736
+ list \u2014 a neutral, low-alarm block for items a human must confirm. ---- */
737
+ .needs-review {
738
+ margin-top: 2rem;
739
+ padding: 1rem 1.25rem;
740
+ background: #f8fafc;
741
+ border: 1px solid #e2e8f0;
742
+ border-left: 4px solid #64748b;
743
+ border-radius: 6px;
744
+ }
745
+ .needs-review-heading {
746
+ font-size: 1rem;
747
+ font-weight: 700;
748
+ color: #334155;
749
+ margin-bottom: 0.35rem;
750
+ }
751
+ .needs-review-intro {
752
+ font-size: 0.9rem;
753
+ color: #64748b;
754
+ margin-bottom: 0.6rem;
755
+ }
756
+ .needs-review-list {
757
+ margin: 0;
758
+ padding-left: 1.25rem;
759
+ font-size: 0.95rem;
760
+ color: #334155;
761
+ }
762
+
695
763
  /* ---- Fixed per-page footer (Task H2): position:fixed elements are
696
764
  repeated on every printed page in Chromium print-to-PDF. White
697
765
  background + top border so cards never show through; the @page
@@ -728,13 +796,9 @@ ${sortedGroups.map((group) => {
728
796
 
729
797
  <div class="report-body">
730
798
  ${noticeHtml}
731
- <div class="intro">
732
- <p>${t("plain.intro_framing")}</p>
733
- <p>${t("plain.intro_found", { count, unit })}</p>
734
- <p class="intro-breakdown">${count} ${escapeHtml(unit)}: ${breakdownText}</p>
735
- </div>
799
+ ${introHtml}
736
800
 
737
- ${itemsHtml}
801
+ ${itemsHtml}${needsReviewHtml}
738
802
  ${renderNoScriptSection(result)}
739
803
  <p class="closing">${t("plain.closing")}</p>
740
804
  </div>
@@ -798,7 +862,7 @@ function parseHydrationWait(raw) {
798
862
 
799
863
  // src/cli/cloud-client.ts
800
864
  function transformToCloudPayload(result) {
801
- const violations = result.reports.map((report) => {
865
+ const toCloudViolation = (report) => {
802
866
  const firstNode = report.failingNodes?.[0];
803
867
  return {
804
868
  rule_id: report.ruleId,
@@ -809,7 +873,9 @@ function transformToCloudPayload(result) {
809
873
  failure_summary: report.holmdigitalInsight?.reasoning || report.remediation?.description || "",
810
874
  fix_suggestion: report.remediation?.description || ""
811
875
  };
812
- });
876
+ };
877
+ const violations = violationsOf(result.reports).map(toCloudViolation);
878
+ const needs_review = needsReviewOf(result.reports).map(toCloudViolation);
813
879
  return {
814
880
  url: result.url,
815
881
  compliance_score: result.score,
@@ -820,7 +886,9 @@ function transformToCloudPayload(result) {
820
886
  moderate_count: result.stats.medium,
821
887
  minor_count: result.stats.low,
822
888
  engine_version: getEngineVersion(),
823
- violations
889
+ violations,
890
+ needs_review_count: result.stats.needsReview,
891
+ needs_review
824
892
  };
825
893
  }
826
894
  async function sendToCloud(config, result) {
@@ -1032,7 +1100,9 @@ program.argument("<url>", "URL to scan").option("--lang <code>", "Language code
1032
1100
  // Rådgivande robusthetsindikator. Undefined när --noscript-check
1033
1101
  // inte används och faller då ur JSON:en av sig själv.
1034
1102
  noScript: result.noScript,
1035
- topIssues: result.reports.slice(0, 5).map((r) => ({
1103
+ // Needs review (cantTell) hör inte hemma bland topIssues — de är
1104
+ // inte fel. Antalet bärs av result.stats.needsReview (Intern #12).
1105
+ topIssues: violationsOf(result.reports).slice(0, 5).map((r) => ({
1036
1106
  id: r.ruleId,
1037
1107
  impact: r.holmdigitalInsight.diggRisk,
1038
1108
  description: r.remediation.description,
@@ -1052,10 +1122,14 @@ program.argument("<url>", "URL to scan").option("--lang <code>", "Language code
1052
1122
  console.log("");
1053
1123
  console.log(chalk.bold(`Score: ${scoreColor(`${result.score}/100`)} Status: ${statusColor(result.complianceStatus)}`));
1054
1124
  console.log(chalk.gray(`Critical: ${result.stats.critical} | High: ${result.stats.high} | Medium: ${result.stats.medium} | Low: ${result.stats.low}`));
1055
- if (result.reports.length > 0) {
1125
+ if (result.stats.needsReview > 0) {
1126
+ console.log(chalk.gray(`Needs review: ${result.stats.needsReview}`));
1127
+ }
1128
+ const lightViolations = violationsOf(result.reports);
1129
+ if (lightViolations.length > 0) {
1056
1130
  console.log("");
1057
1131
  console.log(chalk.bold("Top Issues:"));
1058
- result.reports.slice(0, 5).forEach((r) => {
1132
+ lightViolations.slice(0, 5).forEach((r) => {
1059
1133
  const color = r.holmdigitalInsight.diggRisk === "critical" ? chalk.red : r.holmdigitalInsight.diggRisk === "high" ? chalk.yellow : chalk.gray;
1060
1134
  console.log(color(` [${r.holmdigitalInsight.diggRisk.toUpperCase()}] ${r.ruleId} \u2014 ${r.remediation.description}`));
1061
1135
  });
@@ -1063,9 +1137,11 @@ program.argument("<url>", "URL to scan").option("--lang <code>", "Language code
1063
1137
  console.log(chalk.gray(`
1064
1138
  Scan: ${result.metadata.scanDuration}ms | ${result.metadata.engineVersion}`));
1065
1139
  } else if (options.audience === "plain") {
1066
- const { renderPlainReport } = await import("../plain-report-BRVL3OVD.mjs");
1140
+ const { renderPlainReport } = await import("../plain-report-XZZM5ZHK.mjs");
1067
1141
  renderPlainReport(result, plainFallbackFrom ? "en" : options.lang, plainFallbackFrom);
1068
1142
  } else {
1143
+ const violations = violationsOf(result.reports);
1144
+ const needsReview = needsReviewOf(result.reports);
1069
1145
  console.log("\n");
1070
1146
  const scoreColor = result.score >= 90 ? chalk.green : result.score >= 70 ? chalk.yellow : chalk.red;
1071
1147
  console.log(chalk.bold(`[ Compliance Score: ${scoreColor(result.score + "/100")} ] ${result.score >= 90 ? "\u{1F7E2}" : result.score >= 70 ? "\u{1F7E1}" : "\u{1F534}"}`));
@@ -1083,7 +1159,7 @@ ${t("cli.badge_withheld")}`));
1083
1159
  }
1084
1160
  console.log(chalk.gray("----------------------------------------"));
1085
1161
  const calculateCategoryScore = (filterFn) => {
1086
- const failures = result.reports.filter(filterFn).length;
1162
+ const failures = violations.filter(filterFn).length;
1087
1163
  return Math.max(10, 100 - failures * 20);
1088
1164
  };
1089
1165
  const cats = [
@@ -1095,7 +1171,7 @@ ${t("cli.badge_withheld")}`));
1095
1171
  {
1096
1172
  name: "Keyboard Nav ",
1097
1173
  score: calculateCategoryScore((r) => ["2.1.1", "2.1.2", "2.4.3", "2.4.7"].some((c) => r.wcagCriteria.includes(c))),
1098
- critical: result.reports.some((r) => ["2.1.1", "2.1.2"].some((c) => r.wcagCriteria.includes(c)) && r.holmdigitalInsight.diggRisk === "critical")
1174
+ critical: violations.some((r) => ["2.1.1", "2.1.2"].some((c) => r.wcagCriteria.includes(c)) && r.holmdigitalInsight.diggRisk === "critical")
1099
1175
  },
1100
1176
  {
1101
1177
  name: "Contrast ",
@@ -1119,9 +1195,9 @@ ${t("cli.badge_withheld")}`));
1119
1195
  let riskIcon = "\u2705";
1120
1196
  if (result.legalSummary && result.legalSummary.eaaDeadlineViolations > 0) {
1121
1197
  legalRisk = "HIGH";
1122
- const hasKeyboardIssues = result.reports.some((r) => ["2.1.1", "2.1.2"].some((c) => r.wcagCriteria.includes(c)));
1123
- const hasContrastIssues = result.reports.some((r) => r.wcagCriteria.includes("1.4.3") || r.ruleId === "color-contrast");
1124
- const hasStructureIssues = result.reports.some((r) => r.wcagCriteria.includes("1.3.1"));
1198
+ const hasKeyboardIssues = violations.some((r) => ["2.1.1", "2.1.2"].some((c) => r.wcagCriteria.includes(c)));
1199
+ const hasContrastIssues = violations.some((r) => r.wcagCriteria.includes("1.4.3") || r.ruleId === "color-contrast");
1200
+ const hasStructureIssues = violations.some((r) => r.wcagCriteria.includes("1.3.1"));
1125
1201
  if (hasKeyboardIssues) riskReason = "Keyboard accessibility blocks EAA compliance";
1126
1202
  else if (hasContrastIssues) riskReason = "Contrast issues block EAA compliance";
1127
1203
  else if (hasStructureIssues) riskReason = "HTML structure issues block EAA compliance";
@@ -1143,10 +1219,10 @@ ${t("cli.badge_withheld")}`));
1143
1219
  console.log(chalk.gray(" ... and more (run with --json for full details)"));
1144
1220
  console.log(chalk.gray("----------------------------------------"));
1145
1221
  }
1146
- if (result.reports.length > 0) {
1222
+ if (violations.length > 0) {
1147
1223
  console.log(chalk.bold("Top Violations:"));
1148
1224
  }
1149
- result.reports.forEach((report, i) => {
1225
+ violations.forEach((report, i) => {
1150
1226
  if (i > 5) return;
1151
1227
  const color = report.holmdigitalInsight.diggRisk === "critical" ? chalk.red : chalk.yellow;
1152
1228
  console.log(color.bold(`
@@ -1156,9 +1232,19 @@ ${t("cli.badge_withheld")}`));
1156
1232
  console.log(chalk.green(`Fix: Use component <${report.remediation.component} />`));
1157
1233
  }
1158
1234
  });
1159
- if (result.reports.length > 5) {
1235
+ if (violations.length > 5) {
1160
1236
  console.log(chalk.gray(`
1161
- ... and ${result.reports.length - 5} more issues.`));
1237
+ ... and ${violations.length - 5} more issues.`));
1238
+ }
1239
+ if (needsReview.length > 0) {
1240
+ console.log(chalk.cyan.bold(`
1241
+ \u2139\uFE0F Needs review (${needsReview.length}): axe could not determine these automatically`));
1242
+ needsReview.slice(0, 5).forEach((report) => {
1243
+ console.log(chalk.cyan(` [NEEDS REVIEW] ${report.ruleId} \u2014 WCAG ${report.wcagCriteria}`));
1244
+ });
1245
+ if (needsReview.length > 5) {
1246
+ console.log(chalk.gray(` ... and ${needsReview.length - 5} more to review.`));
1247
+ }
1162
1248
  }
1163
1249
  console.log(chalk.gray("\n----------------------------------------"));
1164
1250
  console.log(`Scan Date: ${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]}`);
@@ -1166,7 +1252,7 @@ ${t("cli.badge_withheld")}`));
1166
1252
  if (options.generateTests) {
1167
1253
  console.log(chalk.magenta.bold(t("cli.pseudo_tests")));
1168
1254
  const automation = new PseudoAutomationEngine();
1169
- result.reports.forEach((report) => {
1255
+ violations.forEach((report) => {
1170
1256
  if (report.testability.pseudoAutomation) {
1171
1257
  console.log(chalk.cyan(t("cli.test_for", { ruleId: report.ruleId })));
1172
1258
  console.log(chalk.gray(automation.generateTestScript(report, url)));
@@ -1178,11 +1264,11 @@ ${t("cli.badge_withheld")}`));
1178
1264
  renderNoScriptAdvisory(result.noScript);
1179
1265
  }
1180
1266
  if (options.ci && result.reports.length > 0) {
1181
- const { generateGitHubActionsAnnotations } = await import("../github-actions-5AFDFD4T.mjs");
1267
+ const { generateGitHubActionsAnnotations } = await import("../github-actions-PIV5JU2C.mjs");
1182
1268
  generateGitHubActionsAnnotations(result.reports);
1183
1269
  }
1184
1270
  if (options.junit) {
1185
- const { generateJUnitXML } = await import("../junit-generator-MNO6GP5J.mjs");
1271
+ const { generateJUnitXML } = await import("../junit-generator-5DTJ7YEU.mjs");
1186
1272
  const fs = await import("fs/promises");
1187
1273
  const xml = generateJUnitXML(result);
1188
1274
  await fs.writeFile(options.junit, xml);
@@ -1,13 +1,13 @@
1
+ import {
2
+ needsReviewOf,
3
+ violationsOf
4
+ } from "./chunk-QEHLOWUK.mjs";
1
5
  import "./chunk-DIBTSSLZ.mjs";
2
6
 
3
7
  // src/reporting/github-actions.ts
4
8
  function generateGitHubActionsAnnotations(reports) {
5
- reports.forEach((report) => {
6
- let level = "warning";
7
- if (report.holmdigitalInsight.diggRisk === "critical") {
8
- level = "error";
9
- }
10
- const title = `[${report.ruleId}] ${report.wcagCriteria}`;
9
+ const emit = (report, level, titlePrefix = "") => {
10
+ const title = `${titlePrefix}[${report.ruleId}] ${report.wcagCriteria}`;
11
11
  const message = `${report.holmdigitalInsight.reasoning}
12
12
 
13
13
  Legitimacy: ${report.dosLagenReference}
@@ -19,6 +19,12 @@ Fix: ${report.remediation.component ? `Use <${report.remediation.component} />`
19
19
  } else {
20
20
  console.log(`::${level} title=${title}::${message}`);
21
21
  }
22
+ };
23
+ violationsOf(reports).forEach((report) => {
24
+ emit(report, report.holmdigitalInsight.diggRisk === "critical" ? "error" : "warning");
25
+ });
26
+ needsReviewOf(reports).forEach((report) => {
27
+ emit(report, "notice", "[needs review] ");
22
28
  });
23
29
  }
24
30
  export {
@@ -2,7 +2,7 @@ import {
2
2
  getCurrentLang,
3
3
  setLanguage,
4
4
  t
5
- } from "./chunk-QUCGL754.mjs";
5
+ } from "./chunk-RNCZ2GNY.mjs";
6
6
  import "./chunk-DIBTSSLZ.mjs";
7
7
  export {
8
8
  getCurrentLang,
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { EnrichedReport, RegulatoryReport } from '@holmdigital/standards';
1
+ import { EnrichedReport, RegulatoryReport, Country } from '@holmdigital/standards';
2
2
  import { Browser, Page } from 'puppeteer';
3
3
 
4
4
  interface ValidationResult {
@@ -79,6 +79,7 @@ interface ScanResult {
79
79
  medium: number;
80
80
  low: number;
81
81
  total: number;
82
+ needsReview: number;
82
83
  };
83
84
  score: number;
84
85
  complianceStatus: 'PASS' | 'FAIL';
@@ -103,6 +104,7 @@ declare class RegulatoryScanner {
103
104
  private runNoScriptCheck;
104
105
  private enrichResultsLight;
105
106
  private enrichResults;
107
+ private enrichIncomplete;
106
108
  private generateResultPackage;
107
109
  close(): Promise<void>;
108
110
  }
@@ -182,6 +184,8 @@ var report = {
182
184
  total_issues: "Total Issues",
183
185
  html_errors: "HTML Errors",
184
186
  detailed_violations: "Detailed Violations",
187
+ needs_review_title: "Needs review ({count})",
188
+ needs_review_note: "axe-core could not determine these automatically — verify them manually. They are not counted in the totals above.",
185
189
  prescriptive_fix: "💡 Prescriptive Fix",
186
190
  use: "Use",
187
191
  footer: "Generated by @holmdigital/engine v{version} • Standards: WCAG 2.1 AA, EN 301 549, DOS-lagen"
@@ -207,6 +211,8 @@ var plain = {
207
211
  attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
208
212
  fallback_framing: "Technical finding. Ask your developer to review this:",
209
213
  occurrences: "{count} occurrences",
214
+ needs_review_heading: "Needs a human check ({count})",
215
+ needs_review_intro: "Automated tools couldn't decide these — a person should confirm them. They're not counted as barriers above.",
210
216
  gate_blocked: "Plain-language (klarspråk) output is not yet available in '{lang}'.",
211
217
  gate_supported: "Languages with klarspråk: {langs}.",
212
218
  gate_howto: "Run without --plain for the developer report, or use a supported language (e.g. --lang sv).",
@@ -236,7 +242,8 @@ interface StatementMetadata {
236
242
  sector?: 'public' | 'private';
237
243
  publishDate?: string | Date;
238
244
  }
245
+ declare function resolveNationalLawReference(country: Country, sector: 'public' | 'private', lang?: string): string;
239
246
  declare function generateStatementContent(result: ScanResult, lang?: string, format?: 'html' | 'md' | 'markdown', metadata?: StatementMetadata): Promise<string>;
240
247
  declare function generateStatement(result: ScanResult, outputPath: string, lang?: string, format?: 'html' | 'md' | 'markdown', metadata?: StatementMetadata): Promise<void>;
241
248
 
242
- export { NOSCRIPT_EMPTY_THRESHOLD, NOSCRIPT_PARTIAL_THRESHOLD, type NoScriptProbeMeasurement, type NoScriptProbeOptions, type NoScriptResult, type NoScriptVerdict, PseudoAutomationEngine, RegulatoryScanner, type ScanMetadata, type ScanResult, type ScannerOptions, type StatementMetadata, VirtualDOMBuilder, type VirtualDOMConfig, type VirtualNode, evaluateNoScriptCoverage, generateStatement, generateStatementContent, getCurrentLang, getEngineVersion, probeWithoutJavaScript, setLanguage, t };
249
+ export { NOSCRIPT_EMPTY_THRESHOLD, NOSCRIPT_PARTIAL_THRESHOLD, type NoScriptProbeMeasurement, type NoScriptProbeOptions, type NoScriptResult, type NoScriptVerdict, PseudoAutomationEngine, RegulatoryScanner, type ScanMetadata, type ScanResult, type ScannerOptions, type StatementMetadata, VirtualDOMBuilder, type VirtualDOMConfig, type VirtualNode, evaluateNoScriptCoverage, generateStatement, generateStatementContent, getCurrentLang, getEngineVersion, probeWithoutJavaScript, resolveNationalLawReference, setLanguage, t };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { EnrichedReport, RegulatoryReport } from '@holmdigital/standards';
1
+ import { EnrichedReport, RegulatoryReport, Country } from '@holmdigital/standards';
2
2
  import { Browser, Page } from 'puppeteer';
3
3
 
4
4
  interface ValidationResult {
@@ -79,6 +79,7 @@ interface ScanResult {
79
79
  medium: number;
80
80
  low: number;
81
81
  total: number;
82
+ needsReview: number;
82
83
  };
83
84
  score: number;
84
85
  complianceStatus: 'PASS' | 'FAIL';
@@ -103,6 +104,7 @@ declare class RegulatoryScanner {
103
104
  private runNoScriptCheck;
104
105
  private enrichResultsLight;
105
106
  private enrichResults;
107
+ private enrichIncomplete;
106
108
  private generateResultPackage;
107
109
  close(): Promise<void>;
108
110
  }
@@ -182,6 +184,8 @@ var report = {
182
184
  total_issues: "Total Issues",
183
185
  html_errors: "HTML Errors",
184
186
  detailed_violations: "Detailed Violations",
187
+ needs_review_title: "Needs review ({count})",
188
+ needs_review_note: "axe-core could not determine these automatically — verify them manually. They are not counted in the totals above.",
185
189
  prescriptive_fix: "💡 Prescriptive Fix",
186
190
  use: "Use",
187
191
  footer: "Generated by @holmdigital/engine v{version} • Standards: WCAG 2.1 AA, EN 301 549, DOS-lagen"
@@ -207,6 +211,8 @@ var plain = {
207
211
  attribution: "Report generated by HolmDigital Engine, part of the HolmDigital accessibility ecosystem.",
208
212
  fallback_framing: "Technical finding. Ask your developer to review this:",
209
213
  occurrences: "{count} occurrences",
214
+ needs_review_heading: "Needs a human check ({count})",
215
+ needs_review_intro: "Automated tools couldn't decide these — a person should confirm them. They're not counted as barriers above.",
210
216
  gate_blocked: "Plain-language (klarspråk) output is not yet available in '{lang}'.",
211
217
  gate_supported: "Languages with klarspråk: {langs}.",
212
218
  gate_howto: "Run without --plain for the developer report, or use a supported language (e.g. --lang sv).",
@@ -236,7 +242,8 @@ interface StatementMetadata {
236
242
  sector?: 'public' | 'private';
237
243
  publishDate?: string | Date;
238
244
  }
245
+ declare function resolveNationalLawReference(country: Country, sector: 'public' | 'private', lang?: string): string;
239
246
  declare function generateStatementContent(result: ScanResult, lang?: string, format?: 'html' | 'md' | 'markdown', metadata?: StatementMetadata): Promise<string>;
240
247
  declare function generateStatement(result: ScanResult, outputPath: string, lang?: string, format?: 'html' | 'md' | 'markdown', metadata?: StatementMetadata): Promise<void>;
241
248
 
242
- export { NOSCRIPT_EMPTY_THRESHOLD, NOSCRIPT_PARTIAL_THRESHOLD, type NoScriptProbeMeasurement, type NoScriptProbeOptions, type NoScriptResult, type NoScriptVerdict, PseudoAutomationEngine, RegulatoryScanner, type ScanMetadata, type ScanResult, type ScannerOptions, type StatementMetadata, VirtualDOMBuilder, type VirtualDOMConfig, type VirtualNode, evaluateNoScriptCoverage, generateStatement, generateStatementContent, getCurrentLang, getEngineVersion, probeWithoutJavaScript, setLanguage, t };
249
+ export { NOSCRIPT_EMPTY_THRESHOLD, NOSCRIPT_PARTIAL_THRESHOLD, type NoScriptProbeMeasurement, type NoScriptProbeOptions, type NoScriptResult, type NoScriptVerdict, PseudoAutomationEngine, RegulatoryScanner, type ScanMetadata, type ScanResult, type ScannerOptions, type StatementMetadata, VirtualDOMBuilder, type VirtualDOMConfig, type VirtualNode, evaluateNoScriptCoverage, generateStatement, generateStatementContent, getCurrentLang, getEngineVersion, probeWithoutJavaScript, resolveNationalLawReference, setLanguage, t };