From 8622912f604d4fabec7c00a57e860432f1ff636a Mon Sep 17 00:00:00 2001
From: Viola Elsenhans <elsenhans@ub.uni-leipzig.de>
Date: Tue, 12 Apr 2022 12:26:45 +0200
Subject: [PATCH] refs #19406 [finc] change facet titles to h3

* fixing bugs for mobile
---
 themes/finc-accessibility/scss/compiled.scss       | 14 ++++++++++++++
 .../Recommend/SideFacets/filter-list.phtml         |  3 ++-
 themes/finc/templates/Recommend/SideFacets.phtml   |  9 ++++++---
 3 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/themes/finc-accessibility/scss/compiled.scss b/themes/finc-accessibility/scss/compiled.scss
index db481aca78b..8f930d159bf 100644
--- a/themes/finc-accessibility/scss/compiled.scss
+++ b/themes/finc-accessibility/scss/compiled.scss
@@ -50,6 +50,20 @@
   padding: 0;
 }
 
+// adapt style for h3 in sidebar
+#myresearch-sidebar {
+  h3 {
+    font-size: $font-size-base;
+    margin: 0;
+  }
+
+  .facet-group:not(.active-filters) h3 {
+    @media (max-width: $screen-xs-max) {
+      padding-left: 0;
+    }
+  }
+}
+
 // remove filter links styling
 a.remove-filter {
   display: flex;
diff --git a/themes/finc-accessibility/templates/Recommend/SideFacets/filter-list.phtml b/themes/finc-accessibility/templates/Recommend/SideFacets/filter-list.phtml
index 3d2c763fce3..a6b0fc61aef 100644
--- a/themes/finc-accessibility/templates/Recommend/SideFacets/filter-list.phtml
+++ b/themes/finc-accessibility/templates/Recommend/SideFacets/filter-list.phtml
@@ -1,7 +1,8 @@
 <!-- finc-accessibility - Recommend - SideFacets - filter-list.phtml -->
 <?php /* #18509 copied from bootstrap for adding language tags to displayText */ ?>
 <div class="facet-group active-filters">
-  <div class="title"><?=$this->transEsc('Remove Filters')?> <span class="sr-only"><?=$this->transEsc('facet_deselect_hint') ?></span></div>
+  <?php /* change div of Remove Filters to h3, #19406 - VE */ ?>
+  <h3 class="title"><?=$this->transEsc('Remove Filters') ?> <span class="sr-only"><?=$this->transEsc('facet_deselect_hint') ?></span></h3>
   <ul>
   <?php foreach ($filterList as $field => $filters): ?>
     <?php foreach ($filters as $i => $filter): ?>
diff --git a/themes/finc/templates/Recommend/SideFacets.phtml b/themes/finc/templates/Recommend/SideFacets.phtml
index 3e524b47682..1d1cf7105f0 100644
--- a/themes/finc/templates/Recommend/SideFacets.phtml
+++ b/themes/finc/templates/Recommend/SideFacets.phtml
@@ -55,9 +55,12 @@ if ($hierarchicalFacets) {
 <?php if (!empty($sideFacetSet) && $results->getResultTotal() > 0): ?>
   <?php foreach ($sideFacetSet as $title => $cluster): ?>
     <div class="facet-group" id="side-panel-<?=$this->escapeHtmlAttr($title)?>">
-      <a <?php if(in_array($title, $collapsedFacets)): ?>class="title collapsed" aria-expanded="false"<?php else: ?>class="title" aria-expanded="true"<?php endif ?> data-toggle="collapse" href="#side-collapse-<?=$this->escapeHtmlAttr($title) ?>" >
-        <?=$this->transEsc($cluster['label'])?> <span class="sr-only"><?=$this->transEsc('facet_select_hint') ?></span>
-      </a>
+      <?php /* add h3, #19406 - VE */ ?>
+      <h3>
+        <a <?php if(in_array($title, $collapsedFacets)): ?>class="title collapsed" aria-expanded="false"<?php else: ?>class="title" aria-expanded="true"<?php endif ?> data-toggle="collapse" href="#side-collapse-<?=$this->escapeHtmlAttr($title) ?>" >
+          <?=$this->transEsc($cluster['label'])?> <span class="sr-only"><?=$this->transEsc('facet_select_hint') ?></span>
+        </a>
+      </h3>
       <ul id="side-collapse-<?=$this->escapeHtmlAttr($title)?>" class="collapse<?php if (!in_array($title, $collapsedFacets)): ?> in<?php endif ?>">
         <?=$this->context($this)->renderInContext(
           'Recommend/SideFacets/facet.phtml',
-- 
GitLab