Skip to content

Commit

Permalink
Content - Input focus a11y assessment and add assets support for a11y…
Browse files Browse the repository at this point in the history
… report (#2288)

Co-authored-by: Garneauma <[email protected]>
  • Loading branch information
duboisp and Garneauma authored Nov 23, 2023
1 parent a0c916f commit 74b26eb
Show file tree
Hide file tree
Showing 8 changed files with 507 additions and 48 deletions.
12 changes: 12 additions & 0 deletions _data/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,18 @@
"language": "fr",
"path": "formulaires.html"
}
],
"reports": [
{
"title": "Accessibility assessment #1 - Input focus",
"language": "en",
"path": "reports/a11y-1-en.html"
},
{
"title": "Évaluation d'accessibilité #1 - Visibilité du focus",
"language": "fr",
"path": "reports/a11y-1-fr.html"
}
]
}
}
Expand Down
2 changes: 2 additions & 0 deletions _data/i18n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ page_group:
impl-ref: Implementation reference
spec: Specification
test: Tests pages
reports: Reports
fr:
examples: Exemples
docs: Documentations
related: Documents relié
test: Pages d'essaie
impl-ref: Référence d'implémentation
spec: Spécification
reports: Rapports

# Status de component
component_status:
Expand Down
12 changes: 12 additions & 0 deletions common/scaffolding/index.json-ld
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@
"language": "fr",
"path": "formulaires.html"
}
],
"reports": [
{
"title": "Accessibility assessment #1 - Input focus",
"language": "en",
"path": "reports/a11y-1-en.html"
},
{
"title": "Évaluation d'accessibilité #1 - Visibilité du focus",
"language": "fr",
"path": "reports/a11y-1-fr.html"
}
]
}
}
11 changes: 11 additions & 0 deletions common/scaffolding/reports/a11y-1-en.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
{
"title": "Accessibility assessment #1 - Input focus",
"language": "en",
"description": "Partial. Evaluation of Success Criteria 1.4.1, Level AA of WCAG 2.1",
"altLangPage": "a11y-1-fr.html",
"dateModified": "2023-11-21",
"layout": "assessment_wrote_en-en",
"reportURL": "a11y-1.json"
}
---
11 changes: 11 additions & 0 deletions common/scaffolding/reports/a11y-1-fr.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
{
"title": "Évaluation d'accessibilité #1 - Visibilité du focus",
"language": "fr",
"description": "Partielle. Évaluation du critère de succès 1.4.1, niveau AA du WCAG 2.1",
"altLangPage": "a11y-1-en.html",
"dateModified": "2023-11-21",
"layout": "assessment_wrote_en-fr",
"reportURL": "a11y-1.json"
}
---
65 changes: 65 additions & 0 deletions common/scaffolding/reports/a11y-1.json

Large diffs are not rendered by default.

