forked from ChelseaKR/tods-validate
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpa11y-ci-live.cjs
More file actions
36 lines (33 loc) · 1.22 KB
/
Copy pathpa11y-ci-live.cjs
File metadata and controls
36 lines (33 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"use strict";
// pa11y-ci configuration for the *deployed* playground, as opposed to
// scripts/pa11y-ci.cjs, which audits the repository's copy of web/index.html
// from a temp directory. Both matter and they are not the same artifact: the
// blocking CI gate proves the source is accessible, this one proves the page
// people actually open is. Run by .github/workflows/playground-deployment.yml.
//
// The a11y-static parameter is passed for the same reason the local config
// passes it -- it skips the Pyodide download and renders the page's static
// state. A deployed page that predates that branch simply ignores an unknown
// query parameter and is audited as it loads.
const liveUrl =
process.env.A11Y_LIVE_URL || "https://chelseakr.github.io/tods-validate/index.html";
module.exports = {
defaults: {
runners: ["axe", "htmlcs"],
standard: "WCAG2AA",
timeout: 120000,
viewport: {
width: 1280,
height: 1024
}
},
urls: [
{
url: `${liveUrl}?a11y-static=1`,
// Same reasoning as the local config: the report frame keeps its
// production sandbox, and its rendered contents are audited directly
// by the local gate's report.html run.
hideElements: "#report"
}
]
};