diff --git a/themes/finc/js/cart-finc.js b/themes/finc/js/cart-finc.js new file mode 100644 index 0000000000000000000000000000000000000000..fc1ddd56c9e64d2eb7eee543bb57cd734a47aa44 --- /dev/null +++ b/themes/finc/js/cart-finc.js @@ -0,0 +1,8 @@ +/* #18034 - inform screen reader about changes, eventually intregrate by PR into bootstrap cart.js - RL */ +$(document).ready(function() { + var cart = document.getElementById("cartSummary"); + if (cart !== undefined) { + cart.setAttribute("aria-live", "polite"); + cart.setAttribute("aria-atomic", "true"); + } +}); diff --git a/themes/finc/theme.config.php b/themes/finc/theme.config.php index c427cbde51c8afc0ec910d59bae41aabab4419dc..3896a57fa8beb2d1e681c1a4b599d47299116f8c 100644 --- a/themes/finc/theme.config.php +++ b/themes/finc/theme.config.php @@ -5,7 +5,8 @@ return [ 'check_item_statuses.js', 'lightbox_form_cache.js', 'covers.js', - 'common-finc.js' + 'common-finc.js', + 'cart-finc.js' ], 'helpers' => [ 'aliases' => [