@ngbracket/a11y-devtools 0.18.2 → 0.18.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 +13 -0
- package/dist/report/headless.js +8 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
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.18.3
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
|
|
10
|
+
- Report mode now scans pages served with a strict Content-Security-Policy or
|
|
11
|
+
Trusted Types. The scan runs as an injected script, which a policy such as
|
|
12
|
+
`script-src 'self'` or `require-trusted-types-for 'script'` blocked, so the
|
|
13
|
+
page was reported as an error with no findings. The scanning browser now
|
|
14
|
+
ignores the page's CSP, whether it comes from a header or a `<meta>` tag.
|
|
15
|
+
Your app's policy is unchanged. Because the scan runs without the policy,
|
|
16
|
+
anything the policy would block for real users (a web font, an inline style)
|
|
17
|
+
loads during the scan, so a problem caused by the CSP itself isn't reported.
|
|
18
|
+
|
|
6
19
|
## 0.18.2
|
|
7
20
|
|
|
8
21
|
### Fixed
|
package/dist/report/headless.js
CHANGED
|
@@ -72,7 +72,14 @@ const HIDE_OVERLAY_CSS = `${OVERLAY_EXCLUDE_SELECTOR} { display: none !important
|
|
|
72
72
|
/** Scan every route in one colour scheme, in its own browser context. */
|
|
73
73
|
async function scanPass(browser, colorScheme, config) {
|
|
74
74
|
const { baseUrl, routes, labels, waitMs, axeOptions, inPageScript, frameworkPrefixes } = config;
|
|
75
|
-
|
|
75
|
+
// bypassCSP: the scan runs as an injected inline script (plus a style tag that
|
|
76
|
+
// hides the overlay), which a strict Content-Security-Policy or Trusted Types
|
|
77
|
+
// would block. It only lifts the policy in this scanning browser.
|
|
78
|
+
const context = await browser.newContext({
|
|
79
|
+
viewport: { width: 1280, height: 900 },
|
|
80
|
+
colorScheme,
|
|
81
|
+
bypassCSP: true,
|
|
82
|
+
});
|
|
76
83
|
const pages = [];
|
|
77
84
|
try {
|
|
78
85
|
const page = await context.newPage();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngbracket/a11y-devtools",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.3",
|
|
4
4
|
"description": "Finds accessibility problems in Angular apps and names the component behind each one. A dev overlay, or headless reports for CI.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Duncan Faulkner",
|