Skip to content
easeweb
Search topics

Reading order that doesn't match the layout

An order summary writes each amount before its item and floats it right, and a delivery box is coded by column, so a screen reader pairs the wrong words.

WCAG 2.2
SC 1.3.2A
Required by
Section 508 · EN 301 549 (EU)
Broken <li><span class="amount">$28</span> Canvas tote</li>
The accessibility problem illustrated: No vision:Does delivery cost $67?
01

The problem

Screen reader and read-aloud users hear each amount before its item and the delivery options as loose columns, so they pair prices with the wrong items

02

Try it

Read the order summary the way a screen reader does, and see which amount follows which name

  • Broken 1: the panel shows what a screen reader reads from the top. Turn on “Show reading order” to number each piece in that order. Does every amount come after its own name?

  • Broken 2: the delivery box, written column by column. Does each price come right after its own option?

  • Apply a fix. Read the panel again, with the numbers on. Can you tell which name each amount belongs to?

Simulate Show reading order

Broken Can you fix this?

Order summary
  • $28 Canvas tote
  • $35 Linen tote
  • $4 Delivery
  • $67 Total

Reading from the top, a screen reader says:

  1. Order summary
  2. $28
  3. Canvas tote
  4. $35
  5. Linen tote
  6. $4
  7. Delivery
  8. $67
  9. Total

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Write the source in the order it is read

Before

Amounts floated right, written before their items

<ul class="summary">  <li><span class="amount">$28</span> Canvas tote</li>  <li><span class="amount">$35</span> Linen tote</li>  <li><span class="amount">$4</span> Delivery</li>  <li class="total"><span class="amount">$67</span> Total</li></ul>
What is wrong3 points

The code is written this way because of the float. A float can't sit higher than content written before it, so to keep the amount on the first line of its row whatever the name holds, the habit is to write it first; Bootstrap 3's own documentation wrote its list badges like this, and themes from that time still do.

  • A screen reader reads each amount before its name, straight after the row above.
  • The amount is written before its name and only moved to the end of the row by float: right, so the row looks right and the fault can't be seen.
  • Rewriting the row with flexbox and flex-direction: row-reverse doesn't help: it keeps the same look and the same wrong order.
After

Source written in the order it is read

html

<ul class="summary">  <li><span>Canvas tote</span> <span class="amount">$28</span></li>  <li><span>Linen tote</span> <span class="amount">$35</span></li>  <li><span>Delivery</span> <span class="amount">$4</span></li>  <li class="total"><span>Total</span> <span class="amount">$67</span></li></ul>

html

<table class="delivery">  <tr>    <th scope="row">Standard</th>    <td>$4</td>    <td>3–5 days</td>  </tr>  <tr>    <th scope="row">Express</th>    <td>$9</td>    <td>Next day</td>  </tr></table>
How it is fixed4 steps
  1. Write each name before its amount in the summary.
  2. Make each row a flex container with justify-content: space-between. It pushes the amount to the right end of the row without moving it, so the summary reads "Canvas tote $28" and looks as it did.
  3. Make the delivery options a table, one row per option, with the service as its row header. They are read row by row, and a screen reader's table commands can say which service a price belongs to.
  4. Align the row headers to the start, as the text was before.

This fixes both Befores and passes 1.3.2. For the summary, a description list (dl, with each name a dt and each amount a dd) or a table works as well.

04

Verify the fix

4 checks, no mouse.

Test with: Screen reader, Styles off

0 of 4 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat after the layout or a component's styles change.

Limits

This is a starting pattern, not a guarantee for every application. It covers a short order summary and a small box of options. Drag-to-reorder lists, data grids and carousels have their own patterns and need their own checks. Whether an order changes the meaning is a judgement about the content, so read your real pages with a screen reader and with styles off.

This is a recreated teaching example, not a finding about a named client. The code is a starting pattern: test it in your own product. No completed assistive-technology test is claimed here.

EaseWeb service

Fixed it? Keep it from coming back.

I turn guides like this one into rules your coding agents follow and checks your CI runs. Then I retest by hand with a keyboard and screen readers, periodically.

See the service