221 changes: 197 additions & 24 deletions docs/layouts/assessment_wrote_en-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,31 +57,72 @@ <h2 id="summary">Summary</h2>
<dt>Type</dt>
<dd>Accessibility assessment</dd>
<dt>Asserted by:</dt>
<dd><a data-wb-json='[
{
"url": "#[a11y]/earl:assertedBy/earl:mainAssertor/foaf:homepage",
"type": "attr",
"attr": "href"
},
{
"url": "#[a11y]/earl:assertedBy/earl:mainAssertor/foaf:name",
"type": "replace"
}
]' href="#">Unknown</a> on behalf of <a data-wb-json='[
{
"url": "#[a11y]/earl:assertedBy/foaf:homepage",
"type": "attr",
"attr": "href"
},
{
"url": "#[a11y]/earl:assertedBy/foaf:name",
"type": "replace"
}
<dd>
<div data-wb-json='{
"url": "#[a11y]/earl:assertedBy",
"streamline": true,
"mapping": [
{
"template": "[data-main-assertor]",
"test": "fn:guessType",
"operand": "neq",
"assess": "/earl:mainAssertor",
"expect": "undefined",
"mapping": [
{
"selector": "[data-main]",
"value": "/earl:mainAssertor/foaf:homepage",
"type": "attr",
"attr": "href"
},
{
"selector": "[data-main]",
"value": "/earl:mainAssertor/foaf:name",
"type": "replace"
},
{
"selector": "[data-assertor]",
"value": "/foaf:homepage",
"type": "attr",
"attr": "href"
},
{
"selector": "[data-assertor]",
"value": "/foaf:name",
"type": "replace"
}
]
},
{
"template": "[data-assertor]",
"test": "fn:guessType",
"assess": "/earl:mainAssertor",
"expect": "undefined",
"mapping": [
{
"selector": "[data-assertor]",
"value": "/foaf:homepage",
"type": "attr",
"attr": "href"
},
{
"selector": "[data-assertor]",
"value": "/foaf:name",
"type": "replace"
}
]
}
]' href="#" data-json-replace="#[a11y]/earl:assertedBy/foaf:name">Not Available</a></dd>
]
}'>
<template data-main-assertor>
<a data-main href="#">Unknown</a> on behalf of <a data-assertor href="#">Not Available</a>
</template>
<template data-assertor>
<a data-assertor href="#">Unknown</a>
</template>
</div>
</dd>
<dt>Date:</dt>
<dd data-json-replace="#[a11y]/dct:date">Not Available</dd>
<dt>Subject:</dt>
Expand Down Expand Up @@ -171,6 +212,111 @@ <h2 id="acr">Assessment details</h2>
{ "selector": "[data-result-relevancy]", "value": "/acr:relevancy" },
{ "selector": "[data-result-notes", "value": "/dct:description" }
]
},
{
"@type": "rdf:Alt",
"mapping": [
{
"test": "fn:isLiteral",
"assess": "/acr:asset",
"mapping": [
{
"@type": "rdf:Alt",
"mapping": [
{
"template": "[data-asset-literal]",
"test": "fn:guessType",
"value": "/acr:asset",
"expect": "xsd:anyURI",
"mapping": [
{ "selector": "a", "value": "/acr:asset", "attr": "href" }
]
},
{
"template": "[data-asset-code]",
"test": "fn:guessType",
"value": "/acr:asset",
"expect": "xsd:string",
"mapping": [
{ "selector": "code", "value": "/acr:asset" }
]
}
]
}
]
},
{
"template": "[data-asset-image]",
"test": "fn:guessType",
"assess": "/acr:asset",
"expect": "acr:AttachmentImage",
"mapping": [
{ "selector": "img", "value": "/acr:asset/acr:content/@value", "attr": "src" },
{ "selector": "a", "value": "/acr:asset/acr:content/@value", "attr": "href" },
{ "selector": "img", "value": "/acr:asset/dct:title", "attr": "alt" }
]
},
{
"template": "[data-asset-literal]",
"test": "fn:guessType",
"value": "/acr:asset",
"expect": "xsd:anyURI",
"mapping": [
{ "selector": "a", "value": "/acr:asset", "attr": "href" }
]
},
{
"template": "[data-asset-code]",
"test": "fn:guessType",
"value": "/acr:asset",
"expect": "xsd:string",
"mapping": [
{ "selector": "code", "value": "/acr:asset" }
]
},
{
"about": "When the value is an array of items",
"template": "[data-asset-array]",
"test": "fn:isArray",
"value": "/acr:asset",
"mapping": [
{
"template": "[data-download-link]",
"test": "fn:guessType",
"value": "/",
"expect": "xsd:anyURI",
"append": true,
"mapping": [
{ "selector": "a", "value": "/@value", "attr": "href" }
]
},
{
"template": "[data-source-code]",
"test": "fn:guessType",
"value": "/",
"expect": "xsd:string",
"append": true,
"mapping": [
{ "selector": "code", "value": "/@value" }
]
},
{
"template": "[data-asset-image]",
"test": "fn:guessType",
"value": "/",
"expect": "acr:AttachmentImage",
"append": true,
"mapping": [
{ "selector": "img", "value": "/acr:content/@value", "attr": "src" },
{ "selector": "a", "value": "/acr:content/@value", "attr": "href" },
{ "selector": "img", "value": "/dct:title", "attr": "alt" }
]
}
]
}
]
}
]
}'>
Expand All @@ -190,6 +336,33 @@ <h2 id="acr">Assessment details</h2>
<li class="pull-right clr-rght-md clr-rght-lg">Relevance: <span data-relevancy>Not specified</span></li>
</ul>
<p data-notes></p>
<template data-asset-literal>
<p><a href download>Download attachment</a></p>
</template>
<template data-asset-code>
<pre><code></code></pre>
</template>
<template data-asset-image data-proofer-ignore>
<p>Image (<a href download>Download</a>):</p>
<img class="img-responsive" src="" alt lang="en">
</template>
<template data-asset-array>
<p>Attachments:</p>
<ul>
<template data-download-link>
<li><a href download>Download attachment</a></li>
</template>
<template data-source-code>
<li><pre><code></code></pre></li>
</template>
<template data-asset-image data-proofer-ignore>
<li>
<p>Image (<a href download>Download</a>):</p>
<img class="img-responsive" src="" alt lang="en">
</li>
</template>
</ul>
</template>
<dl data-specific-results>
<template>
<dt data-result-label></dt>
Expand Down
Loading

0 comments on commit 74b26eb

Please sign in to comment.