Bug 39356: Change heading ranks when ranks are skipped

Test plan:

1- Check all headings on the pages (you can use tools like HeadingsMap)
2- Verify that no heading ranks are skipped
3- If it's the case, the test succeeds

Pages to check:
- opac-main.pl
- opac-curbside-pickups.pl
- opac-memberentry.pl
- opac-recalls.pl
- opac-user.pl
- opac-details.pl (shelf browser, the modal that open after a click on
  "Cite" in the sidebar)

Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Andrew Auld <andrew.auld@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
nina martinez 2025-03-19 14:10:29 +01:00 committed by Katrin Fischer
parent ccebc42872
commit 91a934fbdf
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
7 changed files with 21 additions and 10 deletions

View File

@ -4,12 +4,12 @@
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title" id="citeModalLabel">[% biblio.title | html %]</h3>
<h1 class="modal-title" id="citeModalLabel">[% biblio.title | html %]</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
[% FOREACH system IN cites.keys.sort %]
<h3>[% system | html %]</h3>
<h2>[% system | html %]</h2>
<p>[% cites.$system | html %]</p>
[% END %]
</div>

View File

@ -1,14 +1,14 @@
[% BLOCK shelfbrowser %]
[% IF OpenOPACShelfBrowser %]
<div id="shelfbrowser">
<h5 style="text-align: center;" tabindex="-1">
<h2 style="text-align: center;" tabindex="-1">
[%- IF ( starting_homebranch ) %]<span>Browsing [% starting_homebranch | html %] shelves</span>[% END -%]
[%- IF ( starting_homebranch && starting_location ) %],[% END %]
[%- IF ( starting_location ) %]<span>Shelving location:</span> [%- starting_location | html -%][% END -%]
[%- IF ( starting_homebranch && starting_ccode ) %],[% END %]
[%- IF ( starting_ccode ) %]<span>Collection: [%- starting_ccode | html -%]</span>[% END -%]
<a style="font-size: 75%;" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber | html %]" class="close_shelf">Close shelf browser <span class="sr-only">(Hides shelf browser)</span></a>
</h5>
</h2>
<table class="table">
<tr>

View File

@ -106,7 +106,7 @@
</div>
<div class="col-md-12 col-lg-10 order-1">
<div id="pickupdetails" class="maincontent">
<h2>Curbside pickups</h2>
<h1>Curbside pickups</h1>
[% FOR m IN messages %]
[% SET alert_type = "alert alert-info" %]

View File

@ -86,13 +86,13 @@
[% SET show_author = Koha.Preference('NewsAuthorDisplay') == 'opac' || Koha.Preference('NewsAuthorDisplay') == 'both' %]
[% FOREACH koha_new IN koha_news.content %]
<div class="newsitem">
<h4 class="newsheader">
<h2 class="newsheader">
[% IF ( news_item ) %]
[% koha_new.title | html %]
[% ELSE %]
<a id="newsitem[% koha_new.additional_content.id | html %]" href="/cgi-bin/koha/opac-main.pl?news_id=[% koha_new.additional_content.id | uri %]">[% koha_new.title | html %]</a>
[% END %]
</h4>
</h2>
<div class="newsbody">[% koha_new.content | $raw %]</div>
<div class="newsfooter">
Published on [% koha_new.published_on | $KohaDates %]
@ -167,6 +167,7 @@
<form action="/cgi-bin/koha/opac-user.pl" method="post" name="auth" id="auth" autocomplete="off">
[% INCLUDE 'csrf-token.inc' %]
<input type="hidden" name="koha_login_context" value="opac" />
<h2 class="sr-only">Login form</h2>
<fieldset class="brief">
<legend>Log in to your account:</legend>
[% IF ( Koha.Preference('GoogleOpenIDConnect') == 1 ) %]

View File

