Chart without a values table
viz/table-missing
- WCAG success criterion
- 1.3.1 (level A)
- Outcome class
- Hint only. An automated check that by design reports review hints only: its findings are marked for manual review, never as confirmed violations.
- Area
- Accessibility, Structure & Semantics
- Default severity
- low
- axe-core rule
viz/table-missing
Why we flag this
The relations between the values are lost unless the text layer conveys them another way.
figure[data-viz=chart] without a <table> in its subtree.
What the rule checks
Scope. Every figure[data-viz="chart"].
Expectation. A chart without a <table> of its values loses the relationships between them (1.3.1); few values may be conveyed by a sentence, so this is REVIEW at the figure. A table anywhere in the figure passes.
Source. Display-mode convention v0 (casoon/barrierlab#22) hung on WCAG 2.2 SC 1.1.1, 1.3.1, 2.2.2; HTML §4.4.12-13 figure/figcaption
Detection: shared; needs dom.
Failing example
The check flags this for review. Corpus case display_modes_viz_static, element figure#spark. The page may contain further findings for other rules.
<!DOCTYPE html>
<!-- Display-mode convention, static rules shared with a11y-rules (#699): an
interactive visualisation without a still image and without a caption, a
chart whose values are only in a sentence, and one that does it right
(caption, still image, table). The toggle and data-display are in place,
so no display/* finding is expected besides the viz/* ones. -->
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Display modes: static rules</title>
<script>document.documentElement.dataset.display = 'visual';</script>
<style>
[data-viz-text] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#display-toggle { min-width: 44px; min-height: 44px; }
</style>
</head>
<body>
<header>
<nav aria-label="Display">
<select id="display-toggle" data-display-toggle aria-label="Display">
<option value="visual" selected>Visual</option>
<option value="calm">Calm</option>
<option value="text">Text</option>
</select>
</nav>
</header>
<main>
<h1>Earth systems</h1>
<figure id="globe" data-viz="interactive">
<canvas data-viz-live width="300" height="150" aria-hidden="true"></canvas>
<div data-viz-text><p>A globe showing ocean currents; drag to turn it.</p></div>
</figure>
<figure id="spark" data-viz="chart">
<svg data-viz-static aria-hidden="true" width="120" height="30" viewBox="0 0 120 30"><path d="M0 25 L120 5" stroke="#333" fill="none"></path></svg>
<div data-viz-text><p>Rises from 2 to 9 over the period.</p></div>
<figcaption>Trend</figcaption>
</figure>
<figure id="good" data-viz="chart">
<svg data-viz-static aria-hidden="true" width="120" height="30" viewBox="0 0 120 30"><path d="M0 25 L120 5" stroke="#333" fill="none"></path></svg>
<div data-viz-text>
<table>
<caption>Values</caption>
<tr><th scope="col">Year</th><th scope="col">Value</th></tr>
<tr><td>2000</td><td>2</td></tr>
<tr><td>2020</td><td>9</td></tr>
</table>
</div>
<figcaption>Values by year</figcaption>
</figure>
</main>
</body>
</html>Passing example
The check passes here and reports nothing. Corpus case content_viz_ok. The page may contain further findings for other rules.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Library in numbers</title>
<script>document.documentElement.dataset.display = 'visual';</script>
<style>
html:not([data-display="text"]) [data-viz-text] {
position: absolute; width: 1px; height: 1px; overflow: hidden;
clip-path: inset(50%); white-space: nowrap;
}
body > a[href="#main"], #display-toggle { display: inline-block; min-width: 44px; min-height: 44px; }
</style>
</head>
<body>
<a href="#main">Skip to main content</a>
<header>
<nav aria-label="Display">
<label for="display-toggle">Display</label>
<select id="display-toggle" data-display-toggle>
<option value="visual" selected>Visual</option>
<option value="calm">Calm</option>
<option value="text">Text</option>
</select>
</nav>
</header>
<main id="main">
<h1>Library in numbers</h1>
<figure id="loans-chart" data-viz="chart">
<svg data-viz-static aria-hidden="true" width="120" height="30" viewBox="0 0 120 30"><path d="M0 25 L120 5" stroke="#333" fill="none"></path></svg>
<div data-viz-text>
<table>
<caption>Loans per year</caption>
<tr><th scope="col">Year</th><th scope="col">Loans</th></tr>
<tr><td>2024</td><td>14,200</td></tr>
<tr><td>2025</td><td>15,100</td></tr>
</table>
</div>
<figcaption>Loans per year</figcaption>
</figure>
<figure id="branch-map" data-viz="map">
<svg data-viz-static aria-hidden="true" width="120" height="30" viewBox="0 0 120 30"><path d="M0 25 L120 5" stroke="#333" fill="none"></path></svg>
<div data-viz-text>North</div>
<figcaption>Branches on the map</figcaption>
</figure>
<figure id="globe" data-viz="3d">
<canvas data-viz-live width="200" height="100" aria-hidden="true"></canvas>
<img data-viz-static src="/globe.png" alt="" width="200" height="100">
<div data-viz-text><p>A globe of partner libraries in 14 countries.</p></div>
<figcaption>Partner libraries</figcaption>
</figure>
<figure id="photo">
<img src="/reading-room.jpg" alt="The reading room with its long oak tables" width="200" height="100">
<figcaption>The reading room</figcaption>
</figure>
</main>
<footer><p>City Library, 1 Market Square</p></footer>
</body>
</html>This page is generated from the rule catalogue and the rule contracts; see therule overview for how the outcome classes are derived.