From 289071afeceabd4e4ab82a83dd0a49450d025884 Mon Sep 17 00:00:00 2001 From: Robert Lange <robert.lange@uni-leipzig.de> Date: Wed, 16 Feb 2022 00:00:34 +0100 Subject: [PATCH] refs #20741 [finc] makes bookbag icon more accessible: add sr-only text for full book bag --- themes/finc-accessibility/js/cart.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/themes/finc-accessibility/js/cart.js b/themes/finc-accessibility/js/cart.js index 9fc90e6810a..4fe3d72471d 100644 --- a/themes/finc-accessibility/js/cart.js +++ b/themes/finc-accessibility/js/cart.js @@ -214,9 +214,16 @@ VuFind.register('cart', function Cart() { /* #20374 set focus - END*/ } else { $this.popover({content: VuFind.translate('bookbagFull')}); + if ($this.find('.cart-link-label').length) { + $this.find('.cart-link-label') + .append('<span class="bookbag-full-hint sr-only">' + VuFind.translate('bookbagFull') + '</span>'); + } setTimeout(function recordCartFullHide() { $this.popover('hide'); }, 5000); + setTimeout(function recordCartFullHintRemove() { + $('.bookbag-full-hint').remove(); + }, 10000); } }); $this.find('.cart-remove').click(function cartRemoveClick(e) { -- GitLab