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

Group messages to make reporting less verbose #13

Merged
merged 2 commits into from
Jun 30, 2015
Merged

Conversation

contolini
Copy link
Member

Fixes #8. Groups similar messages onto one line and lists the locations of the first 10 instances. If there are more than 10 instances, it appends plus XXX other locations.

Example output:

$ wcag wikipedia.org

  ✖  2 errors found.

  ✖  Label text is empty. Occurs at 115:1.
  ✖  Select element missing an associated label. Occurs at 117:1.

  ⚠  731 potential problems found.

  ⚠  Label text is empty. Occurs at .
  ⚠  Select element missing an associated label. Occurs at .
  ⚠  Title might not describe the document. Occurs at 6:1.
  ⚠  Dir attribute may be required to identify changes in text direction. Occurs at 20:1.
  ⚠  Text may refer to items by shape, size, or relative position alone. Occurs at 20:1.
  ⚠  Long quotations may not be marked using the blockquote element. Occurs at 20:1.
  ⚠  Unicode right-to-left marks or left-to-right marks may be required. Occurs at 20:1.
  ⚠  Groups of links with a related purpose are not marked. Occurs at 20:1.
  ⚠  Repeated components may not appear in the same relative order each time they appear. Occurs at 20:1.
  ⚠  Site missing site map. Occurs at 20:1.
  ⚠  Visual lists may not be properly marked. Occurs at 20:1.
  ⚠  Document may be missing a skip to content link. Occurs at 20:1.
  ⚠  H1 may be used for formatting. Occurs at 22:1.
  ⚠  Image may contain text that is not in Alt text. Occurs at 23:1, 538:52, 542:50, 546:51, 550:51, 554:50, 558:55, 562:52, 566:53, 570:52 plus 4 other locations.
  ⚠  Alt text is not empty and image may be decorative. Occurs at 23:1, 589:38.
  ⚠  Img has title attribute and image may be decorative. Occurs at 23:1.
  ⚠  Img element may require a long description. Occurs at 23:1, 538:52, 542:50, 546:51, 550:51, 554:50, 558:55, 562:52, 566:53, 570:52 plus 4 other locations.
  ⚠  Alt text does not convey the same information as the image. Occurs at 23:1.
  ⚠  Image may be using color alone. Occurs at 23:1, 538:52, 542:50, 546:51, 550:51, 554:50, 558:55, 562:52, 566:53, 570:52 plus 4 other locations.
  ⚠  Image may contain text with poor contrast. Occurs at 23:1, 538:52, 542:50, 546:51, 550:51, 554:50, 558:55, 562:52, 566:53, 570:52 plus 4 other locations.
  ⚠  Anchor text may not identify the link destination. Occurs at 36:1, 43:1, 50:1, 57:1, 64:1, 71:1, 78:1, 85:1, 92:1, 99:1 plus 304 other locations.
  ⚠  Link text may not be meaningful. Occurs at 36:1, 43:1, 50:1, 57:1, 64:1, 71:1, 78:1, 85:1, 92:1, 99:1 plus 304 other locations.
  ⚠  Form may delete information without allowing for recovery. Occurs at 109:1, 182:1.
  ⚠  All required form fields may not be indicated as required. Occurs at 109:1, 182:1.
  ⚠  Form submission data may not be presented to the user before final acceptance of an irreversable transaction. Occurs at 109:1, 182:1.
  ⚠  Tab order may not follow logical order. Occurs at 109:1, 182:1.
  ⚠  Form submission error messages may not provide assistance. Occurs at 109:1, 182:1.
  ⚠  Form submission error messages may not identify empty required fields. Occurs at 109:1, 182:1.
  ⚠  Label may not describe its associated control. Occurs at 113:1, 172:1, 173:1, 183:1, 184:1, 185:1, 187:1, 188:1.
  ⚠  Input possibly using color alone. Occurs at 115:1, 172:1, 187:1, 188:1.
  ⚠  H2 may be used for formatting. Occurs at 194:1, 215:1, 262:1, 347:1, 464:1.
  ⚠  Script user interface may not be accessible. Occurs at 593:1.
  ⚠  Script may cause screen flicker. Occurs at 593:1.
  ⚠  Script may use color alone. Occurs at 593:1.

@zrrrzzt @wpears

@zrrrzzt
Copy link
Contributor

zrrrzzt commented Jun 29, 2015

LGTM 👍

@wpears
Copy link
Member

wpears commented Jun 29, 2015

What's up with the following lines:

⚠  Label text is empty. Occurs at .

⚠  Select element missing an associated label. Occurs at .

@zrrrzzt
Copy link
Contributor

zrrrzzt commented Jun 29, 2015

Nice catch @wpears I was obviously reading trough this a bit quick

If you look at the top of the report

 ✖  Label text is empty. Occurs at 115:1.
 ✖  Select element missing an associated label. Occurs at 117:1.

and then the rest

 ⚠  731 potential problems found.

 ⚠  Label text is empty. Occurs at .
 ⚠  Select element missing an associated label. Occurs at .

It looks like the errors also appears in the potential problems, but without reference to location

@contolini
Copy link
Member Author

Sheesh, good eye. I'll investigate tomorrow.

wpears added a commit that referenced this pull request Jun 30, 2015
Group messages to make reporting less verbose
@wpears wpears merged commit 9d97e75 into cfpb:master Jun 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants