Skip to content
Snippets Groups Projects
Commit ad972ece authored by Viola Elsenhans's avatar Viola Elsenhans Committed by Robert Lange
Browse files

refs #24358 [finc] distinguish origin of template for setting either aria-label or aria-describedby

parent 95e6ee95
No related merge requests found
...@@ -78,7 +78,8 @@ ...@@ -78,7 +78,8 @@
<?php endif; ?> <?php endif; ?>
<?php /* finc adds bookbag feature */ ?> <?php /* finc adds bookbag feature */ ?>
<li class="bookbag-menu"> <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> </li>
</ul> </ul>
</nav> </nav>
......
...@@ -5,10 +5,11 @@ ...@@ -5,10 +5,11 @@
<?php /* finc changes span to div */ ?> <?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)?>"> <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 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> <span class="cart-link-label btn-type-add"><?=$this->transEsc('Add to Book Bag')?></span>
</a> </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> <span class="cart-link-label btn-type-minus"><?=$this->transEsc('Remove from Book Bag')?></span>
</a> </a>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment