diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/toolbar.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/toolbar.phtml index fdb24dcec2ec35a06c29b8f86b9a732f38bf90a7..c1585608ced6ce5a3046f35a1047276cd7ed11bb 100644 --- a/themes/finc/templates/RecordDriver/DefaultRecord/toolbar.phtml +++ b/themes/finc/templates/RecordDriver/DefaultRecord/toolbar.phtml @@ -78,7 +78,8 @@ <?php endif; ?> <?php /* finc adds bookbag feature */ ?> <li class="bookbag-menu"> - <?=$this->render('record/cart-buttons.phtml', ['id' => $this->driver->getUniqueId(), 'source' => $this->driver->getSourceIdentifier()]); ?> + <?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' ]); ?> </li> </ul> </nav> diff --git a/themes/finc/templates/record/cart-buttons.phtml b/themes/finc/templates/record/cart-buttons.phtml index 46a57cf85e0aa640109447372384761c3e2c5e7d..c9388056d58dfbede3ef555b0850061a3e65c25e 100644 --- a/themes/finc/templates/record/cart-buttons.phtml +++ b/themes/finc/templates/record/cart-buttons.phtml @@ -5,10 +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 */ ?> - <a href="javascript:" class="cart-add hidden<?php if (!$cart->contains($cartId)): ?> correct<?php endif ?>" aria-describedby="<?=$cartId?>"> + <?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 ?>> <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 ?>" aria-describedby="<?=$cartId?>"> + <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 ?>> <span class="cart-link-label btn-type-minus"><?=$this->transEsc('Remove from Book Bag')?></span> </a>