Skip to content

Commit

Permalink
Make Changes to cart.js so screen readers inform about changes to boo…
Browse files Browse the repository at this point in the history
…kbag
  • Loading branch information
Claas Kazzer committed Sep 29, 2023
1 parent 0ac73a8 commit 1642140
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions themes/bootstrap3/js/cart.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,13 @@ VuFind.register('cart', function Cart() {
trigger: 'manual',
placement: $(document.body).hasClass('rtl') ? 'left' : 'right'
});
/* Accessibility: inform screen reader about changes */
var cart = document.getElementById("cartSummary");
if (cart !== null && cart !== undefined) {
cart.setAttribute("aria-live", "polite");
cart.setAttribute("aria-atomic", "true");
}
/* Accessibility: inform screen reader about changes - END */
updateCount();
}

Expand Down

0 comments on commit 1642140

Please sign in to comment.