-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation and code mismatch when using sitemap and config #229
Comments
Here's a potential solution with a test case |
In looks like the README was changed in a documentation cleanup between v3.0.1 and v3.1.0 here: - This takes the text content of each `<loc>` in the XML and runs Pa11y against that URL.
- This can also be combined with a config file, but URLs in the sitemap will override any
- found in your JSON config.
+ Pa11y will be run against the text content of each `<loc/>` in the sitemap's XML.
+
+ > NOTE
+ > Providing a sitemap will cause the `urls` property in your JSON config to be ignored. The code actually doesn't behave either way - it analyzes both (using any other specified config that's available for that case). If specified from the CLI as well it will add a third. I would advocate leaving the behavior as-is and cleaning up the documentation, but if a change is made then I would think the opposite is more beneficial - the config |
That's a good finding from the history! As I mentioned in the first message, I'm not sure if the docs or code is correct. Cleaning up the documentation makes sense and it'll remove the confusion between the two |
Hi both and thank you, including for the extremely helpful repo and test case @mkotamies, and your additional understanding and information @aarongoldenthal.
I agree that while the current behaviour of loading exact duplicates isn't ideal, it does solve the problem of 'overrides' that you've described when the accompanying settings vary. I've moved this into |
pa11y-ci Github page has following note:
Providing a sitemap will cause the urls property in your JSON config to be ignored.
Looks like the statement is incorrect. Providing sitemap as a parameter and having config with uurls, actually includes the urls in the test.Here is example repo with instructions to replicate the problem.
At the moment, there isn't a test case with config and sitemap. Add the following test to
cli-sitemap.test.js
and the test will fail.I'm not sure if the documentation or code is correct. My assumption is that the documentation is correct
The text was updated successfully, but these errors were encountered: