tewip-ai 0.69.8 → 0.69.9
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/dist/cli/help.js +3 -1
- package/dist/engine/access/render.js +37 -11
- package/package.json +1 -1
package/dist/cli/help.js
CHANGED
|
@@ -152,7 +152,9 @@ Usage:
|
|
|
152
152
|
report and it reads that too - Lighthouse runs axe rules, so
|
|
153
153
|
either works. Contrast moves out of the unchecked list, rules
|
|
154
154
|
that map to no WCAG criterion are reported as advice rather than
|
|
155
|
-
barriers (51 of 174 findings on nine real pages
|
|
155
|
+
barriers (51 of 174 findings on nine real pages run through axe;
|
|
156
|
+
a Lighthouse report runs a WCAG-aligned subset and produced 2 of
|
|
157
|
+
363 on six real pages, so expect little advice from one), and what the
|
|
156
158
|
tool could not determine becomes a question. Lighthouse's ten
|
|
157
159
|
manual checks are questions too, never passes. No model, no cost.
|
|
158
160
|
tewip standards [--diff main...HEAD] [--strict] [--out standards.md]
|
|
@@ -61,17 +61,36 @@ export function renderAccess(result, scanned) {
|
|
|
61
61
|
}
|
|
62
62
|
else {
|
|
63
63
|
const stopping = barriers.filter((f) => blocks(f.rule)).length;
|
|
64
|
-
const counts = [
|
|
65
|
-
`${barriers.length} ${barriers.length === 1 ? 'barrier' : 'barriers'} (${stopping} that stop somebody outright)`,
|
|
66
|
-
`${questions.length} for a person to settle`,
|
|
67
|
-
];
|
|
68
|
-
if (accepted.length > 0)
|
|
69
|
-
counts.push(`${accepted.length} already accepted`);
|
|
64
|
+
const counts = [];
|
|
70
65
|
if (browser) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
66
|
+
// How many **rules**, then how many places. On Hacker News the browser count was "244
|
|
67
|
+
// barriers", of which **238 were one rule** - colour contrast - on one page. The number was
|
|
68
|
+
// arithmetically right and told the reader nothing they could act on: five things are wrong
|
|
69
|
+
// here, one of them in 238 places. A count of occurrences presented as a count of problems
|
|
70
|
+
// makes a page look hopeless and hides which five things to fix.
|
|
71
|
+
const rules = new Set(browser.barriers.map((f) => f.rule)).size;
|
|
72
|
+
counts.push(browser.barriers.length === 0
|
|
73
|
+
? 'no barrier in the browser run'
|
|
74
|
+
: `${rules} ${rules === 1 ? 'barrier' : 'barriers'} the browser run proves, in ${browser.barriers.length} ${browser.barriers.length === 1 ? 'place' : 'places'}`);
|
|
75
|
+
}
|
|
76
|
+
// And this count is from reading markup, which the sentence never said. Beside a browser count
|
|
77
|
+
// also called "barriers", a reader saw "244 barriers..., 0 barriers" and could not tell whether
|
|
78
|
+
// the second number corrected the first. With no markup read at all there is no count to give:
|
|
79
|
+
// zero files examined is not a finding of zero.
|
|
80
|
+
if (filesRead > 0) {
|
|
81
|
+
counts.push(`${barriers.length} ${barriers.length === 1 ? 'barrier' : 'barriers'} in the markup (${stopping} that stop somebody outright)`);
|
|
82
|
+
counts.push(`${questions.length} for a person to settle`);
|
|
83
|
+
}
|
|
84
|
+
else if (!browser) {
|
|
85
|
+
counts.push('no markup file was read, so nothing was checked');
|
|
74
86
|
}
|
|
87
|
+
else if (questions.length > 0) {
|
|
88
|
+
counts.push(`${questions.length} for a person to settle`);
|
|
89
|
+
}
|
|
90
|
+
if (accepted.length > 0)
|
|
91
|
+
counts.push(`${accepted.length} already accepted`);
|
|
92
|
+
if (browser && browser.questions.length > 0)
|
|
93
|
+
counts.push(`${browser.questions.length} the browser could not determine`);
|
|
75
94
|
lines.push(`**${counts.join(', ')}.**`, '');
|
|
76
95
|
}
|
|
77
96
|
if (browser) {
|
|
@@ -82,8 +101,15 @@ export function renderAccess(result, scanned) {
|
|
|
82
101
|
section('Only a person can settle these', [...questions].sort(worstFirst), lines);
|
|
83
102
|
if (browser && browser.advice.length > 0) {
|
|
84
103
|
// Kept out of the counts above on purpose. These are axe's own best-practice rules, which test
|
|
85
|
-
// no standard: on nine real pages they were 51 of 174 findings, outnumbering
|
|
86
|
-
// Reporting them as equals is how a team learns to ignore the whole report.
|
|
104
|
+
// no standard: on nine real pages **run through axe** they were 51 of 174 findings, outnumbering
|
|
105
|
+
// every real barrier. Reporting them as equals is how a team learns to ignore the whole report.
|
|
106
|
+
//
|
|
107
|
+
// That 51-of-174 is an axe number and only an axe number. Measured again on six real pages
|
|
108
|
+
// through **Lighthouse** - gov.uk, MDN, Hacker News, python.org, w3.org/WAI, Wikipedia - advice
|
|
109
|
+
// was 2 of 363 findings, 0.6%, because Lighthouse's accessibility category runs a WCAG-aligned
|
|
110
|
+
// subset of axe and leaves nearly all the best-practice rules out. Both numbers are real; a
|
|
111
|
+
// published one without the condition it was measured under is the kind of claim this project
|
|
112
|
+
// exists to stop making.
|
|
87
113
|
const rules = [...new Set(browser.advice.map((f) => f.rule))].sort();
|
|
88
114
|
lines.push('## Advice, not barriers', '');
|
|
89
115
|
lines.push(`${browser.advice.length} ${browser.advice.length === 1 ? 'finding comes' : 'findings come'} from axe rules that map to no WCAG criterion - ` +
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tewip-ai",
|
|
3
|
-
"version": "0.69.
|
|
3
|
+
"version": "0.69.9",
|
|
4
4
|
"mcpName": "io.github.hmamut39/tewip",
|
|
5
5
|
"description": "Tewip finds why each failing test failed - real bug, flaky test, environment, test data or changed selector - for any stack, from the command line, CI, or your editor.",
|
|
6
6
|
"keywords": [
|