From 880caa123d13f37d2f3c32f9300abb87d635ddf6 Mon Sep 17 00:00:00 2001 From: Viola Elsenhans <elsenhans@ub.uni-leipzig.de> Date: Thu, 25 May 2023 15:04:19 +0200 Subject: [PATCH] refs #23950 [finc] VuFind 7 fix bugs in templates * add to historicloans * fix transEsc * fix bugs in result-list * VuFind 7 use transEscAttr --- .../DefaultRecord/result-list.phtml | 31 +++--- .../RecordDriver/SolrAI/result-list.phtml | 102 ++++++++++-------- .../templates/myresearch/acquisition.phtml | 2 +- .../myresearch/bulk-action-buttons.phtml | 2 +- .../templates/myresearch/checkedout.phtml | 2 +- themes/finc/templates/myresearch/fines.phtml | 2 +- .../templates/myresearch/historicloans.phtml | 5 +- .../templates/myresearch/illrequests.phtml | 2 +- themes/finc/templates/myresearch/mylist.phtml | 2 +- .../templates/myresearch/newpassword.phtml | 2 +- .../finc/templates/myresearch/profile.phtml | 2 +- themes/finc/templates/myresearch/setpin.phtml | 2 +- themes/finc/templates/search/history.phtml | 2 +- 13 files changed, 85 insertions(+), 73 deletions(-) diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/result-list.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/result-list.phtml index 687196e5be0..58228af1830 100644 --- a/themes/finc/templates/RecordDriver/DefaultRecord/result-list.phtml +++ b/themes/finc/templates/RecordDriver/DefaultRecord/result-list.phtml @@ -9,7 +9,7 @@ $thumbnailAlignment = $this->record($this->driver)->getThumbnailAlignment('resul $describedById = $this->record($this->driver)->getTitleDescribedById(); if ($cover): ob_start(); ?> - <div class="media-<?=$thumbnailAlignment?> <?=$this->escapeHtmlAttr($coverDetails['size'])?>"> + <div class="media-<?=$thumbnailAlignment?> <?=$this->escapeHtmlAttr($coverDetails['size'])?>" aria-hidden="true"> <?=$cover?> </div> <?php $thumbnail = ob_get_contents(); ?> @@ -33,11 +33,11 @@ if ($cover): <?php endif ?> <div class="media-body"> <div class="result-body"> - <?php /* finc: add header element for title and author; use h2 for record title; #19396 */ ?> + <?php /* finc: add header element for title and author; use h2 for record title #19396 */ ?> <header> <h2> <?php /* finc adds aria and lang code */ ?> - <a id="<?=$describedById?>" href="<?=$this->recordLink()->getUrl($this->driver)?>" class="title getFull" data-view="<?=isset($this->params) ? $this->params->getOptions()->getListViewOption(): 'list' ?>" lang=""> + <a id="<?=$describedById?>" href="<?=$this->recordLink()->getUrl($this->driver)?>" class="title getFull" data-view="<?=isset($this->params) ? $this->params->getOptions()->getListViewOption(): 'list' ?>" lang=""> <?=$this->record($this->driver)->getTitleHtml()?> </a> </h2> @@ -47,7 +47,8 @@ if ($cover): <div> <?=implode('<br>', array_map([$this, 'escapeHtml'], $this->driver->getSummary())); ?> <?php else: ?> - <?php $summAuthors = $this->driver->getPrimaryAuthorsWithHighlighting(); if (!empty($summAuthors)): ?> + <?php $summAuthors = $this->driver->getPrimaryAuthorsWithHighlighting(); + if (!empty($summAuthors)): ?> <?=$this->transEsc('by')?> <?php $authorCount = count($summAuthors); foreach ($summAuthors as $i => $summAuthor): ?> @@ -75,7 +76,8 @@ if ($cover): <?php /* finc removes [0] in nxt line #8639 - CK */ ?> <?=$this->transEsc('Published') . ' ' . $this->escapeHtml($summDate)?> <?php endif; ?> - <?php $summInCollection = $this->driver->getContainingCollections(); if (!empty($summInCollection)): ?> + <?php $summInCollection = $this->driver->getContainingCollections(); + if (!empty($summInCollection)): ?> <?php foreach ($summInCollection as $collId => $collText): ?> <div> <strong><?=$this->transEsc("in_collection_label")?></strong> @@ -142,7 +144,8 @@ if ($cover): </span> <div class="locationDetails"></div> <?php else: ?> - <?php $summCallNo = $this->driver->getCallNumber(); if (!empty($summCallNo)): ?> + <?php $summCallNo = $this->driver->getCallNumber(); + if (!empty($summCallNo)): ?> <strong><?=$this->transEsc('Call Number')?>:</strong> <?=$this->escapeHtml($summCallNo)?> <?php endif; ?> <?php endif; ?> @@ -166,9 +169,8 @@ if ($cover): <br/> <?=$doi->renderTemplate()?> <?php endif; ?> - <?php /* finc adds external link view helper */ ?> <?php if (!is_array($urls)) $urls = []; - if(!$this->driver->isCollection()): + if (!$this->driver->isCollection()): foreach ($urls as $current): ?> <?php /* finc: add external link view helper */ ?> <?= $this->externalLink( @@ -215,7 +217,7 @@ if ($cover): <br/> <?php endif; ?> - <?php if ($this->cart()->isActiveInSearch() && isset($this->params) && $this->params->getOptions()->supportsCart() && $this->cart()->isActive()): ?> + <?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 endif; ?> @@ -227,12 +229,13 @@ if ($cover): finc adds accessibility code */ ?> <a href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>?refreshOnClose=false" - data-lightbox class="save-record result-link-label" + data-lightbox + class="save-record result-link-label" data-id="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" aria-describedby="<?=$describedById?>" > <?php /* finc: remove whitespace/line breake before 'Add to favorites' */ ?> - <i class="fa fa-fw fa-star" aria-hidden="true"></i><span><?=$this->transEsc('Add to favorites')?></span> + <i class="result-link-icon fa fa-fw fa-star" aria-hidden="true"></i><span><?=$this->transEsc('Add to favorites')?></span> </a><br/> <?php elseif ($block = $this->permission()->getAlternateContent('feature.Favorites')): ?> <?=$block?> @@ -253,17 +256,17 @@ if ($cover): <input type="hidden" value="<?=$this->escapeHtmlAttr($hierarchyID)?>" class="hiddenHierarchyId" /> <a class="hierarchyTreeLinkText result-link-label" data-lightbox href="<?=$this->recordLink()->getTabUrl($this->driver, 'HierarchyTree', ['hierarchy' => $hierarchyID])?>#tabnav" title="<?=$this->transEscAttr('hierarchy_tree')?>" data-lightbox-href="<?=$this->recordLink()->getTabUrl($this->driver, 'AjaxTab', ['hierarchy' => $hierarchyID])?>" data-lightbox-post="tab=hierarchytree" aria-describedby="<?=$describedById?>"> <?php /* finc: remove whitespace/line breake before 'hierarchy_view_context' */ ?> - <i class="result-link-icon fa fa-fw fa-sitemap" aria-hidden="true"></i><span><?=$this->transEscAttr('hierarchy_view_context')?></span><?php if (count($trees) > 1): ?>: <?=$this->escapeHtml($hierarchyTitle)?><?php endif; ?> + <i class="result-link-icon fa fa-fw fa-sitemap" aria-hidden="true"></i><span><?=$this->transEsc('hierarchy_view_context')?></span><?php if (count($trees) > 1): ?>: <?=$this->escapeHtml($hierarchyTitle)?><?php endif; ?> </a> </div> <?php endforeach; ?> <?php endif; ?> - <?=$this->driver->supportsCoinsOpenUrl()?'<span class="Z3988" aria-hidden="true" title="' . $this->escapeHtmlAttr($this->driver->getCoinsOpenUrl()) . '"></span>':''?> + <?=$this->driver->supportsCoinsOpenUrl() ? '<span class="Z3988" aria-hidden="true" title="' . $this->escapeHtmlAttr($this->driver->getCoinsOpenUrl()) . '"></span>' : ''?> </div> </div> <?php if ($thumbnail && $thumbnailAlignment == 'right'): ?> - <?=$thumbnail ?> + <?=$thumbnail?> <?php endif ?> </div> <!-- finc: recordDriver - DefaultRecord - result-list - END --> diff --git a/themes/finc/templates/RecordDriver/SolrAI/result-list.phtml b/themes/finc/templates/RecordDriver/SolrAI/result-list.phtml index a9c08f9fae6..df20380b382 100644 --- a/themes/finc/templates/RecordDriver/SolrAI/result-list.phtml +++ b/themes/finc/templates/RecordDriver/SolrAI/result-list.phtml @@ -32,10 +32,11 @@ if ($cover): <?php endif ?> <div class="media-body"> <div class="result-body"> - <?php /* finc: add header element and use h2 for record title #19396 */ ?> + <?php /* finc: add header element for title and author; use h2 for record title #19396 */ ?> <header> <h2> - <a id="<?=$describedById?>" href="<?=$this->recordLink()->getUrl($this->driver)?>" class="title getFull" data-view="<?=$this->params->getOptions()->getListViewOption()?>" lang=""> + <?php /* finc adds aria and lang code */ ?> + <a id="<?=$describedById?>" href="<?=$this->recordLink()->getUrl($this->driver)?>" class="title getFull" data-view="<?=isset($this->params) ? $this->params->getOptions()->getListViewOption(): 'list' ?>" lang=""> <?=$this->record($this->driver)->getTitleHtml()?> </a> </h2> @@ -50,12 +51,14 @@ if ($cover): <?=$this->transEsc('by')?> <?php $authorCount = count($summAuthors); foreach ($summAuthors as $i => $summAuthor): ?> - <a href="<?=$this->record($this->driver)->getLink('author', $this->highlight($summAuthor, null, true, false))?>" class="author"><?=$this->highlight($summAuthor)?></a><?=$i + 1 < $authorCount ? ',' : ''?> + <a href="<?=$this->record($this->driver)->getLink('author', $this->highlight($summAuthor, null, true, false))?>" class="author"><?=$this->highlight(rtrim($summAuthor, ','))?></a><?=$i + 1 < $authorCount ? ',' : ''?> <?php endforeach; ?> <?php endif; ?> </header> <div> - <?php /* finc-specific from here - 04.16 - CK */ ?> + <?php + /* finc-specific from here, #8639, #7345 - CK */ + /* finc-specific: nxt line #8639 - CK */ ?> <?php $journalTitle = $this->driver->getContainerTitle(); $summDate = $this->driver->getPublishDateSort(); ?> <?php if (!empty($journalTitle)): ?> @@ -84,7 +87,7 @@ if ($cover): <?=!empty($summDate) ? ' (' . $this->escapeHtml($summDate) . ')' : ''?> <?php elseif (!empty($summDate)): ?> <?php /* finc: remove linebreak #19396 */ ?> - <?php /* finc-specific: nxt line #8639 - CK */ ?> + <?php /* finc removes [0] in nxt line #8639 - CK */ ?> <?=$this->transEsc('Published') . ' ' . $this->escapeHtml($summDate)?> <?php endif; ?> <?php $summInCollection = $this->driver->getContainingCollections(); @@ -92,7 +95,7 @@ if ($cover): <?php foreach ($summInCollection as $collId => $collText): ?> <div> <strong><?=$this->transEsc("in_collection_label")?></strong> - <a class="collectionLinkText" href="<?=$this->url('collection', ['id' => $collId])?>?recordID=<?=urlencode($this->driver->getUniqueID())?>"> + <a class="collectionLinkText" href="<?=$this->record($this->driver)->getLink('collection', $collId)?>"> <?=$this->escapeHtml($collText)?> </a> </div> @@ -104,7 +107,7 @@ if ($cover): <?php if (!$this->driver->isCollection()): ?> <?php if ($snippet = $this->driver->getHighlightedSnippet()): ?> <?php if (!empty($snippet['caption'])): ?> - <strong><?=$this->transEsc($snippet['caption'])?>:</strong> '; + <strong><?=$this->transEsc($snippet['caption'])?>:</strong> <?php endif; ?> <?php if (!empty($snippet['snippet'])): ?> <span class="quotestart">“</span>...<?=$this->highlight($snippet['snippet'])?>...<span class="quoteend">”</span><br/> @@ -131,16 +134,14 @@ if ($cover): <?php endif; ?> </div> - <?php /* We need to find out if we're supposed to display an OpenURL link ($openUrlActive), - but even if we don't plan to display the link, we still want to get the $openUrl - value for use in generating a COinS (Z3988) tag -- see bottom of file. - */ - $openUrl = $this->openUrl($this->driver, 'results'); - $openUrlActive = $openUrl->isActive(); - $doi = $this->doi($this->driver, 'results'); - $doiActive = $doi->isActive(); - // Account for replace_other_urls setting - $urls = $this->record($this->driver)->getLinkDetails($openUrlActive); + <?php + // Display an OpenURL link if configured to do so: + $openUrl = $this->openUrl($this->driver, 'results'); + $openUrlActive = $openUrl->isActive(); + $doi = $this->doi($this->driver, 'results'); + $doiActive = $doi->isActive(); + // Account for replace_other_urls setting + $urls = $this->record($this->driver)->getLinkDetails($openUrlActive); if ($openUrlActive || $doiActive || !empty($urls)): ?> <?php if ($openUrlActive): ?> @@ -148,12 +149,13 @@ if ($cover): <?=$openUrl->renderTemplate()?> <?php endif; ?> <?php if ($doiActive): ?> - <br/> - <?=$doi->renderTemplate()?> - <?php endif; ?> + <br/> + <?=$doi->renderTemplate()?> + <?php endif; ?> <?php if (!is_array($urls)) $urls = []; - if (!$this->driver->isCollection()): - foreach ($urls as $current): ?> + if (!$this->driver->isCollection()): + foreach ($urls as $current): ?> + <?php /* finc: add external link view helper */ ?> <?= $this->externalLink( $this->escapeHtmlAttr($this->proxyUrl($current['url'])), '<i class="fa fa-external-link" aria-hidden="true"></i> ' @@ -167,13 +169,13 @@ if ($cover): <?php endif; ?> <div class="result-formats"> - <?=$this->record($this->driver)->getFormatList()?> + <?=$this->record($this->driver)->getFormatList() ?> - <?php /* nxt line finc-specific: #5737 removed '(!$openUrlActive && empty($urls) &&' - CK */ ?> + <?php /* #5737 removes '(!$openUrlActive && empty($urls) &&' - CK */ ?> <?php if ($this->driver->supportsAjaxStatus()): ?> <span class="status ajax-availability hidden"> - <span class="label label-default"><?=$this->transEsc('Loading')?> ...</span> - </span> + <span class="label label-default"><?=$this->transEsc('Loading')?> ...</span> + </span> <?php endif; ?> </div> @@ -188,50 +190,56 @@ if ($cover): // Add JS Variables for QrCode $this->jsTranslations()->addStrings(['qrcode_hide' => 'qrcode_hide', 'qrcode_show' => 'qrcode_show']); ?> + <?php /* finc removes span + class for accessibility */ ?> <i class="fa fa-fw fa-qrcode" aria-hidden="true"></i> <a href="<?=$this->escapeHtmlAttr($QRCode);?>" class="qrcodeLink"><?=$this->transEsc('qrcode_show')?></a> - <span class="qrcode hidden"> + <div class="qrcode hidden"> <script class="qrCodeImgTag"> <img alt="<?=$this->transEscAttr('QR Code')?>" src="<?=$this->escapeHtmlAttr($QRCode);?>"/> </script> - </span> + </div> <br/> <?php endif; ?> - <?php if ($this->cart()->isActiveInSearch() && $this->params->getOptions()->supportsCart() && $this->cart()->isActive()): ?> - <?=$this->render('record/cart-buttons.phtml', ['id' => $this->driver->getUniqueId(), 'source' => $this->driver->getSourceIdentifier()]);?> + <?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 endif; ?> <?php if ($this->userlist()->getMode() !== 'disabled'): ?> <?php /* if ($this->permission()->allowDisplay('feature.Favorites')): */ ?> - <?php /* Add to favorites; finc: keep Icon inside link - CK */ ?> - <a + <?php /* Add to favorites; + finc: keep Icon inside link + finc adds accessibility code */ ?> + <a href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>?refreshOnClose=false" data-lightbox class="save-record result-link-label" data-id="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" aria-describedby="<?=$describedById?>" - > - <?php /* finc: remove whitespace/line breake before 'Add to favorites' */ ?> - <i class="result-link-icon fa fa-fw fa-star" aria-hidden="true"></i><span><?=$this->transEsc('Add to favorites')?></span> - </a><br/> - <?php elseif ($block = $this->permission()->getAlternateContent('feature.Favorites')): ?> - <?=$block?> - <?php endif; ?> - <?php /* Saved lists */ ?> - <p class="savedLists" aria-live="polite"> - <strong><?=$this->transEsc("Saved in")?>:</strong> - </p> + > + <?php /* finc: remove whitespace/line breake before 'Add to favorites' */ ?> + <i class="result-link-icon fa fa-fw fa-star" aria-hidden="true"></i><span><?=$this->transEsc('Add to favorites')?></span> + </a><br/> + <?php elseif ($block = $this->permission()->getAlternateContent('feature.Favorites')): ?> + <?=$block?> + <?php endif; ?> + <?php /* Saved lists */ ?> + <p class="savedLists" aria-live="polite"> + <strong><?=$this->transEsc("Saved in")?>:</strong> + </p> <?php /* endif; */ ?> - <?php /* Hierarchy tree link; finc: keep Icon inside link - CK */ ?> + <?php /* Hierarchy tree link; + finc: keep Icon inside link; + finc adds its own styles and formatting - CK */ ?> <?php $trees = $this->driver->tryMethod('getHierarchyTrees'); if (!empty($trees)): ?> <?php foreach ($trees as $hierarchyID => $hierarchyTitle): ?> <div class="hierarchyTreeLink"> - <input type="hidden" value="<?=$this->escapeHtmlAttr($hierarchyID)?>" class="hiddenHierarchyId"/> - <a class="hierarchyTreeLinkText result-link-label" data-lightbox href="<?=$this->recordLink()->getTabUrl($this->driver, 'HierarchyTree')?>?hierarchy=<?=urlencode($hierarchyID)?>#tabnav" title="<?=$this->transEscAttr('hierarchy_tree')?>" data-lightbox-href="<?=$this->recordLink()->getTabUrl($this->driver, 'AjaxTab')?>?hierarchy=<?=urlencode($hierarchyID)?>" data-lightbox-post="tab=hierarchytree" aria-describedby="<?=$describedById?>"> + <input type="hidden" value="<?=$this->escapeHtmlAttr($hierarchyID)?>" class="hiddenHierarchyId" /> + <a class="hierarchyTreeLinkText result-link-label" data-lightbox href="<?=$this->recordLink()->getTabUrl($this->driver, 'HierarchyTree', ['hierarchy' => $hierarchyID])?>#tabnav" title="<?=$this->transEscAttr('hierarchy_tree')?>" data-lightbox-href="<?=$this->recordLink()->getTabUrl($this->driver, 'AjaxTab', ['hierarchy' => $hierarchyID])?>" data-lightbox-post="tab=hierarchytree" aria-describedby="<?=$describedById?>"> <?php /* finc: remove whitespace/line breake before 'hierarchy_view_context' */ ?> - <i class="result-link-icon fa fa-fw fa-sitemap" aria-hidden="true"></i><span class="hidden-xs hidden-sm"><?=$this->transEsc('hierarchy_view_context')?></span><?php if (count($trees) > 1): ?>: <?=$this->escapeHtml($hierarchyTitle)?><?php endif; ?> + <i class="result-link-icon fa fa-fw fa-sitemap" aria-hidden="true"></i><span><?=$this->transEsc('hierarchy_view_context')?></span><?php if (count($trees) > 1): ?>: <?=$this->escapeHtml($hierarchyTitle)?><?php endif; ?> </a> </div> <?php endforeach; ?> diff --git a/themes/finc/templates/myresearch/acquisition.phtml b/themes/finc/templates/myresearch/acquisition.phtml index 86941eaa7c6..3c541783a3c 100644 --- a/themes/finc/templates/myresearch/acquisition.phtml +++ b/themes/finc/templates/myresearch/acquisition.phtml @@ -49,7 +49,7 @@ $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . </form> </div> <?php /* finc: use section for sidebar #23430 */ ?> -<section class="<?=$this->layoutClass('sidebar')?>" id="myresearch-sidebar" aria-label="<?=$this->transEsc('MyAccountSidebar') ?>"> +<section class="<?=$this->layoutClass('sidebar')?>" id="myresearch-sidebar" aria-label="<?=$this->transEscAttr('MyAccountSidebar') ?>"> <?= $this->context($this)->renderInContext("myresearch/menu.phtml", ['active' => 'profile']) ?> </section> diff --git a/themes/finc/templates/myresearch/bulk-action-buttons.phtml b/themes/finc/templates/myresearch/bulk-action-buttons.phtml index 25afa9cc377..72292fc53ed 100644 --- a/themes/finc/templates/myresearch/bulk-action-buttons.phtml +++ b/themes/finc/templates/myresearch/bulk-action-buttons.phtml @@ -24,4 +24,4 @@ <?php endif; ?> </ul> </nav> -<!-- finc: myresearch - bulk-action-buttons --> +<!-- finc: myresearch - bulk-action-buttons - END --> diff --git a/themes/finc/templates/myresearch/checkedout.phtml b/themes/finc/templates/myresearch/checkedout.phtml index 9dadf1d4b29..e2fd4c364f6 100644 --- a/themes/finc/templates/myresearch/checkedout.phtml +++ b/themes/finc/templates/myresearch/checkedout.phtml @@ -224,7 +224,7 @@ </div> <?php /* finc: use section for sidebar #23430 */ ?> -<section class="<?=$this->layoutClass('sidebar')?>" id="myresearch-sidebar" aria-label="<?=$this->transEsc('MyAccountSidebar') ?>"> +<section class="<?=$this->layoutClass('sidebar')?>" id="myresearch-sidebar" aria-label="<?=$this->transEscAttr('MyAccountSidebar') ?>"> <?=$this->context($this)->renderInContext("myresearch/menu.phtml", ['active' => 'checkedout'])?> </section> <!-- finc: myresearch - checkedout - END --> diff --git a/themes/finc/templates/myresearch/fines.phtml b/themes/finc/templates/myresearch/fines.phtml index fea2e9cd97e..5320c766664 100644 --- a/themes/finc/templates/myresearch/fines.phtml +++ b/themes/finc/templates/myresearch/fines.phtml @@ -91,7 +91,7 @@ </div> <?php /* finc: use section for sidebar #23430 */ ?> -<section class="<?=$this->layoutClass('sidebar')?>" id="myresearch-sidebar" aria-label="<?=$this->transEsc('MyAccountSidebar') ?>"> +<section class="<?=$this->layoutClass('sidebar')?>" id="myresearch-sidebar" aria-label="<?=$this->transEscAttr('MyAccountSidebar') ?>"> <?=$this->context($this)->renderInContext("myresearch/menu.phtml", ['active' => 'fines'])?> </section> diff --git a/themes/finc/templates/myresearch/historicloans.phtml b/themes/finc/templates/myresearch/historicloans.phtml index 020fc349366..3a0aef9bb9e 100644 --- a/themes/finc/templates/myresearch/historicloans.phtml +++ b/themes/finc/templates/myresearch/historicloans.phtml @@ -45,6 +45,7 @@ <ul class="record-list"> <?php $i = 0; foreach ($this->transactions as $resource): ?> <?php $ilsDetails = $resource->getExtraDetail('ils_details'); ?> + <?php $describedById = $resource->getSourceIdentifier() . '|' . (empty($resource->getUniqueId()) ? md5(serialize($resource->getExtraDetail("ils_details"))) : $resource->getUniqueId()); ?> <li id="record<?=$this->escapeHtmlAttr($resource->getUniqueId())?>" class="result"> <?php $coverDetails = $this->record($resource)->getCoverDetails('checkedout', 'small', $this->recordLink()->getUrl($resource)); @@ -75,7 +76,7 @@ '" class="title" lang="">' . $title . '</a></h2>'; } 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 '<h2 class="title" lang="">' . $this->escapeHtml($ilsDetails['title']) . '</h2>'; + echo '<h2 class="title" id="' . $describedById . '" lang="">' . $this->escapeHtml($ilsDetails['title']) . '</h2>'; } else { // Last resort -- indicate that no title could be found. echo $this->transEsc('Title not available'); @@ -141,7 +142,7 @@ </div> <?php /* finc: use section for sidebar #23430 */ ?> -<section class="<?=$this->layoutClass('sidebar')?>" id="myresearch-sidebar" aria-label="<?=$this->transEsc('MyAccountSidebar') ?>"> +<section class="<?=$this->layoutClass('sidebar')?>" id="myresearch-sidebar" aria-label="<?=$this->transEscAttr('MyAccountSidebar') ?>"> <?=$this->context($this)->renderInContext("myresearch/menu.phtml", ['active' => 'historicloans'])?> </section> <!-- finc: myresearch - historicloans - END --> diff --git a/themes/finc/templates/myresearch/illrequests.phtml b/themes/finc/templates/myresearch/illrequests.phtml index b6f8dfe7141..88e0174c595 100644 --- a/themes/finc/templates/myresearch/illrequests.phtml +++ b/themes/finc/templates/myresearch/illrequests.phtml @@ -191,7 +191,7 @@ </div> <?php /* finc: use section for sidebar #23430 */ ?> -<section class="<?=$this->layoutClass('sidebar')?>" id="myresearch-sidebar" aria-label="<?=$this->transEsc('MyAccountSidebar') ?>"> +<section class="<?=$this->layoutClass('sidebar')?>" id="myresearch-sidebar" aria-label="<?=$this->transEscAttr('MyAccountSidebar') ?>"> <?=$this->context($this)->renderInContext("myresearch/menu.phtml", ['active' => 'ILLRequests'])?> </section> diff --git a/themes/finc/templates/myresearch/mylist.phtml b/themes/finc/templates/myresearch/mylist.phtml index a110bd9f175..dc2a5f9b45b 100644 --- a/themes/finc/templates/myresearch/mylist.phtml +++ b/themes/finc/templates/myresearch/mylist.phtml @@ -96,7 +96,7 @@ </div> <?php /* finc: use section for sidebar #23430 */ ?> -<section class="<?=$this->layoutClass('sidebar')?>" id="myresearch-sidebar" aria-label="<?=$this->transEsc('MyAccountSidebar') ?>"> +<section class="<?=$this->layoutClass('sidebar')?>" id="myresearch-sidebar" aria-label="<?=$this->transEscAttr('MyAccountSidebar') ?>"> <?php /* nxt-line and related endif are finc-specific #12053, CK*/ ?> <?php if ($user): ?> <?=$this->context($this)->renderInContext("myresearch/menu.phtml", ['active' => isset($list) ? 'list' . $list['id'] : 'favorites'])?> diff --git a/themes/finc/templates/myresearch/newpassword.phtml b/themes/finc/templates/myresearch/newpassword.phtml index b8e67a07fdb..334b80035ff 100644 --- a/themes/finc/templates/myresearch/newpassword.phtml +++ b/themes/finc/templates/myresearch/newpassword.phtml @@ -40,7 +40,7 @@ <?php if ($this->auth()->isLoggedIn()): ?> </div> <?php /* finc adds id to sidebar; use section for sidebar #23430 */ ?> - <section class="<?=$this->layoutClass('sidebar')?>" id="myresearch-sidebar" aria-label="<?=$this->transEsc('MyAccountSidebar') ?>"> + <section class="<?=$this->layoutClass('sidebar')?>" id="myresearch-sidebar" aria-label="<?=$this->transEscAttr('MyAccountSidebar') ?>"> <?=$this->context($this)->renderInContext("myresearch/menu.phtml", ['active' => 'newpassword'])?> </section> <?php endif; ?> diff --git a/themes/finc/templates/myresearch/profile.phtml b/themes/finc/templates/myresearch/profile.phtml index 820c8547f45..90409ec4334 100644 --- a/themes/finc/templates/myresearch/profile.phtml +++ b/themes/finc/templates/myresearch/profile.phtml @@ -61,7 +61,7 @@ </div> <?php /* finc: use section for sidebar #23430 */ ?> -<section class="<?=$this->layoutClass('sidebar')?>" id="myresearch-sidebar" aria-label="<?=$this->transEsc('MyAccountSidebar') ?>"> +<section class="<?=$this->layoutClass('sidebar')?>" id="myresearch-sidebar" aria-label="<?=$this->transEscAttr('MyAccountSidebar') ?>"> <?=$this->context($this)->renderInContext("myresearch/menu.phtml", ['active' => 'profile'])?> </section> <!-- finc: myresearch - profile - END --> diff --git a/themes/finc/templates/myresearch/setpin.phtml b/themes/finc/templates/myresearch/setpin.phtml index 4411a0f0389..d3ec8d6401c 100644 --- a/themes/finc/templates/myresearch/setpin.phtml +++ b/themes/finc/templates/myresearch/setpin.phtml @@ -59,7 +59,7 @@ $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . </div> <?php /* finc: use section for sidebar #23430 */ ?> - <section class="<?=$this->layoutClass('sidebar')?>" id="myresearch-sidebar" aria-label="<?=$this->transEsc('MyAccountSidebar') ?>"> + <section class="<?=$this->layoutClass('sidebar')?>" id="myresearch-sidebar" aria-label="<?=$this->transEscAttr('MyAccountSidebar') ?>"> <?=$this->context($this)->renderInContext("myresearch/menu.phtml", ['active' => 'setpin'])?> </section> <?php endif; ?> diff --git a/themes/finc/templates/search/history.phtml b/themes/finc/templates/search/history.phtml index 72a6ef69094..56c1bc30ae6 100644 --- a/themes/finc/templates/search/history.phtml +++ b/themes/finc/templates/search/history.phtml @@ -65,7 +65,7 @@ $isLoggedIn = $this->auth()->isLoggedIn(); <?php /* finc: show offcanvas-toggler and profile-menu only if $isLoggedIn */ ?> <?php if ($isLoggedIn): ?> <?php /* finc: use section for sidebar #23430 */ ?> - <section class="<?=$this->layoutClass('sidebar')?>" id="myresearch-sidebar" aria-label="<?=$this->transEsc('MyAccountSidebar') ?>"> + <section class="<?=$this->layoutClass('sidebar')?>" id="myresearch-sidebar" aria-label="<?=$this->transEscAttr('MyAccountSidebar') ?>"> <?=$this->context($this)->renderInContext( "myresearch/menu.phtml", // apply active highlighting in profile-menu -- GitLab