dequelabs / axrl

Accessibility Reporting Language
https://dequelabs.github.com/axrl/
9 stars 3 forks source link

Why allow Text and Remediation on `remediation` #8

Open WilcoFiers opened 5 years ago

WilcoFiers commented 5 years ago

Feedback from Peter Durham:

Seems strange that remediation property of TestFailure can either be a Remediation (with a text property) or just text. Is this intended to cover the case of a failure having only one solution?

WilcoFiers commented 5 years ago

The main reason is to allow both structured remediation messages, as well as allowing more of a "free form" style remediation message. I expect the former will be commonly produced by tools, and the latter will be written by people testing a site.

{
  "remediation": {
    "@typ": "Remediation",
    "solutions": [
      "Add an aria-label attribute",
      "Add an aria-labelledby attribute",
      "Add a title attribute"
    ]
}
{
  "remediation": "Add an aria-label, aria-labelledby or title attribute"
}