diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/result-list.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/result-list.phtml index 3f3e2d21a6e3e9d0da658e4627ed5de24076dfad..c5f6bf12ef84cffb980062e5e86b6b72c2b2d807 100644 --- a/themes/finc/templates/RecordDriver/DefaultRecord/result-list.phtml +++ b/themes/finc/templates/RecordDriver/DefaultRecord/result-list.phtml @@ -221,7 +221,8 @@ if ($cover): <?php if ($this->cart()->isActiveInSearch() && isset($this->params) && $this->params->getOptions()->supportsCart() && $this->cart()->isActive()): ?> <?php /* finc: remove break after bookbag #22379 */ ?> - <?=$this->render('record/cart-buttons.phtml', ['id' => $this->driver->getUniqueId(), 'source' => $this->driver->getSourceIdentifier()]); ?> + <?php /* finc adds callFromTemplate for setting aria-describedby if use of book bag is with checkboxes #24358 */ ?> + <?=$this->render('record/cart-buttons.phtml', ['id' => $this->driver->getUniqueId(), 'source' => $this->driver->getSourceIdentifier(), 'callFromTemplate' => 'resultList']); ?> <?php endif; ?> <?php if ($this->userlist()->getMode() !== 'disabled'): ?> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/toolbar.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/toolbar.phtml index c1585608ced6ce5a3046f35a1047276cd7ed11bb..fdb24dcec2ec35a06c29b8f86b9a732f38bf90a7 100644 --- a/themes/finc/templates/RecordDriver/DefaultRecord/toolbar.phtml +++ b/themes/finc/templates/RecordDriver/DefaultRecord/toolbar.phtml @@ -78,8 +78,7 @@ <?php endif; ?> <?php /* finc adds bookbag feature */ ?> <li class="bookbag-menu"> - <?php /* finc adds callFromTemplate to distinguish if use of book bag is with or without checkbox for setting either aria-label or aria-describedby #24358 */ ?> - <?=$this->render('record/cart-buttons.phtml', ['id' => $this->driver->getUniqueId(), 'source' => $this->driver->getSourceIdentifier(), 'callFromTemplate' => 'toolbar' ]); ?> + <?=$this->render('record/cart-buttons.phtml', ['id' => $this->driver->getUniqueId(), 'source' => $this->driver->getSourceIdentifier()]); ?> </li> </ul> </nav> diff --git a/themes/finc/templates/RecordDriver/SolrAI/result-list.phtml b/themes/finc/templates/RecordDriver/SolrAI/result-list.phtml index 17bc7f3cac90a1c7db0286dd34061d585dc23768..d55926fcf661073a5df48c2ab9359b490ed9e3b5 100644 --- a/themes/finc/templates/RecordDriver/SolrAI/result-list.phtml +++ b/themes/finc/templates/RecordDriver/SolrAI/result-list.phtml @@ -204,7 +204,8 @@ if ($cover): <?php if ($this->cart()->isActiveInSearch() && isset($this->params) && $this->params->getOptions()->supportsCart() && $this->cart()->isActive()): ?> <?php /* finc: remove break after bookbag #22379 */ ?> - <?=$this->render('record/cart-buttons.phtml', ['id' => $this->driver->getUniqueId(), 'source' => $this->driver->getSourceIdentifier()]); ?> + <?php /* finc adds callFromTemplate for setting aria-describedby if use of book bag is with checkboxes #24358 */ ?> + <?=$this->render('record/cart-buttons.phtml', ['id' => $this->driver->getUniqueId(), 'source' => $this->driver->getSourceIdentifier(), 'callFromTemplate' => 'resultList' ]); ?> <?php endif; ?> <?php if ($this->userlist()->getMode() !== 'disabled'): ?> diff --git a/themes/finc/templates/record/cart-buttons.phtml b/themes/finc/templates/record/cart-buttons.phtml index c9388056d58dfbede3ef555b0850061a3e65c25e..abb7910f42dfad7e1b6617c451b06e85f3613827 100644 --- a/themes/finc/templates/record/cart-buttons.phtml +++ b/themes/finc/templates/record/cart-buttons.phtml @@ -5,11 +5,11 @@ <?php /* finc changes span to div */ ?> <div class="btn-bookbag-toggle" data-cart-id="<?=$this->escapeHtmlAttr($this->id)?>" data-cart-source="<?=$this->escapeHtmlAttr($this->source)?>"> <?php /* finc makes add-to/remove-from bookbag accessible for keyboard navigation - CK */ ?> - <?php /* finc uses callFromTemplate to distinguish if use of book bag is with or without checkbox for setting either aria-label or aria-describedby #24358 */ ?> - <a href="javascript:" class="cart-add hidden<?php if (!$cart->contains($cartId)): ?> correct<?php endif ?>" <?php if ($this->callFromTemplate === 'toolbar'): ?>aria-describedby="<?=$cartId?>"<?php else: ?>aria-describedby="<?=$cartId?>"<?php endif ?>> + <?php /* finc adds callFromTemplate for setting aria-describedby if use of book bag is with checkboxes #24358 */ ?> + <a href="javascript:" class="cart-add hidden<?php if (!$cart->contains($cartId)): ?> correct<?php endif ?>" <?php if ($this->callFromTemplate == 'resultList'): ?>aria-describedby="<?=$cartId?>"<?php endif ?>> <span class="cart-link-label btn-type-add"><?=$this->transEsc('Add to Book Bag')?></span> </a> - <a href="javascript:" class="cart-remove hidden<?php if ($cart->contains($cartId)): ?> correct<?php endif ?>" <?php if ($this->callFromTemplate === 'toolbar'): ?>aria-describedby="<?=$cartId?>"<?php else: ?>aria-describedby="<?=$cartId?>"<?php endif ?>> + <a href="javascript:" class="cart-remove hidden<?php if ($cart->contains($cartId)): ?> correct<?php endif ?>" <?php if ($this->callFromTemplate == 'resultList'): ?>aria-describedby="<?=$cartId?>"<?php endif ?>> <span class="cart-link-label btn-type-minus"><?=$this->transEsc('Remove from Book Bag')?></span> </a>