From c9312225812679df29451ace3e2bf74497eb85bf Mon Sep 17 00:00:00 2001
From: Heike Reinken <reinken@ub.uni-leipzig.de>
Date: Wed, 17 Jun 2020 15:02:21 +0200
Subject: [PATCH] refs #17717 [master] Add a 'skip to' link to the sidefacets
 for search results page * Add a 'skip to' link to the sidefacets only for the
 search results page * Do not show this link for XS screen * Refine the skip
 to message ** Add prefix ** Distinguish between de and en language * Remove
 "Weiter" in the skip link text for German translation

---
 local/languages/de.ini                    | 5 ++++-
 local/languages/en.ini                    | 4 ++++
 themes/finc/templates/layout/layout.phtml | 8 ++++++++
 3 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/local/languages/de.ini b/local/languages/de.ini
index a7308e4a403..7ae1450eb6c 100644
--- a/local/languages/de.ini
+++ b/local/languages/de.ini
@@ -1996,10 +1996,13 @@ ReliefPrint = Druckgraphik
 Modal_description = "Sie befinden sich in einem Dialogfenster, das über dem Hauptinhalt der Seiten liegt. Drücken Sie die Escape-Taste oder die Schaltfläche 'Dialogfenster schließen', um das Fenster zu schließen und auf der Hauptseite weiterzuarbeiten."
 
 ; #17598
-Skip to search = "Weiter zum Suchbereich"
+Skip to search = "Zum Suchbereich"
 ; Overwrite, only in de.ini necessary:
 Search type = "Suchtyp"
 
 License = "Lizenz"
 
+; #17717
+Skip to content = "Zum Inhalt"
+
 fine_date_short = "Gebühr fällig"
\ No newline at end of file
diff --git a/local/languages/en.ini b/local/languages/en.ini
index 9f40eb2a5a4..2ad618693eb 100644
--- a/local/languages/en.ini
+++ b/local/languages/en.ini
@@ -2098,4 +2098,8 @@ Skip to search = "Skip to search"
 
 License = "License"
 
+; #17717
+; only necessary in en.ini
+skip-to = "Skip to "
+
 fine_date_short = "Fine Date"
\ No newline at end of file
diff --git a/themes/finc/templates/layout/layout.phtml b/themes/finc/templates/layout/layout.phtml
index 3af2712633c..ea1281fba3b 100644
--- a/themes/finc/templates/layout/layout.phtml
+++ b/themes/finc/templates/layout/layout.phtml
@@ -162,6 +162,14 @@ if (!isset($this->layout()->searchbox)) {
   <a class="sr-only" href="#searchForm_lookfor"><?=$this->transEsc('Skip to search')?></a>
 <?php endif; ?>
 <a class="sr-only" href="#content"><?=$this->transEsc('Skip to content')?></a>
+<?php if (substr_count(strtolower($this->layout()->templateName), 'results') > 0): ?>
+  <?php if (strcmp($this->layout()->userLang, 'de') == 0): ?>
+    <a class="sr-only hidden-xs" href="#search-sidebar"><?=$this->transEsc(isset($this->overrideSideFacetCaption) ? $this->overrideSideFacetCaption : 'Narrow Search')?></a>
+  <?php else: ?>
+      <a class="sr-only hidden-xs" href="#search-sidebar"><?=$this->transEsc('skip-to')?><?=strtolower($this->transEsc(isset($this->overrideSideFacetCaption) ? $this->overrideSideFacetCaption : 'Narrow Search'))?></a>
+  <?php endif; ?>
+<?php endif; ?>
+
 
 <?php /* Start header here, not above, custom finc, CK */ ?>
 <header class="hidden-print">
-- 
GitLab