@ngbracket/a11y-devtools 0.14.0 → 0.14.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/CHANGELOG.md +11 -0
- package/README.md +13 -2
- package/dist/attribution.d.ts +2 -1
- package/dist/attribution.js +3 -2
- package/dist/inpage.global.js +1 -1
- package/dist/scan.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to `@ngbracket/a11y-devtools` are documented here.
|
|
4
4
|
This project adheres to [Semantic Versioning](https://semver.org/).
|
|
5
5
|
|
|
6
|
+
## 0.14.1
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
|
|
10
|
+
- **`componentPath` lists each component once.** With content projection, a
|
|
11
|
+
finding's path could repeat a component, e.g.
|
|
12
|
+
`HomePageComponent > PanelComponent > HomePageComponent > AppComponent` for an
|
|
13
|
+
image projected into a panel. It's now
|
|
14
|
+
`HomePageComponent > PanelComponent > AppComponent`. The attributed
|
|
15
|
+
`component`, "via" notes and baseline matching are unchanged.
|
|
16
|
+
|
|
6
17
|
## 0.14.0
|
|
7
18
|
|
|
8
19
|
### Added
|
package/README.md
CHANGED
|
@@ -91,7 +91,16 @@ heuristics, labelled "verify manually". It helps you build toward supporting WCA
|
|
|
91
91
|
npm install --legacy-peer-deps
|
|
92
92
|
npm run build # tsc -> dist/ (ESM + .d.ts) + the in-page bundle
|
|
93
93
|
npm test # vitest + jsdom + Angular TestBed (real axe); the real-browser
|
|
94
|
-
# E2E
|
|
94
|
+
# E2E specs run after a build, once `npx playwright install chromium`
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
The real-browser specs are `src/testing/e2e-report.spec.ts` (report mode against plain-HTML
|
|
98
|
+
pages) and `src/testing/e2e-angular.spec.ts` (component attribution against a real Angular
|
|
99
|
+
app). The second builds the fixture app in `e2e/angular-app` itself, with `@angular/build`
|
|
100
|
+
(no Angular CLI needed). To build it by hand, for example to open it in a browser:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
node scripts/build-angular-fixture.mjs # → e2e/angular-app/dist/{dev,prod}/browser
|
|
95
104
|
```
|
|
96
105
|
|
|
97
106
|
CI also runs a production-weight guard: a bundle-graph test that fails if axe-core
|
|
@@ -123,4 +132,6 @@ ever becomes reachable through a static import.
|
|
|
123
132
|
- **Keyboard & Focus Mode M3** — missing focus-trap detection (uncontained
|
|
124
133
|
`aria-modal`) and the keyboard-trap walk with real Tab presses.
|
|
125
134
|
- CI production-weight guard.
|
|
126
|
-
- Real-browser E2E
|
|
135
|
+
- Real-browser E2E tests, including component attribution in a real Angular app.
|
|
136
|
+
- Report mode can start the dev server (`--serve`).
|
|
137
|
+
- ACR evaluation worksheet by WCAG 2.2 A/AA criterion (`--format acr`).
|
package/dist/attribution.d.ts
CHANGED
|
@@ -52,7 +52,8 @@ export declare function ngDebug(): NgDebugGlobal | undefined;
|
|
|
52
52
|
export declare const DEFAULT_FRAMEWORK_PREFIXES: readonly string[];
|
|
53
53
|
/**
|
|
54
54
|
* The chain of owning components from the flagged node up to the root, nearest
|
|
55
|
-
* first
|
|
55
|
+
* first, each listed once (content projection can bring a component back up the
|
|
56
|
+
* DOM path; only its nearest position is kept). Built by walking DOM ancestors and asking Angular's
|
|
56
57
|
* debug API who owns each, so a control that is itself a library primitive still
|
|
57
58
|
* reveals the app component that placed it. Empty when the global is absent (prod).
|
|
58
59
|
*/
|
package/dist/attribution.js
CHANGED
|
@@ -70,7 +70,8 @@ function isPrimitiveComponent(name, prefixes) {
|
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
72
|
* The chain of owning components from the flagged node up to the root, nearest
|
|
73
|
-
* first
|
|
73
|
+
* first, each listed once (content projection can bring a component back up the
|
|
74
|
+
* DOM path; only its nearest position is kept). Built by walking DOM ancestors and asking Angular's
|
|
74
75
|
* debug API who owns each, so a control that is itself a library primitive still
|
|
75
76
|
* reveals the app component that placed it. Empty when the global is absent (prod).
|
|
76
77
|
*/
|
|
@@ -93,7 +94,7 @@ export function resolveComponentPath(node) {
|
|
|
93
94
|
owner = null; // node isn't part of a live view
|
|
94
95
|
}
|
|
95
96
|
const name = nameOf(owner);
|
|
96
|
-
if (name &&
|
|
97
|
+
if (name && !path.includes(name))
|
|
97
98
|
path.push(name);
|
|
98
99
|
el = el.parentElement;
|
|
99
100
|
}
|
package/dist/inpage.global.js
CHANGED
|
@@ -34191,7 +34191,7 @@
|
|
|
34191
34191
|
owner = null;
|
|
34192
34192
|
}
|
|
34193
34193
|
const name = nameOf(owner);
|
|
34194
|
-
if (name &&
|
|
34194
|
+
if (name && !path.includes(name))
|
|
34195
34195
|
path.push(name);
|
|
34196
34196
|
el = el.parentElement;
|
|
34197
34197
|
}
|
package/dist/scan.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export interface A11yFinding {
|
|
|
26
26
|
helpUrl: string;
|
|
27
27
|
/** Owning component name, or null when attribution isn't available (prod). */
|
|
28
28
|
component: string | null;
|
|
29
|
-
/** Owning components from the flagged node up to the root, nearest first; [] in prod. */
|
|
29
|
+
/** Owning components from the flagged node up to the root, nearest first, each once; [] in prod. */
|
|
30
30
|
componentPath: string[];
|
|
31
31
|
/** Directives on the flagged node (incl. hostDirectives); [] when none/unavailable. */
|
|
32
32
|
directives: string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngbracket/a11y-devtools",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"description": "Dev-only in-app accessibility auditing for Angular that maps each axe violation back to the component that rendered it — the attribution React overlay tools can't do.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Duncan Faulkner",
|