Skip to content
easeweb
Search topics

Progress bars and meters that screen readers can't read

An upload bar is drawn with styled divs, or given a progressbar role with no name and a frozen value, so a screen reader can't tell how far along it is.

WCAG 2.2
SC 4.1.2ASC 4.1.3AA· new in 2.1
Required by
Section 508 · EN 301 549 (EU)
Broken <div class="bar"><div class="fill" style="width: 60%"></div></div>
The accessibility problem illustrated: No vision:Is my file still uploading?
01

The problem

Screen reader users start an upload and can't tell how far along it is, whether it is still going, or when it has finished

02

Try it

Press Enter on Upload and listen while the bar fills

  • Broken 1: do you hear how far along the upload is, and when it ends? Is there anything on the bar to read? The panel shows what a screen reader announces during the upload, and what it reads if you move to the bar.

  • Broken 2: upload again. What does the bar read while it fills, and does it say what is uploading?

  • Apply a fix. Upload again. Do you hear how far along it is and when it ends, and does the bar read the value it shows?

Broken Can you fix this?

Uploading report.pdf

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Give the bar a name and a value, and announce its progress

Before

A bar drawn with divs

<p>Uploading report.pdf</p><div class="bar"><div class="fill" style="width: 0%"></div></div><p class="done" hidden>Uploaded</p>
What is wrong2 points
  • A screen reader finds nothing after the file name, because the bar has no role, name or value.
  • Nothing is heard when the upload ends: "Uploaded" appears on screen, but it is in no live region, so it is not announced.

Here upload() stands for the site's own upload code, calling back with a percentage as the file goes up, as the upload progress events of XMLHttpRequest allow.

After

A native progress element

<label for="upload-bar">Uploading report.pdf</label><progress id="upload-bar" max="100" value="0">0%</progress><p class="done" hidden>Uploaded</p><p id="upload-status" role="status" class="visually-hidden"></p>
How it is fixed4 steps
  1. Replace the drawn bar with a progress element, and the line above it with a label that names it. To the browser, progress is a progress bar, and its value against max is passed to assistive technology, so a screen reader that moves to it reads its name, its role and its value.
  2. Set value as the file goes up. The text inside it, written alongside, is a fallback for browsers that can't draw it, and does not name it.
  3. Add an empty status region, on the page from the start, and write to it at each quarter, so progress is announced politely, a quarter at a time.
  4. When the upload ends, write "report.pdf uploaded." in the same region, or "report.pdf could not be uploaded. Try again." if it fails.

This fixes both Befores and passes 4.1.2 and 4.1.3. The cost is the look: browsers draw the bar themselves, and changing its colours takes their own pseudo-elements, such as ::-webkit-progress-value and ::-moz-progress-bar. Of the extras below that keep a bar custom, the native element takes the brand's colours through those pseudo-elements, but not a ring or a segmented bar.

Why this fix: Use native HTML first

Easily confused
04

Design ideas

A bar can take any shape, as long as it comes with words

Five ways to show how far something has got. Three draw the words a screen reader reads with the bar: what it is for and how far it has got. In the other two, the drawing is all there is; press Upload on the last one.

In the design file

  • Next to every bar, write what it is for and how far it has got, such as the file name and “60%” or “Step 2 of 4”.
  • Draw the finished and the failed state, each saying in words what happened, not only changing colour.
  • If the bar is the only thing that shows progress, make its fill at least 3:1 against the empty part, and write the ratio next to it.

Passes

  • Uploading report.pdf

    Ring beside the file name A 56px ring with the percentage in the middle, for a compact card or a phone. A ring has no room for words, so the line beside it, “Uploading report.pdf”, is drawn as part of the design: it is the name the ring is read with.
  • Delivery details

    Segments with the step written out For a checkout or a set-up flow, where progress is steps rather than percent. Write “Step 2 of 4” beside the segments in the design file: it is also the value they are read with, so a screen reader doesn’t turn step 2 into “2 percent”.
    • report.pdf

    • budget.xlsx

    • notes.txt Uploaded

    A list of files, each with its own bar For several files at once: each 6px bar is named by the file above it and reads the megabytes sent, “1.2 MB of 2.0 MB”, as written beside it. A finished file drops its bar for a tick and “Uploaded” in words.

Fails

  • Rings on photo tiles, with no file namesWCAG 4.1.2 Three photos uploading, each with a white ring over a dark scrim and nothing else. With no words on screen to name each ring, a screen reader hears “progress bar, 80%”, “progress bar, 45%” and can’t tell which photo is which: add the file name under each tile.
  • A button that fills, then turns into a tickWCAG 4.1.3 The Upload button fills over three seconds and ends as a tick, with no words at any point: nothing says how far it has got or that it finished, and the button is still called “Upload”. Write “report.pdf uploaded” beside it, and announce it.
05

Verify the fix

4 checks, no mouse.

Test with: Screen reader, Keyboard

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 upload code or the progress component changes.

How screen readers handle role="status"

Limits

Screen readers differ in how they report progress bars: some read the value as a percentage, some beep, and some speak only when the person moves to the bar, and their support for meters is weaker still. This guide covers one bar for one process on one page. A spinner or a wait with no amount is covered in loading spinners that screen readers never announce, and a message that isn't about progress, such as "Draft saved", in status messages that are shown but never announced. Test real uploads, slow and failing ones included, with the screen readers your users use.

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