Lesson 3 of 9 · 23m
Images, Media, and Tables Without Guesswork
Writing useful alternative text, choosing captions and transcripts, and marking up real data tables so their relationships survive nonvisual access.
Bad alternative text is rarely malicious; it is usually written like a filename or a compliance chore. Users do not need IMG_4021-final-final.png. They need the information or function the image carries in this context.
Alt text answers a question
Ask: if this image disappeared, what would the user miss?
<!-- Decorative: announce nothing. -->
<img src="divider.svg" alt="">
<!-- Informative: state the point, not every pixel. -->
<img src="latency-chart.png" alt="Line chart showing p95 latency falling from 840 ms to 210 ms after the index migration.">
<!-- Functional: name the action. -->
<button aria-label="Close dialog">
<img src="close.svg" alt="">
</button>An empty alt is a positive statement: this image is decorative. Omitting alt entirely makes many screen readers fall back to the filename, which is worse.
Tables are for relationships
Data tables need explicit structure:
<table>
<caption>Invoice history</caption>
<thead>
<tr><th scope="col">Invoice</th><th scope="col">Date</th><th scope="col">Total</th></tr>
</thead>
<tbody>
<tr><th scope="row">INV-1042</th><td>2026-11-01</td><td>$49.00</td></tr>
</tbody>
</table>th and scope are what connect a cell to its row and column headers. CSS can visually flatten a table, but semantics are what let a screen reader say “Total, forty-nine dollars” rather than a stream of disconnected cells. Do not use tables for layout; if you inherit one, replacing the layout is usually less risky than bolting roles onto it.
Media needs more than playback
Prerecorded audio needs a transcript. Prerecorded video with speech needs captions; video whose meaning is visual needs audio description or an equivalent text alternative. Controls must be keyboard operable and labeled. Autoplay is not merely rude; motion and sound can actively block users.
Field notes
- Alt text is contextual: the same logo means “Acme home” in a header link and may be decorative beside a typed company name.
- Do not start alt text with “image of”; the role already tells the user it is an image.
- Captions are not subtitles after the fact; build them into the publishing pipeline.
- Complex charts usually need both a short alt and a nearby data table or long description.
Was this lesson helpful?