dequelabs / axe-core

Accessibility engine for automated Web UI testing
https://www.deque.com/axe/
Mozilla Public License 2.0
5.98k stars 776 forks source link

Confused about tags being included in this report #320

Closed jaimeiniesta closed 7 years ago

jaimeiniesta commented 7 years ago

axe https://decide.madrid.es/participatory_budget --save decide.json

Will return the following JSON:

[
  {
    "violations": [
      {
        "id": "document-title",
        "impact": "moderate",
        "tags": [
          "cat.text-alternatives",
          "wcag2a",
          "wcag242"
        ],
        "description": "Ensures each HTML document contains a non-empty <title> element",
        "help": "Documents must have <title> element to aid in navigation",
        "helpUrl": "https://dequeuniversity.com/rules/axe/2.2/document-title?application=webdriverjs",
        "nodes": [
          {
            "any": [
              {
                "id": "doc-has-title",
                "data": null,
                "relatedNodes": [],
                "impact": "moderate",
                "message": "Document does not have a non-empty <title> element"
              }
            ],
            "all": [],
            "none": [],
            "impact": "moderate",
            "html": "<html class=\"deque-axe-is-ready\">",
            "target": [
              ".deque-axe-is-ready"
            ]
          }
        ]
      },
      {
        "id": "html-has-lang",
        "impact": "serious",
        "tags": [
          "cat.language",
          "wcag2a",
          "wcag311"
        ],
        "description": "Ensures every HTML document has a lang attribute",
        "help": "<html> element must have a lang attribute",
        "helpUrl": "https://dequeuniversity.com/rules/axe/2.2/html-has-lang?application=webdriverjs",
        "nodes": [
          {
            "any": [
              {
                "id": "has-lang",
                "data": null,
                "relatedNodes": [],
                "impact": "serious",
                "message": "The <html> element does not have a lang attribute"
              }
            ],
            "all": [],
            "none": [],
            "impact": "serious",
            "html": "<html class=\"deque-axe-is-ready\">",
            "target": [
              ".deque-axe-is-ready"
            ]
          }
        ]
      }
    ],
    "passes": [],
    "incomplete": [],
    "inapplicable": [],
    "timestamp": "2017-04-29T21:48:08.398Z",
    "url": "about:blank"
  }
]

Is it a bug that cat.text-alternatives and cat.language are being included in the tags? I thought the tags would only refer to the rules being applied.

marcysutton commented 7 years ago

That is not a bug; those are for our internal software. You can disregard those tags.

dylanb commented 7 years ago

@jaimeiniesta you could also use the tags yourself. They are simply categories into which the different rules belong so that you can sort the issues by category. It should be quite straightforward to understand what these categories mean.

If you want to submit a documentation PR to document these that would be appreciated because we had not planned to do that in the short term.

jaimeiniesta commented 7 years ago

@dylanb I see that these cat.* tags are not being shown on the results by the Chrome extension:

captura de pantalla 2017-05-02 14 33 54

But if I check the raw results by axe-core I do see they're included (cat.forms) in this case.

So to keep our Rocket Validator integration in tune with the Chrome extension, I think it will be best to hide the cat.* tags by now.

I would document this but I'm not sure I fully understand the topic :) I mean, if as @marcysutton says these are only used for your internal software, then it's OK to not document them, I guess.

WilcoFiers commented 7 years ago

@jaimeiniesta They aren't in there yet because we haven't updated the extensions yet. I think Marcy is doing that this week.

jaimeiniesta commented 7 years ago

@WilcoFiers, ah, cool, then they don't need to be hidden, they're going to be public. Then yes, we do need to document what they are :)