Lesson 28 of 30
A chart is usually the single most information-dense element on a dashboard, and usually the least accessible one — an SVG or canvas with no inherent structure, conveying meaning entirely through position, color, and shape.
12 min read
Every option explains itself — why the right one is right, and why each wrong one is wrong. Miss one and it comes back later on a spaced-repetition schedule.
Question 1 of 3
A dashboard renders its main chart on a <canvas> element with no additional markup. What does a screen reader announce for it, by default?
Hints without spoilers, and a plain explanation of why a wrong answer was wrong — answered only from this lesson. Free account, no card.
Sign up freeWhat interviewers actually ask about this, and what a strong answer has to cover.
A strong answer covers
Likely follow-ups
Charts have a specific accessibility problem that most components don't: they're often the richest source of information on a page, and they're often built with technology that has zero built-in semantics. A <canvas> element has no DOM structure at all for assistive technology to read — it's pixels, indistinguishable from an image, no matter how much data went into producing it. An SVG chart has some DOM structure, but by default it's a pile of <path> and <circle> elements with no meaning attached — a screen reader has nothing sensible to announce.
Meanwhile, a sighted user looking at that same chart extracts real conclusions from it at a glance: which line is trending up, which category is the outlier, roughly how big the gap between two bars is. None of that reaches a screen reader user by default, even though it's the entire point of the chart.
The fix is a layered approach, not a single attribute:
"Bar chart" as an aria-label tells a screen reader user nothing a sighted user doesn't already get instantly from looking at it — the useful equivalent is the conclusion itself: "Revenue grew 40% year over year, driven mostly by Q4."role="img" plus a real aria-label (or a linked text summary) is close to the minimum viable accessible treatment, not a nice-to-have polish pass — without it, a canvas chart is functionally invisible to a screen reader.<figure>
<canvas
role="img"
aria-label="Bar chart of quarterly revenue, 2023 to 2024. Revenue grew from
$2.1M to $2.9M, a 38% increase, with the largest single jump in Q4 2024."
width={600}
height={300}
/>
<figcaption>
Quarterly revenue grew 38% year over year, driven mostly by a strong Q4.
<details>
<summary>View underlying data as a table</summary>
<table>
<thead>
<tr><th>Quarter</th><th>Revenue</th></tr>
</thead>
<tbody>
<tr><td>Q1 2024</td><td>$620K</td></tr>
<tr><td>Q2 2024</td><td>$640K</td></tr>
<tr><td>Q3 2024</td><td>$680K</td></tr>
<tr><td>Q4 2024</td><td>$960K</td></tr>
</tbody>
</table>
</details>
</figcaption>
</figure>
This isn't three redundant copies of the same thing — each layer does a different job. The aria-label gives a screen reader user the takeaway immediately, without them needing to expand anything. The visible figcaption gives every user, including a sighted one skimming quickly, the same headline conclusion in text. The collapsed table gives anyone who wants to actually inspect the real numbers — sighted or not — a structure built for exactly that, which the chart itself, canvas or SVG, was never going to provide.
aria-label="Line chart" technically satisfies "has an accessible name" while conveying none of the actual information a sighted user gets from looking at it — the label needs to carry the conclusion, not just the chart type.<div>, which at least has some fallback semantics, a bare <canvas> is indistinguishable from a blank image to a screen reader — role="img" and a real aria-label aren't extra credit, they're the floor."How would you make a dashboard's main chart accessible to a screen reader user?" is a real, increasingly common question as data-heavy UIs get more common — a strong answer names the layered approach (meaningful text summary, canvas/SVG labeling, an accessible table alternative) rather than reaching for a single attribute as if it were a complete fix.