@ -152,6 +152,7 @@
[% IF has_guarantor_flag && !Koha.Preference('OPACPrivacy') && ( Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') || Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') ) %]
<div class="row">
<div class="col">
<h2 class="sr-only">Privacy</h2>
<fieldset class="rows" id="memberentry_privacy">
<legend id="privacy_legend">Privacy</legend>
<ol>
@ -228,6 +229,7 @@
[% UNLESS ( hidden.defined('cardnumber') || ( !borrower && Koha.Preference('autoMemberNum') ) ) && hidden.defined('dateexpiry') && hidden.defined('branchcode') && hidden.defined('categorycode') %]
<div class="row">
<div class="col">
<h2 class="sr-only">Library</h2>
<fieldset class="rows" id="memberentry_library">
<legend id="library_legend">Library</legend>
<ol>
@ -373,6 +375,7 @@
[% UNLESS hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') && hidden.defined('preferred_name') && hidden.defined('middle_name') && hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('pronouns') && hidden.defined('othernames') && hidden.defined('sex') %]
<div class="row">
<div class="col">
<h2 class="sr-only">Identity</h2>
<fieldset class="rows" id="memberentry_identity">
<legend id="identity_legend">Identity</legend>
@ -519,6 +522,7 @@
[% UNLESS hidden.defined('streetnumber') && hidden.defined('address') && hidden.defined('address2') && hidden.defined('city') && hidden.defined('state') && hidden.defined('zipcode') && hidden.defined('country') %]
<div class="row">
<div class="col">
<h2 class="sr-only">Main address</h2>
<fieldset class="rows" id="memberentry_mainaddress">
<legend id="mainaddress_legend">Main address</legend>
@ -613,6 +617,7 @@
[% UNLESS hidden.defined('phone') && hidden.defined('phonepro') && hidden.defined('mobile') && hidden.defined('email') && hidden.defined('emailpro') && hidden.defined('fax') %]
<div class="row">
<div class="col">
<h2 class="sr-only">Contact information</h2>
<fieldset class="rows" id="memberentry_contact">
<legend id="contact_legend">Contact information</legend>
@ -785,6 +790,7 @@
[% UNLESS hidden.defined('B_streetnumber') && hidden.defined('B_address') && hidden.defined('B_address2') && hidden.defined('B_city') && hidden.defined('B_state') && hidden.defined('B_zipcode') && hidden.defined('B_country') && hidden.defined('B_phone') && hidden.defined('B_email') && hidden.defined('contactnote') %]
<div class="row">
<div class="col">
<h2 class="sr-only">Alternate address</h2>
<fieldset class="rows" id="memberentry_alternateaddress">
<legend id="alternateaddress_legend">Alternate address</legend>
@ -905,6 +911,7 @@
[% UNLESS hidden.defined('altcontactsurname') && hidden.defined('altcontactfirstname') && hidden.defined('altcontactaddress1') && hidden.defined('altcontactaddress2') && hidden.defined('altcontactaddress3') && hidden.defined('altcontactstate') && hidden.defined('altcontactzipcode') && hidden.defined('altcontactcountry') && hidden.defined('altcontactphone') %]
<div class="row">
<div class="col">
<h2 class="sr-only">Alternate contact</h2>
<fieldset class="rows" id="memberentry_alternatecontact">
<legend id="alternatecontact_legend">Alternate contact</legend>
@ -1006,6 +1013,7 @@
[% UNLESS op == 'edit' || hidden.defined('password') %]
<div class="row">
<div class="col">
<h2 class="sr-only">Password</h2>
<fieldset class="rows" id="memberentry_password">
<legend id="contact_legend">Password</legend>
<div class="alert alert-info">
@ -1122,6 +1130,7 @@
[% IF Koha.Preference('PrivacyPolicyConsent') && op != 'edit' %]
<div class="row">
<div class="col">
<h2 class="sr-only">Data privacy policy consent</h2>
<fieldset class="rows" id="memberentry_gdpr_consent">
<legend>Data privacy policy consent</legend>
<ol>
@ -1145,6 +1154,7 @@
[% UNLESS op == 'edit' %]
<div class="row">
<div class="col">
<h2 class="sr-only">Verification</h2>
<fieldset class="rows" id="memberentry_captcha">
<legend>Verification</legend>
<ol>

View File

@ -26,7 +26,7 @@
</div>
<div class="col-md-12 col-lg-10 order-1 order-lg-2">
<div id="recalls" class="maincontent">
<h2>Recalls history</h2>
<h1>Recalls history</h1>
[% IF Koha.Preference('UseRecalls') %]
[% IF RECALLS.count %]
<div id="opac-user-recalls">

View File

@ -604,7 +604,7 @@
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body" id="addNoteBody">
<h6 id="addNoteTitle"></h6>
<h2 id="addNoteTitle"></h2>
<input type="hidden" id="addNoteIssueId" name="issue_id" value="" />
<textarea name="note" id="addNote" rows="4"></textarea>
<div class="hint">Your note will be shown to the librarian when the item is checked in.</div>
@ -1048,7 +1048,7 @@
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<h6 id="suspendHoldTitle"></h6>
<h2 id="suspendHoldTitle"></h2>
<input type="hidden" name="reserve_id" id="suspendHoldReserveId" value="" />
<label for="suspend_untilDate">Suspend until:</label>
<input type="text" name="suspend_until" id="suspend_untilDate" size="10" />