Skip to content
easeweb
Search topics

Old prices and removed words shown only by a strike-through

A shop's sale price draws the old price with a line through it in CSS, so a screen reader reads "$40, $28" with nothing to say which price is charged.

WCAG 2.2
SC 1.3.1A
Required by
Section 508 · EN 301 549 (EU)
Broken text-decoration: line-through;
The accessibility problem illustrated: No vision:Which one is the price?
01

The problem

Screen reader users and people using read-aloud tools hear two prices for one product, with nothing to say which one they will pay.

02

Try it

Which tote price will you pay? Read what a screen reader says, then turn styles off.

The line through $40 is drawn by CSS. Does anything else say it is the old price?

Broken Can you fix this?

BrokenThe old price struck through by CSS
  • Linen tote

    $40 $28

  • Enamel mug

    $18

Reading the list, a screen reader says:

  1. Linen tote, $40, $28
  2. Enamel mug, $18

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Put the meaning of the line in words: was and now, shown or visually hidden.

  1. 1Never let a line-through, a colour or a weight be the only thing that says what text means.
  2. 2Say which price was, and which is now, in words that are read aloud.
  3. 3Use s for an old price and del and ins for edits, as well as the words, not instead of them.
Before The old price struck through by CSS
<li class="product">  <img src="linen-tote.jpg" alt="">  <h3>Linen tote</h3>  <p class="price">    <span class="old">$40</span>    <span class="now">$28</span>  </p></li>
After

Write was and now on the page

<li class="product">  <img src="linen-tote.jpg" alt="">  <h3>Linen tote</h3>  <p class="price">    Was <span class="old">$40</span>    Now <span class="now">$28</span>  </p></li>

04

Design ideas

A sale can look sharp and still be read out right.

Four more ways to show the old price or an edit, and two fashionable ones that fail. Each sample says in its note what a screen reader reads for it.

In the design file

  • Write a word beside every old price, such as Was, Regular price or 通常価格. If it can’t show, note it in the file to be built as hidden text.
  • Keep the old price at 4.5:1 or more against its background, and write the ratio beside its grey.
  • For edits, draw removed words struck through and added words underlined, and name both in words for screen readers.
  • Draw the price block once, as a component with its words, so every card says it the same way.

Passes

Fails

  • Old price slashed through at an angleWCAG 1.3.1 A diagonal slash drawn by CSS looks bolder than a line-through, but it is decoration all the same: the text is read as “$40, $28”, with nothing to say which is old.
  • Returns policy Suggesting

    You can return any item within 14 30 days of delivery for a full refund.

    Suggested edits shown by tint aloneWCAG 1.3.1 Soft red and green backgrounds with no strike-through, no underline and no words. The edit is read as “within 14 30 days”; and with no line, it also leaves people who can’t tell red from green guessing.
05

Verify the fix

3 checks, no mouse.

Test with: Screen reader, Styles off

0 of 3 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat after the price component or the shop's theme changes.

Limits

This is a starting pattern, not a guarantee for every page. The example is an old price; the same goes for other text whose look carries meaning, such as a highlight that marks a match, bold that marks the one important word, or text in red that says something is wrong: say it in words as well. A blockquote used only to indent text, so that it is announced as a quotation it isn't, is another failure of the same criterion (F43), not covered here. Test the product list, the product page and the basket with the people and tools your users rely on.

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.

Keep this fixed as your code changes.

Turn guides like this into rules your coding agents and CI follow, then have the result retested with a keyboard and screen readers.

How retests work