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
chore: update test cases with context #344
Conversation
"@id": "earl:inapplicable" | ||
}, | ||
"ruleId": "https://schema.org/identifier", | ||
"rulePage": "https://schema.org/URL" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This somehow has to map to a tcdl:rule
with an xlink:href
attirbute. It may be that the output will have to be adjusted slightly for that to work though, e.g.:
{
"@context": {
"rule": {
"@id": "tcdl:rule"
},
"ruleUrl": "xlink:href"
},
"a11y-testcases": [
{
...
"rule": {
"ruleUrl": "https://auto-wcag.github.io/auto-wcag/rules/..."
},
...
}
]
}
@nitedog Might you have any idea if this can be done in a less verbose manner?
"@id": "tcdl:testCaseDescription", | ||
"@container": "@list" | ||
}, | ||
"url": "https://schema.org/URL", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This somehow has to map to a tcdl:file
with an xlink:href
attirbute. It may be that the output will have to be adjusted slightly for that to work though, e.g.:
{
"@context": {
"file": {
"@id": "tcdl:file"
},
"fileUrl": "xlink:href"
},
"a11y-testcases": [
{
...
"file": {
"fileUrl": "https://auto-wcag.github.io/auto-wcag/rules/..."
},
...
}
]
}
@nitedog Might you have any idea if this can be done in a less verbose manner?
@nitedog - could you offer your opinion on this, before we make further changes. |
@kasperisager @JKODU while I appreciate reusing vocabulary, I think we are hardly using TCDL at all, so I'm not sure if adding the mappings actually helps. For example, modelling tcdl:rule and tcdl:file does not seem to make us any more aligned with TCDL, given that we do not use any of the other required parts. I'm not sure how to best do vocabulary mappings, especially since are kind of cherry-picking anyway. |
I do see your point @nitedog. I've made an attempt at making a full JSON serialization of a test case described in TCDL and am faced with the issue that the TCDL vocabulary serializes very poorly to JSON. The primary cause seems to be the fact that TCDL defines almost every term as an element type rather than an attribute which leads to very convoluted JSON. TCDL also defines a lot of required terms, many of which I don't really see the reason for being required. I'd love for us to rely on open data formats for talking to the outside world (testers, implementers, etc.) but if doing so introduces immense verbosity then I don't think the benefit outweighs the cost. Thoughts? |
I am of the opinion that this overkill for exposing the test cases. The test cases have further been trimmed down now to not include selectors etc - https://auto-wcag.github.io/auto-wcag/auto-wcag-testcases/testcases.json I would prefer to keep this as is, and if need arises work towards adding @context for transformation to TCDL on a later date. Closing this PR. |
This PR handles adding JSON-LD(ish) context to test cases.
An example output is as below:
Closes issue: #333
Guidance for the PR (pull request) creator
When creating PR:
After creating PR:
Rule
,Definition
orChore
(more to the administrative side)How to Review And Approve