@holmdigital/engine 1.4.6 → 1.4.7
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 +36 -0
- package/dist/{chunk-SH2EU7XX.mjs → chunk-2JUTUKQY.mjs} +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -88,6 +88,42 @@ npx hd-a11y-scan https://example.com --json
|
|
|
88
88
|
}
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
+
## Severity Threshold
|
|
92
|
+
|
|
93
|
+
The `--threshold` flag controls when `complianceStatus` becomes `FAIL`:
|
|
94
|
+
|
|
95
|
+
| Threshold | Fails on |
|
|
96
|
+
|-----------|----------|
|
|
97
|
+
| `critical` | Only critical violations |
|
|
98
|
+
| `high` (default) | Critical + high violations |
|
|
99
|
+
| `medium` | Critical + high + medium violations |
|
|
100
|
+
| `low` | Any violation |
|
|
101
|
+
|
|
102
|
+
**Why this matters for CI/CD:**
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# Strict: Block deployment on any serious issue
|
|
106
|
+
npx hd-a11y-scan https://staging.example.com --ci --threshold high
|
|
107
|
+
|
|
108
|
+
# Lenient: Only block on critical issues (like missing alt text)
|
|
109
|
+
npx hd-a11y-scan https://staging.example.com --ci --threshold critical
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Medium violations (like missing `<main>` landmark) won't fail your CI by default, but are still reported for awareness.
|
|
113
|
+
|
|
114
|
+
## Metadata Fields
|
|
115
|
+
|
|
116
|
+
| Field | Description |
|
|
117
|
+
|-------|-------------|
|
|
118
|
+
| `engineVersion` | Version of @holmdigital/engine |
|
|
119
|
+
| `axeCoreVersion` | Version of axe-core used |
|
|
120
|
+
| `standardsVersion` | Version of @holmdigital/standards database |
|
|
121
|
+
| `scanDuration` | Scan time in milliseconds |
|
|
122
|
+
| `pageTitle` | HTML `<title>` of scanned page |
|
|
123
|
+
| `pageLanguage` | `lang` attribute of `<html>` |
|
|
124
|
+
| `stats.passed` | Number of accessibility checks that passed |
|
|
125
|
+
|
|
126
|
+
|
|
91
127
|
## Programmatic Usage
|
|
92
128
|
|
|
93
129
|
```typescript
|
|
@@ -342,7 +342,7 @@ var RegulatoryScanner = class {
|
|
|
342
342
|
}
|
|
343
343
|
const axeCore = __require("axe-core");
|
|
344
344
|
const metadata = {
|
|
345
|
-
engineVersion: "1.4.
|
|
345
|
+
engineVersion: "1.4.7",
|
|
346
346
|
axeCoreVersion: axeCore.version || "4.10.2",
|
|
347
347
|
standardsVersion: "1.2.2",
|
|
348
348
|
scanDuration,
|
package/dist/cli/index.js
CHANGED
|
@@ -691,7 +691,7 @@ var RegulatoryScanner = class {
|
|
|
691
691
|
}
|
|
692
692
|
const axeCore = require("axe-core");
|
|
693
693
|
const metadata = {
|
|
694
|
-
engineVersion: "1.4.
|
|
694
|
+
engineVersion: "1.4.7",
|
|
695
695
|
axeCoreVersion: axeCore.version || "4.10.2",
|
|
696
696
|
standardsVersion: "1.2.2",
|
|
697
697
|
scanDuration,
|
package/dist/cli/index.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -698,7 +698,7 @@ var RegulatoryScanner = class {
|
|
|
698
698
|
}
|
|
699
699
|
const axeCore = require("axe-core");
|
|
700
700
|
const metadata = {
|
|
701
|
-
engineVersion: "1.4.
|
|
701
|
+
engineVersion: "1.4.7",
|
|
702
702
|
axeCoreVersion: axeCore.version || "4.10.2",
|
|
703
703
|
standardsVersion: "1.2.2",
|
|
704
704
|
scanDuration,
|
package/dist/index.mjs
CHANGED