@ngbracket/a11y-devtools 0.12.1 → 0.12.3
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 +37 -0
- package/dist/inpage.global.js +9 -11
- package/dist/keyboard/focus-walk.js +4 -3
- package/dist/keyboard/keyboard-scan.d.ts +5 -0
- package/dist/keyboard/keyboard-scan.js +18 -17
- package/dist/overlay.js +6 -0
- package/dist/report/format.d.ts +14 -0
- package/dist/report/format.js +20 -2
- package/dist/report/html.js +8 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,43 @@
|
|
|
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.12.3
|
|
7
|
+
|
|
8
|
+
### Changed
|
|
9
|
+
|
|
10
|
+
- **Reports say what they aren't.** The Markdown and HTML reports are now titled
|
|
11
|
+
"Automated accessibility scan" (was "Accessibility report") and open with a
|
|
12
|
+
scope note: automated checks cover only part of WCAG, and the report is not a
|
|
13
|
+
conformance report or a VPAT/ACR. The note links to
|
|
14
|
+
[What it checks (and what it can't)](https://ngbracket.com/tools/a11y-devtools/docs/coverage).
|
|
15
|
+
JSON reports carry the same note as a top-level `scope` field. A clean page now
|
|
16
|
+
reads "No automated violations found." The in-app **Download report** gets the
|
|
17
|
+
same changes.
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- **The overlay no longer adds text to the page's accessibility tree.** Finding
|
|
22
|
+
labels, tab-order numbers and the accessibility-tree preview panel were exposed
|
|
23
|
+
to screen readers, mixing rule ids and badge numbers into the app being tested.
|
|
24
|
+
The overlay layer is now `aria-hidden`. The on/off pill and its menu are in a
|
|
25
|
+
separate layer and stay fully accessible.
|
|
26
|
+
|
|
27
|
+
## 0.12.2
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- **Every `ngbr/*` finding links to its own explanation.** `helpUrl` now points to
|
|
32
|
+
the rule's page in the docs (for example
|
|
33
|
+
`https://ngbracket.com/tools/a11y-devtools/docs/click-without-key`). Each page
|
|
34
|
+
explains what the message means, who it affects, exactly what triggers it, how
|
|
35
|
+
to fix it and how to check it yourself, and links the WCAG or APG reference. It
|
|
36
|
+
used to link straight to the WCAG page.
|
|
37
|
+
- **Clearer messages.** Each now starts with what's wrong for the user, in plain
|
|
38
|
+
words. `ngbr/click-without-key` no longer calls itself a "possible keyboard
|
|
39
|
+
trap": a keyboard trap means you can't Tab away, and this rule is about a
|
|
40
|
+
control you can reach but may not be able to activate. `ngbr/focus-trap` now
|
|
41
|
+
starts "Keyboard trap:", which is what it finds.
|
|
42
|
+
|
|
6
43
|
## 0.12.1
|
|
7
44
|
|
|
8
45
|
### Fixed
|
package/dist/inpage.global.js
CHANGED
|
@@ -34321,6 +34321,7 @@
|
|
|
34321
34321
|
const doc = options.document ?? document;
|
|
34322
34322
|
const container = doc.createElement("div");
|
|
34323
34323
|
container.setAttribute(OVERLAY_ATTR, "");
|
|
34324
|
+
container.setAttribute("aria-hidden", "true");
|
|
34324
34325
|
Object.assign(container.style, {
|
|
34325
34326
|
position: "fixed",
|
|
34326
34327
|
inset: "0",
|
|
@@ -34821,10 +34822,7 @@
|
|
|
34821
34822
|
"treeitem"
|
|
34822
34823
|
]);
|
|
34823
34824
|
var KEY_EVENTS = ["keydown", "keyup", "keypress"];
|
|
34824
|
-
var
|
|
34825
|
-
var KEYBOARD_URL = `${UNDERSTANDING}/keyboard.html`;
|
|
34826
|
-
var FOCUS_ORDER_URL = `${UNDERSTANDING}/focus-order.html`;
|
|
34827
|
-
var DIALOG_MODAL_URL = "https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/";
|
|
34825
|
+
var RULE_DOCS = "https://ngbracket.com/tools/a11y-devtools/docs";
|
|
34828
34826
|
function shortSelector(element) {
|
|
34829
34827
|
const tag = element.tagName.toLowerCase();
|
|
34830
34828
|
if (element.id)
|
|
@@ -34872,21 +34870,21 @@
|
|
|
34872
34870
|
const focusable = isTabbable(element, isVisible);
|
|
34873
34871
|
if (!focusable) {
|
|
34874
34872
|
const reason = interactiveByRole ? `has role="${role}"` : "has a click handler";
|
|
34875
|
-
findings.push(make(element, "ngbr/unreachable-control", "serious", `
|
|
34873
|
+
findings.push(make(element, "ngbr/unreachable-control", "serious", `Keyboard users can't reach this control: it ${reason}, but it isn't a native control and has no tabindex="0", so Tab skips it. Use a <button> or <a href>, or add tabindex="0" and Enter/Space handling.`, `${RULE_DOCS}/unreachable-control`));
|
|
34876
34874
|
continue;
|
|
34877
34875
|
}
|
|
34878
34876
|
const hasKey = events.some((e) => KEY_EVENTS.includes(e));
|
|
34879
34877
|
if (hasClick && !hasKey) {
|
|
34880
|
-
findings.push(make(element, "ngbr/click-without-key", "moderate", `
|
|
34878
|
+
findings.push(make(element, "ngbr/click-without-key", "moderate", `Keyboard users may not be able to activate this: Tab reaches it, but it only listens for click, and Enter and Space don't fire click on a non-native element. Use a <button>, or handle Enter and Space too. Heuristic \u2014 verify manually.`, `${RULE_DOCS}/click-without-key`));
|
|
34881
34879
|
}
|
|
34882
34880
|
}
|
|
34883
34881
|
for (const modal2 of findUncontainedModals(root, { frameworkPrefixes: prefixes, isVisible })) {
|
|
34884
|
-
findings.push(make(modal2.element, "ngbr/modal-focus-not-contained", "moderate", `
|
|
34882
|
+
findings.push(make(modal2.element, "ngbr/modal-focus-not-contained", "moderate", `Keyboard users can Tab out of this modal: it has aria-modal="true", but ${modal2.outsideCount} control(s) outside it can still be reached with Tab. Open it with <dialog>.showModal(), make the rest of the page inert, or trap focus. Heuristic \u2014 verify manually.`, `${RULE_DOCS}/modal-focus-not-contained`));
|
|
34885
34883
|
}
|
|
34886
34884
|
const stops = tabSequence(root, { frameworkPrefixes: prefixes, isVisible, isModal: options.isModal });
|
|
34887
34885
|
for (const jump of visualOrderJumps(stops)) {
|
|
34888
34886
|
const stop = stops[jump];
|
|
34889
|
-
findings.push(make(stop.element, "ngbr/tab-order-mismatch", "moderate", `
|
|
34887
|
+
findings.push(make(stop.element, "ngbr/tab-order-mismatch", "moderate", `Tab order jumps backwards here: Tab reaches this control (stop ${stop.order}) after one that sits below it or to its right, so focus moves against the reading order. Heuristic \u2014 check the order makes sense to a sighted keyboard user.`, `${RULE_DOCS}/tab-order-mismatch`));
|
|
34890
34888
|
}
|
|
34891
34889
|
return findings;
|
|
34892
34890
|
}
|
|
@@ -34916,7 +34914,7 @@
|
|
|
34916
34914
|
}
|
|
34917
34915
|
return { kind: "pending" };
|
|
34918
34916
|
}
|
|
34919
|
-
var
|
|
34917
|
+
var FOCUS_TRAP_DOCS = "https://ngbracket.com/tools/a11y-devtools/docs/focus-trap";
|
|
34920
34918
|
function deepActiveElement(doc) {
|
|
34921
34919
|
let active = doc.activeElement;
|
|
34922
34920
|
while (active?.shadowRoot?.activeElement)
|
|
@@ -34978,8 +34976,8 @@
|
|
|
34978
34976
|
return {
|
|
34979
34977
|
id: "ngbr/focus-trap",
|
|
34980
34978
|
impact: shiftTabEscapes ? "moderate" : "serious",
|
|
34981
|
-
help: `
|
|
34982
|
-
helpUrl:
|
|
34979
|
+
help: `Keyboard trap: ${where}${reach}.${shift} If this widget deliberately keeps Tab (e.g. a code editor), it must tell users how to leave (such as Escape); otherwise let Tab move focus on. Found by real Tab presses \u2014 verify manually.`,
|
|
34980
|
+
helpUrl: FOCUS_TRAP_DOCS,
|
|
34983
34981
|
component: appComponentFromPath(componentPath, frameworkPrefixes),
|
|
34984
34982
|
componentPath,
|
|
34985
34983
|
directives: resolveDirectiveNames(owner),
|
|
@@ -56,7 +56,8 @@ export function detectTabTrap(observations, collapsible = new Set()) {
|
|
|
56
56
|
}
|
|
57
57
|
return { kind: 'pending' };
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
/** The rule's page: what the message means, how to fix and check it, and WCAG 2.1.2. */
|
|
60
|
+
const FOCUS_TRAP_DOCS = 'https://ngbracket.com/tools/a11y-devtools/docs/focus-trap';
|
|
60
61
|
/** The element that really has focus, through open shadow roots. */
|
|
61
62
|
function deepActiveElement(doc) {
|
|
62
63
|
let active = doc.activeElement;
|
|
@@ -132,10 +133,10 @@ export function createFocusWalkProbe(doc = document, frameworkPrefixes = DEFAULT
|
|
|
132
133
|
return {
|
|
133
134
|
id: 'ngbr/focus-trap',
|
|
134
135
|
impact: shiftTabEscapes ? 'moderate' : 'serious',
|
|
135
|
-
help: `
|
|
136
|
+
help: `Keyboard trap: ${where}${reach}.${shift} If this widget deliberately keeps ` +
|
|
136
137
|
`Tab (e.g. a code editor), it must tell users how to leave (such as Escape); otherwise ` +
|
|
137
138
|
`let Tab move focus on. Found by real Tab presses — verify manually.`,
|
|
138
|
-
helpUrl:
|
|
139
|
+
helpUrl: FOCUS_TRAP_DOCS,
|
|
139
140
|
component: appComponentFromPath(componentPath, frameworkPrefixes),
|
|
140
141
|
componentPath,
|
|
141
142
|
directives: resolveDirectiveNames(owner),
|
|
@@ -7,6 +7,11 @@ export interface KeyboardScanOptions {
|
|
|
7
7
|
/** Modal-dialog check override (tests; jsdom has no `:modal`). See {@link tabSequence}. */
|
|
8
8
|
isModal?: (element: Element) => boolean;
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Each rule's page: what the message means, who it affects, exactly what
|
|
12
|
+
* triggers it, how to fix and check it, and the WCAG/APG reference.
|
|
13
|
+
*/
|
|
14
|
+
export declare const RULE_DOCS = "https://ngbracket.com/tools/a11y-devtools/docs";
|
|
10
15
|
/** A short, human CSS-ish selector for our own findings (not an axe target). */
|
|
11
16
|
export declare function shortSelector(element: Element): string;
|
|
12
17
|
/** Truncated outerHTML for a finding's `html`. */
|
|
@@ -35,10 +35,11 @@ const INTERACTIVE_ROLES = new Set([
|
|
|
35
35
|
'treeitem',
|
|
36
36
|
]);
|
|
37
37
|
const KEY_EVENTS = ['keydown', 'keyup', 'keypress'];
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Each rule's page: what the message means, who it affects, exactly what
|
|
40
|
+
* triggers it, how to fix and check it, and the WCAG/APG reference.
|
|
41
|
+
*/
|
|
42
|
+
export const RULE_DOCS = 'https://ngbracket.com/tools/a11y-devtools/docs';
|
|
42
43
|
/** A short, human CSS-ish selector for our own findings (not an axe target). */
|
|
43
44
|
export function shortSelector(element) {
|
|
44
45
|
const tag = element.tagName.toLowerCase();
|
|
@@ -105,37 +106,37 @@ export function scanKeyboard(root = document, options = {}) {
|
|
|
105
106
|
const focusable = isTabbable(element, isVisible);
|
|
106
107
|
if (!focusable) {
|
|
107
108
|
const reason = interactiveByRole ? `has role="${role}"` : 'has a click handler';
|
|
108
|
-
findings.push(make(element, 'ngbr/unreachable-control', 'serious', `
|
|
109
|
-
`
|
|
110
|
-
`
|
|
109
|
+
findings.push(make(element, 'ngbr/unreachable-control', 'serious', `Keyboard users can't reach this control: it ${reason}, but it isn't a native ` +
|
|
110
|
+
`control and has no tabindex="0", so Tab skips it. Use a <button> or <a href>, ` +
|
|
111
|
+
`or add tabindex="0" and Enter/Space handling.`, `${RULE_DOCS}/unreachable-control`));
|
|
111
112
|
continue; // don't also report a weaker click-without-key on the same node
|
|
112
113
|
}
|
|
113
114
|
// Focusable, but a bare (click) never fires on Enter/Space the way a native
|
|
114
115
|
// button does — so a keyboard user can reach it and still not activate it.
|
|
115
116
|
const hasKey = events.some((e) => KEY_EVENTS.includes(e));
|
|
116
117
|
if (hasClick && !hasKey) {
|
|
117
|
-
findings.push(make(element, 'ngbr/click-without-key', 'moderate', `
|
|
118
|
-
`
|
|
119
|
-
`
|
|
118
|
+
findings.push(make(element, 'ngbr/click-without-key', 'moderate', `Keyboard users may not be able to activate this: Tab reaches it, but it only ` +
|
|
119
|
+
`listens for click, and Enter and Space don't fire click on a non-native element. ` +
|
|
120
|
+
`Use a <button>, or handle Enter and Space too. Heuristic — verify manually.`, `${RULE_DOCS}/click-without-key`));
|
|
120
121
|
}
|
|
121
122
|
}
|
|
122
123
|
// Missing focus trap (M3): an open aria-modal whose focus isn't contained.
|
|
123
124
|
// Reuses the tab-order machinery (inert/hidden already excluded), so a modal
|
|
124
125
|
// that correctly inerts the background is not flagged.
|
|
125
126
|
for (const modal of findUncontainedModals(root, { frameworkPrefixes: prefixes, isVisible })) {
|
|
126
|
-
findings.push(make(modal.element, 'ngbr/modal-focus-not-contained', 'moderate', `
|
|
127
|
-
`${modal.outsideCount}
|
|
128
|
-
`
|
|
129
|
-
`
|
|
127
|
+
findings.push(make(modal.element, 'ngbr/modal-focus-not-contained', 'moderate', `Keyboard users can Tab out of this modal: it has aria-modal="true", but ` +
|
|
128
|
+
`${modal.outsideCount} control(s) outside it can still be reached with Tab. Open it ` +
|
|
129
|
+
`with <dialog>.showModal(), make the rest of the page inert, or trap focus. ` +
|
|
130
|
+
`Heuristic — verify manually.`, `${RULE_DOCS}/modal-focus-not-contained`));
|
|
130
131
|
}
|
|
131
132
|
// Visual-vs-tab-order mismatch: a heuristic over the resolved sequence. Needs
|
|
132
133
|
// real layout, so it no-ops where getBoundingClientRect returns zeros (jsdom).
|
|
133
134
|
const stops = tabSequence(root, { frameworkPrefixes: prefixes, isVisible, isModal: options.isModal });
|
|
134
135
|
for (const jump of visualOrderJumps(stops)) {
|
|
135
136
|
const stop = stops[jump];
|
|
136
|
-
findings.push(make(stop.element, 'ngbr/tab-order-mismatch', 'moderate', `
|
|
137
|
-
`one that sits below or to
|
|
138
|
-
`
|
|
137
|
+
findings.push(make(stop.element, 'ngbr/tab-order-mismatch', 'moderate', `Tab order jumps backwards here: Tab reaches this control (stop ${stop.order}) after ` +
|
|
138
|
+
`one that sits below it or to its right, so focus moves against the reading order. ` +
|
|
139
|
+
`Heuristic — check the order makes sense to a sighted keyboard user.`, `${RULE_DOCS}/tab-order-mismatch`));
|
|
139
140
|
}
|
|
140
141
|
return findings;
|
|
141
142
|
}
|
package/dist/overlay.js
CHANGED
|
@@ -38,6 +38,12 @@ export function createOverlay(options = {}) {
|
|
|
38
38
|
const doc = options.document ?? document;
|
|
39
39
|
const container = doc.createElement('div');
|
|
40
40
|
container.setAttribute(OVERLAY_ATTR, '');
|
|
41
|
+
// The highlights, badges and preview panel are a visual aid for sighted
|
|
42
|
+
// developers. Hide them from assistive tech so their text (rule ids, tab
|
|
43
|
+
// numbers, panel rows) doesn't pollute the page's own accessibility tree. The
|
|
44
|
+
// on/off pill lives in a separate layer and stays exposed. Nothing in here is
|
|
45
|
+
// focusable, so this can't create an aria-hidden focus trap.
|
|
46
|
+
container.setAttribute('aria-hidden', 'true');
|
|
41
47
|
Object.assign(container.style, {
|
|
42
48
|
position: 'fixed',
|
|
43
49
|
inset: '0',
|
package/dist/report/format.d.ts
CHANGED
|
@@ -24,6 +24,20 @@ export interface PageReport {
|
|
|
24
24
|
}
|
|
25
25
|
/** One-line explanation for a dark-only page, shared by the Markdown and HTML reports. */
|
|
26
26
|
export declare const DARK_ONLY_NOTE = "Dark mode: lists only issues that don\u2019t also appear in light mode on this route.";
|
|
27
|
+
/**
|
|
28
|
+
* Report title, shared by every format. Says "automated scan" on purpose: a file
|
|
29
|
+
* titled "Accessibility report" is easy to hand to procurement as if it were a
|
|
30
|
+
* conformance report.
|
|
31
|
+
*/
|
|
32
|
+
export declare const REPORT_TITLE = "Automated accessibility scan";
|
|
33
|
+
/** Docs page explaining what automated checks cover and what they can't. */
|
|
34
|
+
export declare const COVERAGE_URL = "https://ngbracket.com/tools/a11y-devtools/docs/coverage";
|
|
35
|
+
/**
|
|
36
|
+
* What the report is and isn't, shown under the title in every format (and as
|
|
37
|
+
* `scope` in JSON). Automated checks cover part of WCAG; a clean run is not a
|
|
38
|
+
* conformance claim, and a VPAT/ACR needs a person to judge every criterion.
|
|
39
|
+
*/
|
|
40
|
+
export declare const REPORT_SCOPE_NOTE: string;
|
|
27
41
|
/** A whole report-mode run across one or more pages. */
|
|
28
42
|
export interface ScanReport {
|
|
29
43
|
/** ISO timestamp of the run. */
|
package/dist/report/format.js
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
/** One-line explanation for a dark-only page, shared by the Markdown and HTML reports. */
|
|
2
2
|
export const DARK_ONLY_NOTE = 'Dark mode: lists only issues that don’t also appear in light mode on this route.';
|
|
3
|
+
/**
|
|
4
|
+
* Report title, shared by every format. Says "automated scan" on purpose: a file
|
|
5
|
+
* titled "Accessibility report" is easy to hand to procurement as if it were a
|
|
6
|
+
* conformance report.
|
|
7
|
+
*/
|
|
8
|
+
export const REPORT_TITLE = 'Automated accessibility scan';
|
|
9
|
+
/** Docs page explaining what automated checks cover and what they can't. */
|
|
10
|
+
export const COVERAGE_URL = 'https://ngbracket.com/tools/a11y-devtools/docs/coverage';
|
|
11
|
+
/**
|
|
12
|
+
* What the report is and isn't, shown under the title in every format (and as
|
|
13
|
+
* `scope` in JSON). Automated checks cover part of WCAG; a clean run is not a
|
|
14
|
+
* conformance claim, and a VPAT/ACR needs a person to judge every criterion.
|
|
15
|
+
*/
|
|
16
|
+
export const REPORT_SCOPE_NOTE = 'Automated checks cover only part of WCAG. This is not a conformance report or a VPAT/ACR: ' +
|
|
17
|
+
'manual keyboard, screen-reader and content review is still required.';
|
|
3
18
|
/**
|
|
4
19
|
* Group findings by the component that rendered them — the readable form the
|
|
5
20
|
* attribution makes possible ("♿ HeaderComponent — 2 issues" beats a list of
|
|
@@ -43,6 +58,7 @@ export function toJson(report, diff) {
|
|
|
43
58
|
const all = report.pages.flatMap((p) => p.findings);
|
|
44
59
|
return JSON.stringify({
|
|
45
60
|
generatedAt: report.generatedAt,
|
|
61
|
+
scope: `${REPORT_SCOPE_NOTE} ${COVERAGE_URL}`,
|
|
46
62
|
summary: {
|
|
47
63
|
pages: report.pages.length,
|
|
48
64
|
distinctRules: distinctRuleCount(all),
|
|
@@ -91,10 +107,12 @@ export function addedBySeverity(diff) {
|
|
|
91
107
|
export function toMarkdown(report, diff) {
|
|
92
108
|
const all = report.pages.flatMap((p) => p.findings);
|
|
93
109
|
const lines = [];
|
|
94
|
-
lines.push(
|
|
110
|
+
lines.push(`# ${REPORT_TITLE}`);
|
|
95
111
|
lines.push('');
|
|
96
112
|
lines.push(`_Generated ${report.generatedAt} · @ngbracket/a11y-devtools report-mode_`);
|
|
97
113
|
lines.push('');
|
|
114
|
+
lines.push(`> ${REPORT_SCOPE_NOTE} [What automated checks cover](${COVERAGE_URL}).`);
|
|
115
|
+
lines.push('');
|
|
98
116
|
// Summary table — distinct rules alongside raw node-instances, so the headline
|
|
99
117
|
// count can't be read as "how bad is it" on its own.
|
|
100
118
|
lines.push('## Summary');
|
|
@@ -131,7 +149,7 @@ export function toMarkdown(report, diff) {
|
|
|
131
149
|
continue;
|
|
132
150
|
}
|
|
133
151
|
if (page.findings.length === 0) {
|
|
134
|
-
lines.push('No violations found. ✅');
|
|
152
|
+
lines.push('No automated violations found. ✅');
|
|
135
153
|
lines.push('');
|
|
136
154
|
continue;
|
|
137
155
|
}
|
package/dist/report/html.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { addedBySeverity, DARK_ONLY_NOTE, bySeverity, distinctRuleCount, groupByComponent, viaNames, } from './format.js';
|
|
1
|
+
import { addedBySeverity, COVERAGE_URL, DARK_ONLY_NOTE, REPORT_SCOPE_NOTE, REPORT_TITLE, bySeverity, distinctRuleCount, groupByComponent, viaNames, } from './format.js';
|
|
2
2
|
/**
|
|
3
3
|
* A single self-contained HTML report: inline CSS, no scripts, no external
|
|
4
4
|
* requests — so it can be attached to a CI run, emailed, or opened offline.
|
|
@@ -46,7 +46,9 @@ main { max-width: 960px; margin: 0 auto; padding: 32px 16px 64px; }
|
|
|
46
46
|
h1 { font-size: 1.6rem; margin: 0 0 4px; }
|
|
47
47
|
h2 { font-size: 1.25rem; margin: 40px 0 12px; padding-top: 16px; border-top: 1px solid var(--line); }
|
|
48
48
|
h3 { font-size: 1.05rem; margin: 0 0 4px; }
|
|
49
|
-
.meta { color: var(--muted); margin: 0 0
|
|
49
|
+
.meta { color: var(--muted); margin: 0 0 12px; }
|
|
50
|
+
.scope { background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
|
|
51
|
+
margin: 0 0 24px; padding: 10px 14px; }
|
|
50
52
|
a { color: var(--link); }
|
|
51
53
|
code { font: 0.9em/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
|
|
52
54
|
table { border-collapse: collapse; width: 100%; margin: 8px 0 16px; }
|
|
@@ -85,13 +87,14 @@ export function toHtml(report, diff) {
|
|
|
85
87
|
out.push('<head>');
|
|
86
88
|
out.push('<meta charset="utf-8">');
|
|
87
89
|
out.push('<meta name="viewport" content="width=device-width, initial-scale=1">');
|
|
88
|
-
out.push(
|
|
90
|
+
out.push(`<title>${REPORT_TITLE}</title>`);
|
|
89
91
|
out.push(`<style>${STYLES}</style>`);
|
|
90
92
|
out.push('</head>');
|
|
91
93
|
out.push('<body>');
|
|
92
94
|
out.push('<main>');
|
|
93
|
-
out.push(
|
|
95
|
+
out.push(`<h1>${REPORT_TITLE}</h1>`);
|
|
94
96
|
out.push(`<p class="meta">Generated <time datetime="${escapeHtml(report.generatedAt)}">${escapeHtml(report.generatedAt)}</time> · @ngbracket/a11y-devtools report-mode</p>`);
|
|
97
|
+
out.push(`<p class="scope">${escapeHtml(REPORT_SCOPE_NOTE)} <a href="${COVERAGE_URL}">What automated checks cover</a>.</p>`);
|
|
95
98
|
// Summary — distinct rules next to raw node-instances, so the bigger number
|
|
96
99
|
// can't be read on its own as "how bad is it".
|
|
97
100
|
out.push('<section aria-labelledby="summary">');
|
|
@@ -131,7 +134,7 @@ export function toHtml(report, diff) {
|
|
|
131
134
|
return;
|
|
132
135
|
}
|
|
133
136
|
if (page.findings.length === 0) {
|
|
134
|
-
out.push('<p class="ok">No violations found.</p>');
|
|
137
|
+
out.push('<p class="ok">No automated violations found.</p>');
|
|
135
138
|
out.push('</section>');
|
|
136
139
|
return;
|
|
137
140
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngbracket/a11y-devtools",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.3",
|
|
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",
|