{"action":"opened","issue":{"url":"https://api.github.com/repos/addyosmani/a11y/issues/41","labels_url":"https://api.github.com/repos/addyosmani/a11y/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/addyosmani/a11y/issues/41/comments","events_url":"https://api.github.com/repos/addyosmani/a11y/issues/41/events","html_url":"https://github.com/addyosmani/a11y/issues/41","id":95069946,"number":41,"title":"Show total number of elements violating a rule","user":{"login":"kennyw12","id":1689040,"avatar_url":"https://avatars.githubusercontent.com/u/1689040?v=3","gravatar_id":"","url":"https://api.github.com/users/kennyw12","html_url":"https://github.com/kennyw12","followers_url":"https://api.github.com/users/kennyw12/followers","following_url":"https://api.github.com/users/kennyw12/following{/other_user}","gists_url":"https://api.github.com/users/kennyw12/gists{/gist_id}","starred_url":"https://api.github.com/users/kennyw12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kennyw12/subscriptions","organizations_url":"https://api.github.com/users/kennyw12/orgs","repos_url":"https://api.github.com/users/kennyw12/repos","events_url":"https://api.github.com/users/kennyw12/events{/privacy}","received_events_url":"https://api.github.com/users/kennyw12/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-15T00:02:53Z","updated_at":"2015-07-15T00:02:53Z","closed_at":null,"body":"Somewhat related to #40 \r\n\r\nRight now, the results look like there are only 5 elements violation a given rule, and it is a bit misleading.\r\n\r\n```\r\n  ✖ Images should have an alt attribute\r\n\r\n  body > .container.ptl > .content > DIV:nth-of-type(2) > .exampleOutput > .gravatar.gravatar-sm > IMG\r\n  body > .container.ptl > .content > DIV:nth-of-type(2) > .exampleOutput > DIV:nth-of-type(2) > IMG\r\n  body > .container.ptl > .content > DIV:nth-of-type(3) > .exampleOutput > .gravatar.gravatar-sm > IMG\r\n  body > .container.ptl > .content > DIV:nth-of-type(3) > .exampleOutput > .gravatar.gravatar-sm.mlxl > IMG\r\n  body > .container.ptl > .content > DIV:nth-of-type(3) > .exampleOutput > DIV:nth-of-type(3) > IMG\r\n```\r\n\r\nThe 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.\r\n\r\n```\r\n  ✖ Images should have an alt attribute (1 -5 of 30)\r\n...\r\n```\r\n\r\nSimilarly, the API could have a numElements property\r\n\r\n```js\r\n{\r\n  elements: '\\nbody > .container.ptl > .content > .section-nav > LI > A\\n...',\r\n  numElements: 30,\r\n  heading: 'Text elements should have a reasonable contrast ratio',\r\n  result: 'FAIL',\r\n  severity: 'Warning' \r\n}\r\n```\r\n\r\nWould you be open to a PR?\r\n\r\ncc/ @gpleiss, @matt-royal, @stubbornella, @ctaymor"}}