Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Add to cart message not announced to screen readers: fix

PRF-346Low impactOther toolBy FunnelGuardPublished Updated
On this page

What this issue is

A status message is feedback that appears after an action but does not take focus. Examples are 'Added to cart', 'Item removed', a cart count that changes from 0 to 1, or a slide-in mini cart. Sighted users see it. Screen reader users only hear what has focus, or what is inside a live region: an area of the page the browser tells assistive technology to watch for changes.

Why it costs you leads or sales

A blind or low-vision shopper presses Add to cart and hears nothing. They do not know if it worked, so they may press again (adding duplicates), go hunting for the cart, or leave. The business impact is usually modest because it affects a smaller share of visitors, but it is a real barrier to purchase and a compliance risk in regions with accessibility rules for online shops.

What a screen reader user experiences
  1. Product pageUser finds the item
  2. Add to cartItem is added by AJAX
  3. Message appearsNot in a live region, silence
  4. CheckoutUser unsure and may leave

The click works, but the confirmation is never spoken, so the journey stalls.

How to check if your site has it

Test the add to cart message
  1. Turn on a screen reader

    Use NVDA (Windows, free), VoiceOver (Mac, press Cmd+F5) or TalkBack on Android.

  2. Add an item with the keyboard

    Tab to the Add to cart button and press Enter. Listen for any spoken confirmation.

  3. Inspect the message

    Open browser dev tools and find the message element. Look for role="status", role="alert" or aria-live on it or a parent.

  4. Check the cart count

    If the header count updates, check whether that change is announced too.

How to fix it

The rule: keep an empty live region in the page from the start, and put the message text into it when the action happens. Live regions created at the same moment as their text are often ignored.

Live region plus scripthtml
<div id="cart-status" role="status" aria-live="polite" aria-atomic="true" class="visually-hidden"></div>

<script>
  function announce(msg) {
    var el = document.getElementById('cart-status');
    el.textContent = '';
    setTimeout(function () { el.textContent = msg; }, 50);
  }
  // call after a successful add to cart:
  // announce('Blue t-shirt added to cart. Cart has 2 items.');
</script>
Visually hidden but still read aloudcss
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
Where to apply it
  1. Add the live region

    Place the empty div in your layout, near the top of the body, so it exists on every page.

  2. Call announce()

    Run it in the success handler of your add to cart request, with the product name and new cart count.

Cart message markup

Before

  • Message div created on click with no role
  • Screen reader stays silent
  • User presses the button twice

After

  • Empty role=status region present on load
  • Text inserted on success and spoken politely
  • User knows the item was added

How to confirm it's fixed

Confirmation checks
  • With a screen reader on, pressing Add to cart speaks the product and result
  • The message is spoken once, not repeated several times
  • Focus stays on the button (or moves logically if a drawer opens)
  • The announcement works on product pages, collection pages and quick view
  • Removing an item and changing quantity are announced too
  • Tested in at least two screen reader and browser pairs

How to prevent it happening again

Make the live region part of your shared layout, not a one-off on a single page. Add 'announce status messages' to your definition of done for any new cart, wishlist or form feature. Repeat the screen reader test after theme updates, app installs and cart redesigns, since these often replace the markup you fixed.

How FunnelGuard handles this

This is outside what FunnelGuard checks. FunnelGuard is a synthetic monitoring service: a robot visitor runs your customer journeys and checks steps, tracking hits and lead delivery. It does not listen to what a screen reader announces. The kind of tool that fits is an accessibility testing tool: an automated scanner for missing ARIA attributes, combined with manual testing using a screen reader such as NVDA, JAWS or VoiceOver. FunnelGuard can still confirm that your add to cart journey keeps working end to end, which is a separate question.

Questions people ask

Why is my add to cart message not read by screen readers?

The message is probably inserted into the page without a live region, and focus does not move to it. Screen readers only speak focused content and live region updates. Wrap the message in an element with role="status" or aria-live="polite" that already exists in the page.

How do I make an added to cart notification accessible?

Add an empty element with role="status" to your layout, then set its text when the add succeeds, for example 'Blue t-shirt added to cart'. Keep focus on the button so the user is not moved unexpectedly. Test with NVDA, JAWS or VoiceOver.

Should I use role=alert or aria-live polite for cart messages?

Use role="status" or aria-live="polite" for success messages like 'Added to cart'. These wait until the screen reader finishes speaking. Use role="alert" only for errors that need immediate attention.

Which WCAG rule covers status messages?

WCAG success criterion 4.1.3, Status Messages, at level AA. It requires that messages conveying success, errors or progress can be perceived by assistive technology without receiving focus.

Why does my aria-live region not announce anything?

Common causes are creating the live region at the same moment as the text, hiding it with display:none, or setting the same text twice. Keep the region in the page from load, hide it visually with a clip-based class, and clear then set the text.

Do I need to move focus to the cart after adding an item?

Not for a simple confirmation. A live region is enough and avoids pulling the user away from the page. If you open a drawer or modal, move focus into it and return focus to the trigger when it closes.

Can FunnelGuard detect that my cart message is not announced?

No. This needs an accessibility testing tool plus manual screen reader checks. FunnelGuard monitors that your funnel steps, tracking and lead delivery work, not what assistive technology speaks.

Does FunnelGuard catch this?

Other tool

Needs a different kind of tool.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.