equall-cli 0.1.2 → 0.1.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 +66 -8
- package/dist/chunk-CMP4ST3J.js +88532 -0
- package/dist/cli.js +262 -9
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/package.json +4 -2
- package/dist/chunk-JMFHJMBB.js +0 -40482
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Equall
|
|
2
2
|
|
|
3
|
-
Open-source accessibility scoring for dev teams. Aggregates axe-core, eslint-plugin-jsx-a11y, and more into a unified score.
|
|
3
|
+
Open-source accessibility scoring for dev teams. Aggregates axe-core, eslint-plugin-jsx-a11y, text-readability, and more into a unified score.
|
|
4
4
|
|
|
5
5
|
**One command. Real score. No config.**
|
|
6
6
|
|
|
@@ -11,17 +11,26 @@ equall scan .
|
|
|
11
11
|
```
|
|
12
12
|
◆ EQUALL — Accessibility Score
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
56 ~A WCAG 2.2
|
|
15
15
|
|
|
16
16
|
POUR Breakdown
|
|
17
|
-
P Perceivable
|
|
18
|
-
O Operable
|
|
17
|
+
P Perceivable ██████████████████░░ 89
|
|
18
|
+
O Operable ███████████████░░░░░ 76
|
|
19
19
|
U Understandable ░░░░░░░░░░░░░░░░░░░░ n/a
|
|
20
|
-
R Robust
|
|
20
|
+
R Robust █████████████████░░░ 85
|
|
21
21
|
|
|
22
22
|
Summary
|
|
23
|
-
33 files scanned ·
|
|
24
|
-
2 critical
|
|
23
|
+
33 files scanned · 15 WCAG violations · 19 best-practice issues
|
|
24
|
+
2 critical 11 serious 19 moderate 0 minor
|
|
25
|
+
2 issues ignored via equall-ignore
|
|
26
|
+
Score 56/100 · 18/30 Level A criteria checked (60%) · 5 failed
|
|
27
|
+
29/57 Level AA criteria checked (51%) · 6 failed
|
|
28
|
+
|
|
29
|
+
ⓘ You're failing 5 Level A criteria (1.3.1, 2.1.1, 2.4.2, 2.4.4, 4.1.2).
|
|
30
|
+
Level A is the legal minimum — fix these first.
|
|
31
|
+
|
|
32
|
+
Scanners: axe-core@4.11.1 (23 issues), eslint-jsx-a11y@6.10.2 (13 issues)
|
|
33
|
+
Completed in 0.8s
|
|
25
34
|
```
|
|
26
35
|
|
|
27
36
|
## Install
|
|
@@ -85,7 +94,18 @@ It automatically skips: `node_modules`, `dist`, `build`, `.next`, test files, st
|
|
|
85
94
|
| Scanner | What it checks | WCAG criteria covered |
|
|
86
95
|
|---------|---------------|----------------------|
|
|
87
96
|
| **axe-core** | HTML structure, ARIA, landmarks, forms, media | 24 |
|
|
88
|
-
| **eslint-plugin-jsx-a11y** | JSX/React-specific a11y patterns |
|
|
97
|
+
| **eslint-plugin-jsx-a11y** | JSX/React-specific a11y patterns | 16 |
|
|
98
|
+
| **readability** | Required reading level of text content (Flesch, ARI, SMOG, etc.) | 1 (WCAG 3.1.5 AAA) |
|
|
99
|
+
|
|
100
|
+
### Readability scoring
|
|
101
|
+
|
|
102
|
+
The readability scanner checks [WCAG 3.1.5 (Reading Level)](https://www.w3.org/WAI/WCAG22/Understanding/reading-level) — text should be understandable at a lower secondary education level (approximately Grade 9).
|
|
103
|
+
|
|
104
|
+
It runs 6 formulas (Flesch-Kincaid, Coleman-Liau, ARI, Gunning Fog, SMOG, Dale-Chall) and uses the **median grade** across all formulas to reduce single-formula bias. If the median exceeds Grade 9, an issue is reported with the full breakdown.
|
|
105
|
+
|
|
106
|
+
- Scans `.html` and `.vue` files only — JSX/TSX excluded because regex extraction captures `className` attributes and `{expressions}` that pollute scores
|
|
107
|
+
- Skips files with fewer than 30 words (formulas are statistically invalid on short text)
|
|
108
|
+
- Skips non-English files (detected via `lang` attribute) — formulas are English-calibrated
|
|
89
109
|
|
|
90
110
|
## Scoring
|
|
91
111
|
|
|
@@ -102,6 +122,40 @@ The POUR metrics (Perceivable, Operable, Understandable, Robust) strictly follow
|
|
|
102
122
|
### Conformance Level
|
|
103
123
|
Conformance (A / AA / AAA) is evaluated strictly against your `--level` target. If you target `AA`, any `AAA` rules incidentally flagged by the scanners will not downgrade your conformance status.
|
|
104
124
|
|
|
125
|
+
## Ignoring issues
|
|
126
|
+
|
|
127
|
+
Some issues are false positives (e.g. an orphan `<li>` in a component that's always rendered inside a `<ul>`). Suppress them with inline comments:
|
|
128
|
+
|
|
129
|
+
```tsx
|
|
130
|
+
// equall-ignore-next-line
|
|
131
|
+
<li>{item.name}</li>
|
|
132
|
+
|
|
133
|
+
// equall-ignore-next-line jsx-a11y/alt-text
|
|
134
|
+
<img src={logo} />
|
|
135
|
+
|
|
136
|
+
{/* equall-ignore-next-line */}
|
|
137
|
+
<div onClick={handler}>...</div>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
```html
|
|
141
|
+
<!-- equall-ignore-next-line -->
|
|
142
|
+
<img src="decorative.png" />
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Or use the CLI to inject/manage comments without opening the file:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
equall ignore src/Modal.tsx # ignore an entire file
|
|
149
|
+
equall ignore src/Modal.tsx:89 # ignore all rules at line 89
|
|
150
|
+
equall ignore src/Modal.tsx:89 jsx-a11y/alt-text # ignore a specific rule
|
|
151
|
+
equall ignore . # list all ignores
|
|
152
|
+
equall ignore --remove src/Modal.tsx:89 # remove an ignore
|
|
153
|
+
equall ignore --remove src/Modal.tsx # remove all ignores in a file
|
|
154
|
+
equall ignore --clear # remove all ignores
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Ignored issues are excluded from the score. Use `equall scan . -i` to show them, or `--json` to get them with `"ignored": true`.
|
|
158
|
+
|
|
105
159
|
## Programmatic API
|
|
106
160
|
|
|
107
161
|
```typescript
|
|
@@ -124,6 +178,10 @@ console.log(result.issues.length) // 12
|
|
|
124
178
|
- `1` — score < 50 (useful for CI gates)
|
|
125
179
|
- `2` — scan error
|
|
126
180
|
|
|
181
|
+
## Contributing
|
|
182
|
+
|
|
183
|
+
Issues and PRs welcome — https://github.com/GotaBird/equall/issues
|
|
184
|
+
|
|
127
185
|
## License
|
|
128
186
|
|
|
129
187
|
MIT
|