auditmysitev2.0.2

Moving visualisation without a still image

viz/static-missing

WCAG success criterion
2.2.2 (level A)
Outcome class
Automatic. An automated check that can report a confirmed violation.
Area
Accessibility, Navigation & Operation
Default severity
medium
axe-core rule
viz/static-missing

Why we flag this

In calm mode nothing replaces the motion; those who cannot cope with motion get either the motion or nothing.

figure[data-viz=3d|interactive] without a descendant carrying [data-viz-static].

What the rule checks

Scope. Every presented figure[data-viz] of kind 3d or interactive (case-insensitive).

Expectation. A moving or operable visualisation without a [data-viz-static] still image has nothing to show in calm mode (2.2.2): violation at the figure. Other kinds (chart, map) are not judged. A figure inside a hidden panel is not presented and not judged.

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 reports a violation here. Corpus case display_modes_viz_static, element figure#globe. The page may contain further findings for other rules.

display_modes_viz_static.htmlHTML
<!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_hidden_panel, element figure#archived-chart. The page may contain further findings for other rules.

content_viz_hidden_panel.htmlHTML
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Library in numbers: archived panel</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>
    <section aria-labelledby="this-year">
      <h2 id="this-year">This year</h2>
      <p>Figures for this year follow in spring.</p>
    </section>
    <section aria-labelledby="last-year" hidden>
      <h2 id="last-year">Last year</h2>
      <figure id="archived-chart" data-viz="interactive">
        <canvas data-viz-live width="200" height="100" aria-hidden="true"></canvas>
        <div data-viz-text><p>Loans fell slightly to 14,200.</p></div>
      </figure>
    </section>
  </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.