Sub topic 13
Making structure work for assistive technology
This chapter assumes you can write basic Markdown or use word-processor styles, and that you already know how to choose between headings, lists, and tables. Here you will learn how screen readers and other assistive tools use that structure, which common habits break it, and how to check your work.
How assistive technology reads structure
A screen reader is software that reads a page aloud or sends it to a braille display. Its users often do not read from top to bottom. They skim by asking the software for a list of the page's parts, then jumping to one.
Most screen readers can do the following:
- List all headings and jump to any of them.
- Jump to the next heading at a given level.
- List all tables and move between them.
- Announce "list, 4 items" before reading the first item.
- Move through a table cell by cell and read the column header with each cell.
This is the same skimming behavior sighted readers use, with the structure delivered by sound or touch instead of by eye. The software can only do it when the structure is real. If a heading is only bold text, the software sees an ordinary paragraph and leaves it out of the heading list.
Headings
Headings do the most work for assistive technology. A user can pull up a list of every heading and treat it as a table of contents. Three rules follow from that.
- Use real heading styles. In Markdown, use
#signs. In a word processor, apply the built-in Heading 1, Heading 2 styles instead of enlarging the font. - Do not skip levels. A
###directly under a#makes the heading list look as if a section is missing. - Use one level 1 heading. It names the document, so it works as the page title.
Choose the level for its position in the outline, never for how large it looks. If a heading looks too big, change the style's appearance in your template or stylesheet. Do not pick a lower level to shrink it.
# Backup guide
## Why the nightly backup fails
### Disk space
### Network timeouts
## How to rerun a failed backupA screen reader user who opens the heading list hears the levels as well as the text, so the nesting above reads as a clear outline.
Lists
When a screen reader meets a real list, it announces that a list begins and how many items it holds. That tells the user whether to listen to all of it or skip ahead. It also lets them move from item to item.
Typed imitations lose all of this. Compare these two versions.
Real list:
- Confirm that the main branch passes all checks.
- Confirm that the changelog is up to date.
Fake list (typed characters, one paragraph):
• Confirm that the main branch passes all checks. • Confirm that the changelog is up to date.The first version is announced as a list of two items. The second is one paragraph, and the software may read the bullet character aloud as a word.
Other habits that break lists:
- Manual numbers. Typing "1." and "2." in a word processor creates plain text. Use the numbered-list style, so the software reports "item 2 of 5."
- Line breaks for spacing. Do not press Enter twice to separate items. Empty paragraphs are read as blank lines or announced as "blank."
- Indenting with spaces. Use the list's own indent command to make a nested list. Spaces only move the text.
- Lists of one item. A list of a single item is announced as a list, then read. It adds noise. Write a sentence instead.
Keep nesting shallow. Each level adds an announcement, and a user listening to a list inside a list inside a list can lose track of where they are. Two levels is a sensible limit.
Tables
Tables are the structure most often built badly. A table works well for a screen reader user only when the software knows which cells are headers.
Header rows
In a well-formed table, the screen reader reads the column header before or with each cell. The user hears "Plan: Team, Storage: 100 GB" and so on, instead of a bare "100 GB." Without a marked header row, the user must remember which column they are in.
In Markdown, the first row is always the header row, so write real column names there.
| Plan | Storage | Users | Price per month |
|:------|--------:|------:|----------------:|
| Basic | 10 GB | 1 | $5 |
| Team | 100 GB | 10 | $20 |
| Scale | 1 TB | 100 | $90 |In a word processor or web editor, turn on the "header row" option for the table. In HTML, the header cells use the th element. A header that is only bold text in an ordinary cell does not count.
Keep the grid regular
Screen readers move through a table by row and column. Layout choices that break the grid break that movement.
- Avoid merged cells. A cell that spans three columns confuses cell-by-cell navigation, because the column no longer matches the header.
- Avoid blank cells. An empty cell can sound like the end of the row. Write "None" or "Not applicable" when a value is absent.
- Avoid nested tables. The software must announce a table inside a table, and few users can follow it.
- Never use a table for layout. Tables are for data. If you need two columns of text on a page, use the layout tools of your format.
If your data needs merged cells to make sense, that is a sign to split it into two tables, each with its own heading.
Give the table context
Introduce each table with a sentence or a heading that says what it shows. A user who jumps to the table through the table list lands there without the surrounding text. In formats that support it, add a caption or a table title so the purpose is announced.
Visual cues that do not carry over
Several common habits give sighted readers a hint and give screen reader users nothing.
| Visual habit | What a non-visual reader gets | Better approach |
|---|---|---|
| Bold text used as a heading | A paragraph, absent from the heading list | A real heading style |
| Red text for "required" | No signal at all | The word "Required" in the text |
| Rows of dashes as a divider | The software may read "dash dash dash" | A heading or a section break |
| "See the table on the right" | The user cannot tell where "right" is | A named reference: "See Table 2" |
| Color-coded status cells | No status | A text label such as "Failed" or "Passed" |
The rule is that meaning must exist in the text. Color, position, and size can add emphasis for people who see them, but they cannot be the only carrier of information. This also helps readers with color blindness and anyone viewing the document in a plain-text email or on a small screen.
Link text and other small details
Screen reader users can pull up a list of links, just as they can with headings. A link that says "click here" is useless in that list. Write link text that names the destination, such as "backup log reference." Avoid repeating the same text, such as several links all called "Read more," that point to different places.
Also write a short text description for any image that carries information. Describe what the image shows and why it matters, and keep it to a sentence or two. An image that is purely decorative needs no description, but a chart does. This applies to diagrams in this tutorial as well, where each has an alt line that states what it shows.
Testing your structure
You do not need to be an expert to check. Several quick tests catch most problems.
- Open the outline view. Most word processors and editors can show a navigation pane of headings. If a section is missing from it, that section lacks a real heading.
- Read the heading list alone. Ask whether it tells the story of the document. Vague headings such as "Details" fail here, which links this chapter to the earlier one on descriptive headings.
- Tab through the document, with styles visible. Many tools show the style name beside each paragraph. Look for body text that should be a heading or a list.
- Use the built-in checker. Many office suites include an accessibility checker that flags missing header rows, merged cells, and skipped heading levels.
- Try a screen reader. Free options exist, such as NVDA on Windows, and VoiceOver is built into macOS and iOS. Listen to one page, using the heading and table shortcuts. Ten minutes shows more than any checklist.
Common errors
- Choosing a heading level for its size, which produces skipped or jumbled outlines.
- Copying a table from a web page or slide as an image, which no screen reader can read cell by cell.
- Pasting text from a PDF and leaving hard line breaks, which turns each line into its own paragraph.
- Using a table with an empty top-left cell and no row labels, so the first column has no meaning when read aloud.
- Building a "table" from tab stops or spaces, which has no rows or columns for the software to find.
Exercise
A teammate sends you a status report. Section titles are bold 14-point text, the status of each task is shown by a green or red cell with no text, and the task list is typed with "•" characters at the start of each line. Name three changes that make the report work with a screen reader, and say what each change fixes.
Show answer
First, replace the bold section titles with real heading styles (for example Heading 2), so the titles appear in the screen reader's heading list and the user can jump between sections. Second, add a text label such as "Passed" or "Failed" to each status cell, because color alone gives a non-visual reader no information. Third, replace the typed "•" lines with a real bulleted list style, so the software announces the list and its item count and does not read the bullet characters aloud. Adding a header row to the task table, if there is one, is a good further fix.
Exercise
A table has a merged cell across three columns in its second row and an empty cell at the end of the fourth row. What problems does this cause when read cell by cell, and how would you fix the table?
Show answer
The merged cell breaks the link between a cell and its column header, so the user cannot tell which column a value belongs to. The empty cell can sound like the end of the row, or leave the user unsure whether a value is missing. To fix it, split the merged content so every cell sits in one column (or split the data into two tables, each with its own heading and header row), and write "None" or "Not applicable" in any cell that has no value.