Skip to content
This repository has been archived by the owner on Jul 12, 2020. It is now read-only.

Show total number of elements violating a rule #41

Closed
kennyw12 opened this issue Jul 15, 2015 · 2 comments
Closed

Show total number of elements violating a rule #41

kennyw12 opened this issue Jul 15, 2015 · 2 comments

Comments

@kennyw12
Copy link
Contributor

Somewhat related to #40

Right now, the results look like there are only 5 elements violation a given rule, and it is a bit misleading.

  ✖ 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

The google accessibility audit outputs the total number of elements by each rule (e.g. (1 - 5 of 30)). It would be nice if a11y included this in the output as well.

  ✖ Images should have an alt attribute (1 -5 of 30)
...

Similarly, the API could have a numElements property

{
  elements: '\nbody > .container.ptl > .content > .section-nav > LI > A\n...',
  numElements: 30,
  heading: 'Text elements should have a reasonable contrast ratio',
  result: 'FAIL',
  severity: 'Warning' 
}

Would you be open to a PR?

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

@addyosmani
Copy link
Owner

This should be tackled and in a release as of #43. Is there anything further we need to change here?

@ctaymor
Copy link
Contributor

ctaymor commented Aug 3, 2015

Hi @addyosmani, @matt-royal and I are on the same team as @kennyw12. This meets our team's needs and can now be closed.

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

@kennyw12 kennyw12 closed this as completed Aug 4, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants