# Announce Cart Updates on the WooCommerce Cart Page

> Tells screen reader users when the cart has been updated after they change a quantity, remove a product or apply a coupon on the classic cart page, which otherwise happens silently.

- Type: HTML
- Runs: Woocommerce after cart
- Category: [Accessibility](https://wpide.com/library/category/accessibility/)
- Requires: WooCommerce
- Tags: woocommerce, cart, screen-reader
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/a11y-woo-cart-update-announcement/

## Code

```html
<div id="wpide-cart-status" role="status" aria-live="polite" style="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);"></div>
<script>
jQuery(function ($) {
    var region = document.getElementById('wpide-cart-status');
    function say(text) { region.textContent = ''; setTimeout(function () { region.textContent = text; }, 100); }
    $(document.body).on('updated_cart_totals', function () {
        var total = $('.order-total .amount').last().text();
        say('Cart updated.' + (total ? ' New total ' + total + '.' : ''));
    });
    $(document.body).on('applied_coupon removed_coupon', function (e) {
        say(e.type === 'applied_coupon' ? 'Coupon applied.' : 'Coupon removed.');
    });
});
</script>
```

## Notes

Uses its own polite live region, so no extra WordPress scripts are needed.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Announce Cart Updates on the WooCommerce Cart Page" in its snippet library and add it in one click; or create a new HTML snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
