addyosmani / a11y

Accessibility audit tooling for the web (beta)
http://addyosmani.github.io/a11y/
Apache License 2.0
1.71k stars 76 forks source link

Configure number of elements per rule #40

Closed kennyw12 closed 9 years ago

kennyw12 commented 9 years ago

Right now, the elements property of each audit result only contains the first 5 elements failing that rule. E.g.

  ✖ Images should have an alt attribute

  body > .container.ptl > .content > DIV:nth-of-type(2) > .exampleOutput > .gravatar.gravatar-sm > IMG
  body > .container.ptl > .content > DIV:nth-of-type(2) > .exampleOutput > DIV:nth-of-type(2) > IMG
  body > .container.ptl > .content > DIV:nth-of-type(3) > .exampleOutput > .gravatar.gravatar-sm > IMG
  body > .container.ptl > .content > DIV:nth-of-type(3) > .exampleOutput > .gravatar.gravatar-sm.mlxl > IMG
  body > .container.ptl > .content > DIV:nth-of-type(3) > .exampleOutput > DIV:nth-of-type(3) > IMG

We would like to not be limited by only seeing 5 elements. It would be cool if we could configure the max-number of elements displayed. E.g.

ally <url> --elements-per-rule=<count>

or

a11y(page, {elementsPerRule: 10}, function (err, reports) {
  /* ... */
});

Would you be open to a PR?

cc/ @gpleiss @matt-royal @stubbornella @ctaymor

addyosmani commented 9 years ago

Post https://github.com/addyosmani/a11y/pull/43, is the outstanding request here to continue improving the configurability of total number of elements per rule displayed?

ctaymor commented 9 years ago

Hi @addyosmani, I'm on the same team as @kennyw12. #43 meets our team's needs and this issue can now be closed.

Thanks! The Pivotal UI Team @atomanyih @ctaymor @gpleiss @kennyw12 @matt-royal @stubbornella