Skip to content
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

[reporter-cli] Feature request: add runner to the reporter’s output for each issue #632

Open
thibaudcolas opened this issue Apr 27, 2020 · 2 comments

Comments

@thibaudcolas
Copy link

Now that Pa11y supports Axe, most of the times I use it with both the axe and htmlcs runners. This is generally a big plus for me, as both tools have their strengths – but one drawback is that it’s not always clear in the output which runner is responsible for each reported issue.

For example:

 • Error: Elements must have sufficient color contrast (https://dequeuniversity.com/rules/axe/3.5/color-contrast?application=axeAPI)
   ├── color-contrast
   ├── #main-content > div > div > h2
   └── <h2 class="highlighted-content__title heading heading--xl">Help test our new website</h2>

 • Error: This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 1.98:1. Recommendation:  change text colour to #5d8200.
   ├── WCAG2AAA.Principle1.Guideline1_4.1_4_6.G18.Fail
   ├── #main-content > div > div > h2
   └── <h2 class="highlighted-content__title heading heading--xl">Help test our new website</h2>

Comparing these two items, I know both tools fairly well so I can infer which is which based on the error code’s contents, and the fact that Axe has a Deque URL in its error message. However it takes quite a bit of mental effort to do this over the tens/hundreds of errors I’ll look at while using Pa11y, and it breaks down quickly as you add more runners (not there yet but I’d like to!).

How about adding the runner to the error code instead?

 • Error: Elements must have sufficient color contrast (https://dequeuniversity.com/rules/axe/3.5/color-contrast?application=axeAPI)
   ├── axe: color-contrast
   ├── #main-content > div > div > h2
   └── <h2 class="highlighted-content__title heading heading--xl">Help test our new website</h2>

 • Error: This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 1.98:1. Recommendation:  change text colour to #5d8200.
   ├── htmlcs: WCAG2AAA.Principle1.Guideline1_4.1_4_6.G18.Fail
   ├── #main-content > div > div > h2
   └── <h2 class="highlighted-content__title heading heading--xl">Help test our new website</h2>
@josebolos
Copy link
Member

Thanks for creating this issue, this is an excellent idea!

thibaudcolas referenced this issue in thibaudcolas/pa11y-reporter-cli May 12, 2020
Sample output:

 • Error: Heading levels should only increase by one (https://dequeuniversity.com/rules/axe/3.5/heading-order?application=axeAPI)
   ├── axe: heading-order
   ├── #pa11y-1
   └── <h3 id="pa11y-1"><a href="https://github.com/pa1...</h3>

[…]

 • Error: The heading structure is not logically nested. This h3 element should be an h2 to be properly nested.
   ├── htmlcs: WCAG2AAA.Principle1.Guideline1_3.1_3_1_AAA.G141
   ├── #pa11y-1
   └── <h3 id="pa11y-1"><a href="https://github.com/pa1...</h3>
@thibaudcolas
Copy link
Author

Thanks @josebolos, I gave it a go in pa11y/pa11y-reporter-cli#12, and also stumbled upon pa11y/pa11y-reporter-cli#11 along the way.

@josebolos josebolos transferred this issue from pa11y/pa11y-reporter-cli Mar 31, 2022
@josebolos josebolos changed the title Feature request: add runner to the reporter’s output for each issue [reporter-cli] Feature request: add runner to the reporter’s output for each issue Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants