Bug 41177: (follow-up) A few minor corrections

This patch makes the following corrections:

 - Remove link from breadcrumb WRAPPER items. The right markup is
   generated in html_helpers.inc if you add the "bc_active = 1" to the
   breadcrumb_item WRAPPER.
 - Remove "href='#'" from inactive links, and adjust CSS accordingly.
   The W3C validator doesn't like it when a true "aria-disabled"
   attribute is on a link which has an href attribute.

Signed-off-by: Jake Deery <jake.deery@openfifth.co.uk>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3ef370f9e1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
Owen Leonard 2025-11-06 16:22:21 +00:00 committed by Paul Derscheid
parent 906b475665
commit ffdc571417
No known key found for this signature in database
GPG Key ID: C25F9FD44CED595B
9 changed files with 21 additions and 35 deletions

View File

@ -3072,11 +3072,12 @@ nav {
margin-right: .3rem;
width: .8em;
}
/*rtl:raw:
&::before {
transform: scaleX(-1);
}
&.active {
a {
pointer-events: none;
}
*/
}
}
@ -3619,18 +3620,10 @@ input.renew {
&.currentlanguage {
color: #000;
font-weight: bold;
}
}
a {
&.currentlanguage {
&:link,
&:visited {
font-weight: bold;
}
pointer-events: none;
}
.sublanguage-selected {
&.sublanguage-selected {
color: #000;
font-weight: bold;
}

View File

@ -551,7 +551,7 @@
[% IF content.trim %]
[% IF ( bc_active ) %]
<li class="breadcrumb-item active" aria-current="page">
<a href="#" aria-disabled="true" tabindex="-1"> [% content | $raw %] </a>
<a aria-disabled="true" tabindex="-1"> [% content | $raw %] </a>
</li>
[% ELSE %]
<li class="breadcrumb-item"> [% content | $raw %] </li>

View File

@ -22,7 +22,7 @@
[% IF ( languages_loo.group_enabled ) %]
[% IF ( languages_loo.plural ) %]
<li class="nav-item dropup">
<a class="nav-link dropdown-toggle" id="show[% languages_loo.rfc4646_subtag | html %]" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
<a class="nav-link dropdown-toggle" id="show[% languages_loo.rfc4646_subtag | html %]" role="button" data-bs-toggle="dropdown" aria-expanded="false">
[% IF ( languages_loo.native_description ) %]
[% languages_loo.native_description | html %]
[% ELSE %]
@ -41,7 +41,7 @@
[% IF ( sublanguages_loo.enabled ) %]
[% IF ( sublanguages_loo.sublanguage_current ) %]
<li>
<a class="nav-link currentlanguage" href="#">
<a class="nav-link currentlanguage" aria-current="page">
[% sublanguages_loo.native_description | html %] [% sublanguages_loo.script_description | html %] [% sublanguages_loo.region_description | html %]
[% sublanguages_loo.variant_description | html %]
([% sublanguages_loo.rfc4646_subtag | html %])
@ -64,7 +64,7 @@
[% IF ( languages_loo.group_enabled ) %]
[% IF ( languages_loo.current ) %]
<li class="nav-item">
<a class="nav-link active currentlanguage" href="#" aria-current="page" aria-disabled="true" tabindex="-1">
<a class="nav-link active currentlanguage" aria-current="page" aria-disabled="true" tabindex="-1">
[% IF ( languages_loo.native_description ) %]
[% languages_loo.native_description | html %]
[% ELSE %]

View File

@ -25,8 +25,8 @@
[% WRAPPER 'sub-header.inc' %]
[% WRAPPER breadcrumbs %]
[% WRAPPER breadcrumb_item %]
<a href="#" aria-current="page" aria-disabled="true" tabindex="-1">About Koha</a>
[% WRAPPER breadcrumb_item bc_active = 1 %]
<span>About Koha</span>
[% END %]
[% END %]
[% END %]

View File

@ -33,10 +33,8 @@
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
[% END %]
[% WRAPPER breadcrumb_item %]
<a href="#" aria-current="page" aria-disabled="true" tabindex="-1">
<span>Record overlay rules</span>
</a>
[% WRAPPER breadcrumb_item bc_active = 1 %]
<span>Record overlay rules</span>
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]

View File

@ -18,8 +18,8 @@
[% WRAPPER 'sub-header.inc' %]
[% WRAPPER breadcrumbs %]
[% WRAPPER breadcrumb_item %]
<a href="#" aria-current="page" aria-disabled="true" tabindex="-1"> [% tx("Error {error_number}", {error_number = errno }) | html %] </a>
[% WRAPPER breadcrumb_item bc_active = 1 %]
[% tx("Error {error_number}", {error_number = errno }) | html %]
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]

View File

@ -640,13 +640,8 @@ th {
}
&.active {
a:link,
a:visited,
a:hover,
a:active {
color: #666;
cursor: text;
text-decoration: none;
a {
pointer-events: none;
}
}
}

View File

@ -159,7 +159,7 @@
[% BLOCK breadcrumb_item %]
[% IF ( bc_active ) %]
<li class="breadcrumb-item active">
<a href="#" aria-current="page" aria-disabled="true" tabindex="-1"> [% content | $raw %] </a>
<a aria-current="page" aria-disabled="true" tabindex="-1"> [% content | $raw %] </a>
</li>
[% ELSE %]
<li class="breadcrumb-item"> [% content | $raw %] </li>

View File

@ -60,7 +60,7 @@
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<a href="#" aria-current="page" aria-disabled="true" tabindex="-1">Interlibrary loan requests</a>
<span>Interlibrary loan requests</span>
[% END %]
[% END %]
[% END #/ WRAPPER breadcrumbs %]