Accessibility check from source
The --json output of barrierlab on its own example page as a report: failed checks with a recommendation each, findings to review and the manual checks no tool can do. A second audit tool next to auditmysite.
Accessibility check from source
examples/showcase/barrierlab-a11y.json{
"template_id": "default",
"title": "Accessibility check from source",
"subtitle": "barrierlab on examples/page.html · no browser",
"metadata": {
"author": "barrierlab",
"lang": "en"
},
"components": [
{
"type": "callout",
"data": {
"variant": "info",
"title": "About this report",
"content": "Findings, counts and line numbers come from barrierlab 's --json output for its own examples/page.html (one run, unedited). barrierlab does not write PDFs; this request was assembled from that output. The recommendations are written by hand."
}
},
{
"type": "section",
"data": {
"title": "Result",
"level": 1
}
},
{
"type": "metric-strip",
"data": {
"items": [
{
"label": "Failed",
"value": "5"
},
{
"label": "Needs review",
"value": "8"
},
{
"label": "Untested",
"value": "16",
"unit": "by hand"
},
{
"label": "Rules not run",
"value": "10"
}
]
}
},
{
"type": "section",
"data": {
"title": "Failed checks",
"level": 1
}
},
{
"type": "finding",
"data": {
"title": "forms/label-missing: The input has no label.",
"severity": "critical",
"description": "Line 17. WCAG 1.3.1, 3.3.2, 4.1.2.",
"recommendation": "Give the input a visible label tied to it with for/id, or wrap the input in a label element."
}
},
{
"type": "finding",
"data": {
"title": "links/name-missing: The link has no accessible name.",
"severity": "critical",
"description": "Line 15. WCAG 2.4.4, 4.1.2.",
"recommendation": "Put text in the link, or an aria-label if it only holds an icon."
}
},
{
"type": "finding",
"data": {
"title": "buttons/name-missing: The button has no accessible name.",
"severity": "critical",
"description": "Line 18. WCAG 4.1.2.",
"recommendation": "Put text in the button, or an aria-label if it only holds an icon."
}
},
{
"type": "finding",
"data": {
"title": "images/alt-missing: The image has no alt attribute.",
"severity": "high",
"description": "Line 14. WCAG 1.1.1.",
"recommendation": "Add an alt attribute: a short text that says what the image means here, or alt=\"\" if it is purely decorative."
}
},
{
"type": "finding",
"data": {
"title": "contrast/text-insufficient: The text reaches a contrast ratio of 2.59:1; 4.5:1 is required for normal text.",
"severity": "high",
"description": "Line 13. WCAG 1.4.3.",
"recommendation": "Darken the text or lighten the background until the ratio reaches 4.5:1."
}
},
{
"type": "section",
"data": {
"title": "To review",
"level": 1
}
},
{
"type": "audit-table",
"data": {
"title": "Findings that need a human decision",
"columns": [
{
"header": "Rule"
},
{
"header": "WCAG"
},
{
"header": "Line",
"align": "right"
},
{
"header": "Message"
}
],
"rows": [
[
"headings/none",
"2.4.1",
"2",
"No headings, no main landmark and no skip link; if blocks repeat across pages, nothing bypasses them."
],
[
"landmarks/main-missing",
"–",
"2",
"The document has no main landmark."
],
[
"landmarks/navigation-missing",
"1.3.1, 2.4.1",
"2",
"The document has no navigation landmark."
],
[
"landmarks/banner-missing",
"1.3.1, 2.4.1",
"2",
"The document has no banner landmark."
],
[
"landmarks/contentinfo-missing",
"1.3.1, 2.4.1",
"2",
"The document has no contentinfo landmark."
],
[
"keyboard/skip-link-missing",
"2.4.1",
"2",
"No skip link found that bypasses repeated blocks."
],
[
"forms/purpose-missing",
"1.3.5",
"17",
"The field \"\" seems to ask for information about the user but has no autocomplete token."
],
[
"landmarks/content-outside",
"–",
"13",
"Content is not contained in any landmark."
]
]
}
},
{
"type": "section",
"data": {
"title": "Checks only a person can do",
"level": 1
}
},
{
"type": "list",
"data": {
"title": "16 manual checks, never reported as passed",
"items": [
{
"content": "every alt text says what the image means in its place, and only purely decorative images have alt=\"\"."
},
{
"content": "any time limit can be turned off, adjusted or extended."
},
{
"content": "submit the form with errors — each error is named in text, next to its field, with a suggestion how to fix it."
},
{
"content": "with the keyboard alone you can move into and out of every control, dialog and embedded widget again."
}
]
}
}
]
}