w3c / wai-wcag-em-report-tool

2021 redesign of the WCAG-EM Report Tool
https://w3.org/WAI/eval/report-tool
Other
61 stars 51 forks source link

JSON file references wrong wcag version #142

Closed minordemon closed 8 months ago

minordemon commented 8 months ago

When I select WCAG2.1 and save the report as JSON 'auditSample / test / id' references the WCAG2.0 id. 'WCAG20:text-equiv-all' instead of 'WCAG21:non-text-content'.

To Reproduce Steps to reproduce the behavior:

  1. Either import the included JSON file, or create a new report and fill in one 'observation' and 'WCAG 2.1' or 'WCAG 2.2'
  2. Download Report (JSON)
  3. Check JSON file. (find your comment and check the id)

Expected behavior The id should be from the chosen WCAG version.

JSON excerpt

{
    "type": "Assertion",
    "date": "2023-12-28T13:01:14.981Z",
    "mode": { "type": "TestMode", "@value": "earl:manual" },
    "result": {
    "type": "TestResult",
    "date": "2023-12-28T12:56:11.607Z",
    "description": "**This should be: Non-text Content wcag2.1**",
    "outcome": {
        "id": "earl:failed",
        "type": ["OutcomeValue", "Fail"],
        "title": "Failed"
    }
    },
    "subject": {
    "id": "_:subject_1",
    "type": ["TestSubject", "Website"],
    "date": "2023-12-28T12:54:52.420Z",
    "description": "",
    "title": "Test"
    },
    "test": {
    "id": "WCAG20:text-equiv-all",
    "type": ["TestCriterion", "TestRequirement"],
    "date": "2023-12-28T12:54:52.421Z"
    }
},

Desktop (please complete the following information):

Additional context

Test file: test-evaluation.json

BartCardan commented 8 months ago

I am experiencing the same issue. Please make sure the id is correct for the corresponding version.

As ids are changed at this moment other systems relying on the JSON need new mapping.

iadawn commented 8 months ago

@minordemon Thanks for the spot, should be addressed with latest release. If there are any problems, please reopen this issue and we will take another look at things.

Huge thanks to @mhansma96 for the fix