You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -78,7 +79,7 @@ You can use the `--config` command line argument to specify a different file, wh
78
79
79
80
Pa11y will be run against each of the URLs in the `urls` array and the paths specified as CLI arguments. Paths can be specified as relative, absolute and as [glob](https://github.com/isaacs/node-glob#glob) patterns.
80
81
81
-
### Default configuration
82
+
####Default configuration
82
83
83
84
You can specify a default set of [pa11y configurations] that should be used for each test run. These should be added to a `defaults` object in your config. For example:
84
85
@@ -103,7 +104,7 @@ Pa11y CI has a few of its own configurations which you can set as well:
103
104
*`concurrency`: The number of tests that should be run in parallel. Defaults to `1`.
104
105
*`useIncognitoBrowserContext`: Run test with an isolated incognito browser context, stops cookies being shared and modified between tests. Defaults to `true`.
105
106
106
-
### URL configuration
107
+
####URL configuration
107
108
108
109
Each URL in your config file can be an object and specify [pa11y configurations] which override the defaults too. You do this by using an object instead of a string, and providing the URL as a `url` property on that object. This can be useful if, for example, you know that a certain URL takes a while to load or you want to check what the page looked like when the tests were run:
109
110
@@ -123,6 +124,26 @@ Each URL in your config file can be an object and specify [pa11y configurations]
123
124
}
124
125
```
125
126
127
+
#### Javascript configuration
128
+
129
+
If a JavaScript configuration file is used, it should be a CommonJS module that exports a configuration object. This can be used to dynamically update configuration parameters, for example taking data from environment variables as shown in the example below.
If you don't wish to specify your URLs in a config file, you can use an XML sitemap that's published somewhere online. This is done with the `--sitemap` option:
0 commit comments