diff --git a/local/languages/de.ini b/local/languages/de.ini index b9ce710d22e612e56cbf143f87cb22df229c2840..8e28bc7ef6ba03b301b20a705523a49c87535eda 100644 --- a/local/languages/de.ini +++ b/local/languages/de.ini @@ -2041,3 +2041,6 @@ form-button-submit = "Ausgefülltes Formular abschicken" ; #17601 offcanvas-toggler-search-tips = "Suchtipps einblenden" + +; #18019 remove if using VuFind 7.0 +select_item = "Titel auswählen" \ No newline at end of file diff --git a/local/languages/en.ini b/local/languages/en.ini index 791449b2a2f9be5e9712e720fd81d4a2aee980e5..962d249c742cb4d301349c47973d00dd95cf1a62 100644 --- a/local/languages/en.ini +++ b/local/languages/en.ini @@ -2129,3 +2129,6 @@ form-button-submit = "Submit the completed form" ; #17601 offcanvas-toggler-search-tips = "Show search help" + +; #18019 remove if using VuFind 7.0 +select_item = "Select item" \ No newline at end of file diff --git a/themes/bootstrap3/templates/record/checkbox.phtml b/themes/bootstrap3/templates/record/checkbox.phtml index 7c37bb0ab2482b8e6e321128dd30ed6fc4f77ac6..750c00fea0667df5b8b9cead6dba29d2097fd554 100644 --- a/themes/bootstrap3/templates/record/checkbox.phtml +++ b/themes/bootstrap3/templates/record/checkbox.phtml @@ -1,5 +1,5 @@ <label class="record-checkbox hidden-print"> - <input class="checkbox-select-item" type="checkbox" name="ids[]" value="<?=$this->escapeHtmlAttr($this->id) ?>"<?php if(isset($this->formAttr)): ?> form="<?=$this->formAttr ?>"<?php endif; ?>/> + <input class="checkbox-select-item" type="checkbox" name="ids[]" value="<?=$this->escapeHtmlAttr($this->id)?>"<?php if(isset($this->formAttr)): ?> form="<?=$this->formAttr ?>"<?php endif; ?>/> <span class="checkbox-icon"></span> <?php if (strlen($this->number ?? '') > 0): ?><span class="sr-only"><?=$this->transEsc('result_checkbox_label', ['%%number%%' => $this->number]) ?></span><?php endif; ?> </label> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/list-entry.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/list-entry.phtml index 991ba371499a349bff31bede9361361cf666133e..d71618e3d643d118cb4f1666aefcbb5c92533e93 100644 --- a/themes/finc/templates/RecordDriver/DefaultRecord/list-entry.phtml +++ b/themes/finc/templates/RecordDriver/DefaultRecord/list-entry.phtml @@ -37,17 +37,18 @@ if ($cover): <div class="result-body"> <div class="resultItemLine1"> <?php $missing = $this->driver instanceof \VuFind\RecordDriver\Missing; ?> + <?php $describedById = $driver->getSourceIdentifier() . '|' . $driver->getUniqueId(); ?> <?php if ($missing && $this->driver->isCachedRecord()): ?> - <span class="title"><?=$this->record($this->driver)->getTitleHtml()?></span> + <span id="<?=$describedById?>" class="title"><?=$this->record($this->driver)->getTitleHtml()?></span> <p class="alert alert-info"> <?= $this->translate('record_from_cache')?> <?php if ($queryParams = $this->record($this->driver)->getAdvancedSearchQueryParams()): ?> - <br/><a href="<?=$this->url('search-results', [], ['query'=>$queryParams])?>"><?=$this->transEsc('search_cached_record', ['%%title_full%%' => $this->driver->getTitle()])?></a> + <br/><a href="<?=$this->url('search-results', [], ['query' => $queryParams])?>"><?=$this->transEsc('search_cached_record', ['%%title_full%%' => $this->driver->getTitle()])?></a> <?php endif; ?> </p> <?php elseif (!$missing): ?> <a href="<?=$this->recordLink()->getUrl($this->driver)?>" class="getFull" data-view="<?=$this->params->getOptions()->getListViewOption() ?>"> - <span class="title"><?=$this->record($this->driver)->getTitleHtml()?></span> + <span id="<?=$describedById?>" class="title"><?=$this->record($this->driver)->getTitleHtml()?></span> </a> <?php endif;?> </div> diff --git a/themes/finc/templates/cart/contents.phtml b/themes/finc/templates/cart/contents.phtml index 2ececda64d0cd0f05fe5eecaf9328bb71a357bbf..1546577216b002f73c576f91678eea424fcd6b8a 100644 --- a/themes/finc/templates/cart/contents.phtml +++ b/themes/finc/templates/cart/contents.phtml @@ -7,7 +7,8 @@ if (!empty($records)): ?> <div class="checkbox"> <label> <?=$this->record($record)->getCheckbox('cart')?> - <a title="<?=$this->transEsc('View Record')?>" href="<?=$this->recordLink()->getUrl($record)?>" data-lightbox-ignore><?=$this->escapeHtml($record->getBreadcrumb())?> + <?php $describedById = $record->getSourceIdentifier() . '|' . $record->getUniqueId(); ?> + <a id="<?=$describedById?>" title="<?=$this->transEsc('View Record')?>" href="<?=$this->recordLink()->getUrl($record)?>" data-lightbox-ignore><?=$this->escapeHtml($record->getBreadcrumb())?> <?php // finc-specific: Collect citation data: $helper = $this->citation($record); diff --git a/themes/finc/templates/myresearch/checkedout.phtml b/themes/finc/templates/myresearch/checkedout.phtml index a004ba5b0b99714875ad6e6b5e7f3c37da1807ee..94e915df201858d8068ee82e43261344d50ad37c 100644 --- a/themes/finc/templates/myresearch/checkedout.phtml +++ b/themes/finc/templates/myresearch/checkedout.phtml @@ -77,13 +77,14 @@ <?php $i = 0; foreach ($this->transactions as $resource): ?> <?php $ilsDetails = $resource->getExtraDetail('ils_details'); ?> + <?php $describedById = $resource->getSourceIdentifier() . '|' . $resource->getUniqueId(); ?> <div id="record<?=$this->escapeHtmlAttr($resource->getUniqueId())?>" class="result"> <?php if ($this->renewForm): ?> <div class="checkbox"> <?php if (isset($ilsDetails['renewable']) && $ilsDetails['renewable'] && isset($ilsDetails['renew_details'])): ?> <?php $safeId = preg_replace('/[^a-zA-Z0-9]/', '', $ilsDetails['renew_details']); ?> <label> - <input class="checkbox-select-item" type="checkbox" name="renewSelectedIDS[]" value="<?=$this->escapeHtmlAttr($ilsDetails['renew_details'])?>" id="checkbox_<?=$safeId?>" /> + <input class="checkbox-select-item" type="checkbox" name="renewSelectedIDS[]" value="<?=$this->escapeHtmlAttr($ilsDetails['renew_details'])?>" id="checkbox_<?=$safeId?>" aria-describedby="<?=$describedById?>" aria-label="<?=$this->transEsc('select_item')?>" /> </label> <input type="hidden" name="selectAllIDS[]" value="<?=$this->escapeHtmlAttr($ilsDetails['renew_details'])?>" /> <input type="hidden" name="renewAllIDS[]" value="<?=$this->escapeHtmlAttr($ilsDetails['renew_details'])?>" /> @@ -116,7 +117,7 @@ if (is_a($resource, 'VuFind\\RecordDriver\\SolrDefault') && !is_a($resource, 'VuFind\\RecordDriver\\Missing')) { $title = $resource->getTitle(); $title = empty($title) ? $this->transEsc('Title not available') : $this->escapeHtml($title); - echo '<a href="' . $this->recordLink()->getUrl($resource) . + echo '<a id="' . $describedById . '" href="' . $this->recordLink()->getUrl($resource) . '" class="title">' . $title . '</a>'; } elseif (isset($ilsDetails['title']) && !empty($ilsDetails['title'])){ // If the record is not available in Solr, perhaps the ILS driver sent us a title we can show... diff --git a/themes/finc/templates/myresearch/holds.phtml b/themes/finc/templates/myresearch/holds.phtml index a56c24f8d94134a858957ccd987aff1025b45a7e..e145814611680b1ac82e7bdd4ab0e30880333240 100644 --- a/themes/finc/templates/myresearch/holds.phtml +++ b/themes/finc/templates/myresearch/holds.phtml @@ -45,13 +45,14 @@ <?php foreach ($this->recordList as $resource): ?> <?php $iteration++; ?> <?php $ilsDetails = $resource->getExtraDetail('ils_details'); ?> + <?php $describedById = $resource->getSourceIdentifier() . '|' . $resource->getUniqueId(); ?> <div id="record<?=$this->escapeHtmlAttr($resource->getUniqueId()) ?>" class="result"> <?php if ($this->cancelForm && isset($ilsDetails['cancel_details'])): ?> <?php $safeId = preg_replace('/[^a-zA-Z0-9]/', '', $resource->getUniqueId()); ?> <input type="hidden" name="cancelAllIDS[]" value="<?=$this->escapeHtmlAttr($ilsDetails['cancel_details']) ?>" /> <div class="checkbox"> <label> - <input type="checkbox" name="cancelSelectedIDS[]" value="<?=$this->escapeHtmlAttr($ilsDetails['cancel_details']) ?>" id="checkbox_<?=$safeId?>" /> + <input type="checkbox" name="cancelSelectedIDS[]" value="<?=$this->escapeHtmlAttr($ilsDetails['cancel_details']) ?>" id="checkbox_<?=$safeId?>" aria-describedby="<?=$describedById?>" aria-label="<?=$this->transEsc('select_item')?>" /> </label> </div> <?php endif; ?> @@ -79,11 +80,11 @@ if (is_a($resource, 'VuFind\\RecordDriver\\SolrDefault') && !is_a($resource, 'VuFind\\RecordDriver\\Missing')) { $title = $resource->getTitle(); $title = empty($title) ? $this->transEsc('Title not available') : $this->escapeHtml($title); - echo '<a href="' . $this->recordLink()->getUrl($resource) + echo '<a id="' . $describedById . '" href="' . $this->recordLink()->getUrl($resource) . '" class="title">' . $title . '</a>'; } elseif (isset($ilsDetails['title']) && !empty($ilsDetails['title'])){ // If the record is not available in Solr, perhaps the ILS driver sent us a title we can show... - echo '<span class="title">' . $this->escapeHtml($ilsDetails['title']) . '</span>'; + echo '<span class="title" id="' . $describedById . '">' . $this->escapeHtml($ilsDetails['title']) . '</span>'; } else { // Last resort -- indicate that no title could be found. echo $this->transEsc('Title not available'); diff --git a/themes/finc/templates/myresearch/illrequests.phtml b/themes/finc/templates/myresearch/illrequests.phtml index 4fbba305d4d0dede164fcfc960c15ffe3152a89a..7c56bb1e6ce0678f8d0736bfeef7bac0a6874321 100644 --- a/themes/finc/templates/myresearch/illrequests.phtml +++ b/themes/finc/templates/myresearch/illrequests.phtml @@ -46,13 +46,14 @@ <?php foreach ($this->recordList as $resource): ?> <?php $iteration++; ?> <?php $ilsDetails = $resource->getExtraDetail('ils_details'); ?> + <?php $describedById = $resource->getSourceIdentifier() . '|' . $resource->getUniqueId(); ?> <div id="record<?=$this->escapeHtmlAttr($resource->getUniqueId()) ?>" class="result"> <?php if ($this->cancelForm && isset($ilsDetails['cancel_details'])): ?> <?php $safeId = preg_replace('/[^a-zA-Z0-9]/', '', $resource->getUniqueId()); ?> <div class="checkbox"> <input type="hidden" name="cancelAllIDS[]" value="<?=$this->escapeHtmlAttr($ilsDetails['cancel_details']) ?>" /> <label> - <input type="checkbox" name="cancelSelectedIDS[]" value="<?=$this->escapeHtmlAttr($ilsDetails['cancel_details']) ?>" id="checkbox_<?=$safeId?>" /> + <input type="checkbox" name="cancelSelectedIDS[]" value="<?=$this->escapeHtmlAttr($ilsDetails['cancel_details']) ?>" id="checkbox_<?=$safeId?>" aria-describedby="<?=$describedById?>" aria-label="<?=$this->transEsc('select_item')?>" /> </label> </div> <?php endif; ?> @@ -80,7 +81,7 @@ if (is_a($resource, 'VuFind\\RecordDriver\\SolrDefault') && !is_a($resource, 'VuFind\\RecordDriver\\Missing')) { $title = $resource->getTitle(); $title = empty($title) ? $this->transEsc('Title not available') : $this->escapeHtml($title); - echo '<a href="' . $this->recordLink()->getUrl($resource) + echo '<a id="' . $describedById . '" href="' . $this->recordLink()->getUrl($resource) . '" class="title">' . $title . '</a>'; } elseif (isset($ilsDetails['title']) && !empty($ilsDetails['title'])){ // If the record is not available in Solr, perhaps the ILS driver sent us a title we can show... diff --git a/themes/finc/templates/myresearch/storageretrievalrequests.phtml b/themes/finc/templates/myresearch/storageretrievalrequests.phtml index 115894920ccac17fe5a8bedf77c573d44f45e51a..8719b5f71ad15ea416d1fafebba1d604575e5781 100644 --- a/themes/finc/templates/myresearch/storageretrievalrequests.phtml +++ b/themes/finc/templates/myresearch/storageretrievalrequests.phtml @@ -45,13 +45,14 @@ <?php foreach ($this->recordList as $resource): ?> <?php $iteration++; ?> <?php $ilsDetails = $resource->getExtraDetail('ils_details'); ?> + <?php $describedById = $resource->getSourceIdentifier() . '|' . $resource->getUniqueId(); ?> <div id="record<?=$this->escapeHtmlAttr($resource->getUniqueId()) ?>" class="result"> <?php if ($this->cancelForm && isset($ilsDetails['cancel_details'])): ?> <?php $safeId = preg_replace('/[^a-zA-Z0-9]/', '', $resource->getUniqueId()); ?> <div class="checkbox"> <input type="hidden" name="cancelAllIDS[]" value="<?=$this->escapeHtmlAttr($ilsDetails['cancel_details']) ?>" /> <label class="pull-left flip"> - <input type="checkbox" name="cancelSelectedIDS[]" value="<?=$this->escapeHtmlAttr($ilsDetails['cancel_details']) ?>" id="checkbox_<?=$safeId?>" /> + <input type="checkbox" name="cancelSelectedIDS[]" value="<?=$this->escapeHtmlAttr($ilsDetails['cancel_details']) ?>" id="checkbox_<?=$safeId?>" aria-describedby="<?=$describedById?>" aria-label="<?=$this->transEsc('select_item')?>" /> </label> </div> <?php endif; ?> @@ -79,7 +80,7 @@ if (is_a($resource, 'VuFind\\RecordDriver\\SolrDefault') && !is_a($resource, 'VuFind\\RecordDriver\\Missing')) { $title = $resource->getTitle(); $title = empty($title) ? $this->transEsc('Title not available') : $this->escapeHtml($title); - echo '<a href="' . $this->recordLink()->getUrl($resource) + echo '<a id="' . $describedById . '" href="' . $this->recordLink()->getUrl($resource) . '" class="title">' . $title . '</a>'; } elseif (isset($ilsDetails['title']) && !empty($ilsDetails['title'])){ // If the record is not available in Solr, perhaps the ILS driver sent us a title we can show... diff --git a/themes/finc/templates/record/checkbox.phtml b/themes/finc/templates/record/checkbox.phtml new file mode 100644 index 0000000000000000000000000000000000000000..4a77b03ba688132f05fb98d9ebb3c5b4e9b4d49d --- /dev/null +++ b/themes/finc/templates/record/checkbox.phtml @@ -0,0 +1,8 @@ +<!-- finc: record - checkbox --> +<label class="record-checkbox hidden-print"> + <input class="checkbox-select-item" type="checkbox" name="ids[]" value="<?=$this->id?>"<?php if(isset($this->formAttr)): ?> form="<?=$this->formAttr ?>"<?php endif; ?> aria-describedby="<?=$this->id?>" aria-label="<?=$this->transEsc('select_item')?>"/> + <span class="checkbox-icon"></span> + <?php if (strlen($this->number ?? '') > 0): ?><span class="sr-only"><?=$this->transEsc('result_checkbox_label', ['%%number%%' => $this->number]) ?></span><?php endif; ?> +</label> +<input type="hidden" name="idsAll[]" value="<?=$this->escapeHtmlAttr($this->id) ?>"<?php if(isset($this->formAttr)): ?> form="<?=$this->formAttr ?>"<?php endif; ?>/> +<!-- finc: record - cart-buttons - END -->