Bug 25236: Fix semantic heading for opac-facets.inc
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 11 Jun 2020 10:37:26 +0000 (11:37 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 24 Jun 2020 13:05:02 +0000 (15:05 +0200)
Prior to this patch, the opac-facets side navigation box contained
semantically incorrect headings.

Test plan
1/ Perform a search which yields some results in the OPAC
2/ Inspect the 'Refine your search' elements on the left side of the
screen. Note that the headings are H1 (Koha page title) > H4 (Refine
your search) > H5 (Headings within 'Refine your search' box)
3/ Apply this patch and follow
https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client
4/ Reload the page (Flushing the cache to ensure the CSS change load)
5/ Re-inspect the 'Refine your search' elements and note the heading
semantics are now H1 (Title of page) > H2 (Refine your search) > H3
(Headings within 'Refine your search')
6/ Note the appearance of the box is still reasonable
7/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss
koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc

index 442d275..818d9f9 100644 (file)
@@ -2061,7 +2061,7 @@ input {
         margin: 0;
     }
 
-    h4 {
+    h2 {
         font-size: 90%;
         margin: 0 0 .6em 0;
         text-align: center;
@@ -2076,6 +2076,10 @@ input {
         }
     }
 
+    h3 {
+        font-size: 80%;
+    }
+
     li {
         font-size: 90%;
         font-weight: bold;
index da5e981..ddcc3a4 100644 (file)
@@ -3,9 +3,9 @@
 [% USE Languages %]
 [% IF ( opacfacets && facets_loop && total ) %]
     <div id="search-facets">
-        <h4><a href="#" class="menu-collapse-toggle">Refine your search</a></h4>
+        <h2><a href="#" class="menu-collapse-toggle">Refine your search</a></h2>
         <ul class="menu-collapse">
-            <li id="availability_facet"><h5 id="facet-availability">Availability</h5>
+            <li id="availability_facet"><h3 id="facet-availability">Availability</h3>
                 <ul>
                     <li>
                         [% IF ( available ) %]
             [% FOREACH facets_loo IN facets_loop %]
                 [% IF facets_loo.facets.size > 0 %]
                     <li id="[% facets_loo.type_id | html %]">
-                        [% IF facets_loo.type_label_Authors %]<h5 id="facet-authors">Authors</h5>[% END %]
-                        [% IF facets_loo.type_label_Titles %]<h5 id="facet-titles">Titles</h5>[% END %]
-                        [% IF facets_loo.type_label_Topics %]<h5 id="facet-topics">Topics</h5>[% END %]
-                        [% IF facets_loo.type_label_Places %]<h5 id="facet-places">Places</h5>[% END %]
-                        [% IF facets_loo.type_label_Series %]<h5 id="facet-series">Series</h5>[% END %]
-                        [% IF facets_loo.type_label_ItemTypes %]<h5 id="facet-itemtypes">Item types</h5>[% END %]
-                        [% IF facets_loo.type_label_CollectionCodes %]<h5 id="facet-collections">Collections</h5>[% END %]
-                        [% IF facets_loo.type_label_Language %]<h5 id="facet-languages">Languages</h5>[% END %]
+                        [% IF facets_loo.type_label_Authors %]<h3 id="facet-authors">Authors</h3>[% END %]
+                        [% IF facets_loo.type_label_Titles %]<h3 id="facet-titles">Titles</h3>[% END %]
+                        [% IF facets_loo.type_label_Topics %]<h3 id="facet-topics">Topics</h3>[% END %]
+                        [% IF facets_loo.type_label_Places %]<h3 id="facet-places">Places</h3>[% END %]
+                        [% IF facets_loo.type_label_Series %]<h3 id="facet-series">Series</h3>[% END %]
+                        [% IF facets_loo.type_label_ItemTypes %]<h3 id="facet-itemtypes">Item types</h3>[% END %]
+                        [% IF facets_loo.type_label_CollectionCodes %]<h3 id="facet-collections">Collections</h3>[% END %]
+                        [% IF facets_loo.type_label_Language %]<h3 id="facet-languages">Languages</h3>[% END %]
                         [% UNLESS singleBranchMode %]
-                            [% IF ( facets_loo.type_label_HomeLibrary ) %]<h5 id="facet-home-libraries">Home libraries</h5>[% END %]
-                            [% IF ( facets_loo.type_label_HoldingLibrary ) %]<h5 id="facet-holding-libraries">Holding libraries</h5>[% END %]
+                            [% IF ( facets_loo.type_label_HomeLibrary ) %]<h3 id="facet-home-libraries">Home libraries</h3>[% END %]
+                            [% IF ( facets_loo.type_label_HoldingLibrary ) %]<h3 id="facet-holding-libraries">Holding libraries</h3>[% END %]
                         [% END %]
-                        [% IF facets_loo.type_label_Location %]<h5 id="facet-locations">Locations</h5>[% END %]
+                        [% IF facets_loo.type_label_Location %]<h3 id="facet-locations">Locations</h3>[% END %]
                         <ul>
                             [% SET url = "/cgi-bin/koha/opac-search.pl?" _ query_cgi _ limit_cgi %]
                             [% IF ( sort_by ) %]