Repository navigation
Commit a90065c
authored
Vendor axe-core, drop the Skypack CDN dependency (#14677)
* Vendor axe-core 4.10.3 as a bundled HTML resource
Pins AXE_JS in configuration and adds a download block to
update-html-dependencies.ts (axe.min.js plus the MPL-2.0 LICENSE and
LICENSE-3RD-PARTY.txt, which must ship alongside it). Files are vendored
byte-for-byte from npm via unpkg; the /*! banner in axe.min.js carries the
required Deque copyright and MPL notice.
* Load vendored axe-core instead of the Skypack CDN
Injects axe.min.js as a classic script ahead of axe-check.js (a deferred
module), so window.axe is set before the checker runs. Replaces the pinned
Skypack dynamic import, making the axe overlay work offline and removing
the CDN request from every reader's browser. Same axe version (4.10.3),
identical scan results.
Also waits for the window load event before the first scan. Deferred
modules run before DOMContentLoaded, but the dashboard layout runs on
DOMContentLoaded and keeps <html> hidden until then, so an immediate scan
sees only hidden elements and reports nothing. The Skypack import's
network latency masked this pre-existing race; removing it exposed the
bug (8 dashboard Playwright tests).1 parent bf9160a commit a90065c
8 files changed
Lines changed: 464 additions & 1 deletion
File tree
- news
- package/src/common
- src
- format/html
- resources/formats/html/axe
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
81 | 87 | | |
82 | 88 | | |
83 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
| |||
0 commit comments