Closed careyestes closed 1 year ago
Hi @careyestes!
I'm not sure what documentation you're following. pa11y-reporter-html
is a reporter that comes with pa11y
by default, and it doesn't require to be installed separately.
pa11y-ci-reporter-html
is a reporter for pa11y-ci
(and not pa11y
), developed by @aarongoldenthal. You should have a look at it's readme and try to follow the instructions to run it:
https://gitlab.com/gitlab-ci-utils/pa11y-ci-reporter-html/-/blob/master/README.md
If you find any problems with pa11y-ci
, feel free to create a new issue, and include the commands that you've run, and the output shown by the tools, and we'll be happy to have a look.
If you're having problems with pa11y-ci-reporter-html
I would suggest so create an issue in its repo.
Thank you!
To answer
I'm not sure what documentation you're following.
I am following the documentation in the repo connected to this issue board: https://github.com/pa11y/pa11y-ci#reporters which says to use pa11y-reporter-html
.
If you find any problems with pa11y-ci, feel free to create a new issue, and include the commands that you've run, and the output shown by the tools, and we'll be happy to have a look.
The command I am running is: pa11y-ci https://pa11y.org/
and my config looks like this:
{
"defaults": {
"timeout": 10000,
"standard": "WCAG2AA",
"runners": ["axe"],
"reporters": [
["json", { "fileName": "./www/a11y-reports/json/results.json" }],
[
"pa11y-ci-reporter-html",
{ "destination": "./www/a11y-reports/html", "includeZeroIssues": true }
],
"pa11y-reporter-html"
]
}
}
I have tried both reporters as I mentioned. Both throw the same Unable to load reporter
error. Now if this is an issue with the pa11y-ci-reporter-html
package, then I will be happy to post it there, but I have no way of knowing that. Just want to confirm I am posting the issue in the repo for the pa11y-ci
package. The comment about where I was following the documentation threw me a bit.
@careyestes That config ran fine for me. That message is pa11y-ci trying to load the reporter and failing (it tries to require
the module name, and if that fails tries to load as a filename, so it's not finding the reporter packages). Are pa11y-ci and the reporters installed globally/locally (it shouldn't make a difference, but just trying to replicate)? If you run npm list pa11y-ci-reporter-html
does it show the reporter listed?
On pa11y-reporter-html
, I expect it's probably not what you want. The output for the pa11y reporters is currently not output by pa11y-ci per https://github.com/pa11y/pa11y-ci/issues/174. The pa11y-ci-reporter-html
reporter will generate an equivalent HTML report per page.
@aarongoldenthal Ive got pally-ci
installed globally. pa11y-ci-reporter-html
is installed locally. If I run the list command I get:
└── pa11y-ci-reporter-html@6.0.0
It was my assumption that the ci reporter was the one I should use, but the documentation says use pa11y-reporter-html
, so I was following those directions. It seems unlikely, but could the issue be because I have both pa11y-reporter-html
and pa11y-ci-reporter-html
installed locally? I will also try to install the reporter globally and see if it runs.
The local installation was the issue. You must have both pa11y-ci
and pa11y-ci-reporter-html
installed globally. The documentation should be updated.
Thanks @careyestes, a couple of people have reported a similar issue, and this may be the cause (didn't hear back on the others). I did check and both global or both local work, the mix is the problem.
Based on the documentation, I installed the
pa11y-reporter-html
package. When running from CLI, as well as, the .pa11yci configuration, I getUnable to load reporter "pa11y-reporter-html"
I also installed
pa11y-ci-reporter-html
and get the same issue:Unable to load reporter "pa11y-ci-reporter-html"
I can get results with json and CLI output. Is there something broken with the html reporters?