Bugzilla – Attachment 180695 Details for
Bug 39497
'Lists' page tabs should be marked as such
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39497: update 'Lists' page tabs attributes
Bug-39497-update-Lists-page-tabs-attributes.patch (text/plain), 6.18 KB, created by
ChloƩ Zermatten
on 2025-04-07 12:49:16 UTC
(
hide
)
Description:
Bug 39497: update 'Lists' page tabs attributes
Filename:
MIME Type:
Creator:
ChloƩ Zermatten
Created:
2025-04-07 12:49:16 UTC
Size:
6.18 KB
patch
obsolete
>From 1345f0540817eafaceb7d2da05b7563151b9aabc Mon Sep 17 00:00:00 2001 >From: Chloe Zermatten <chloe.zermatten@openfifth.co.uk> >Date: Mon, 7 Apr 2025 12:32:50 +0000 >Subject: [PATCH] Bug 39497: update 'Lists' page tabs attributes > >On the Koha OPAC, the 'Lists' page contains tabs which aren't clearly marked as such (no relevant attribute set on the element). > >This means that screen readers will not recognise the tabs as such, and screen reader users will not be made aware that these are available. > >Since the 'Advanced Search' page contains tabs that are correctly identified and described by screen readers, update the HTML atributes for the tabs on the 'Lists' page so that it matches theirs. > >Note: this is a quick and simple fix aiming to meet accessibility requirements. Another approach could be to implement wrappers (as in advsearch.tt), but it seems a bigger refactor of opac-shelves.tt may be needed to allow that. > >Test plan: > >0) Before testing, ensure that the relevant patron has a few public and private lists. >1) Log in on the Koha OPAC >3) Navigate to Home > koha > Lists >2) Notice that, when the page first load, the 'Your Lists' tab panel is displayed (functionality is preserved) >3) Select 'Public lists', and notice that the tab panel now matches that (again, functionality is preserved) >4) Either inspect the page's HTML or run a Lighthouse test, and check that all aria attribute required by screen readers are present > >(aria attributes assumed to be required are aria-controls, aria-selected, and aria-labelledby. It is also assumed that 'role' attributes are needed) >--- > .../bootstrap/en/modules/opac-shelves.tt | 44 +++++++++++-------- > 1 file changed, 25 insertions(+), 19 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >index 22dcb2a545..d848f36a7c 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >@@ -715,34 +715,40 @@ > [% ELSIF op == 'list' %] > <h1>Lists</h1> > <div class="toptabs"> >- <ul class="nav nav-tabs" id="list-tabs"> >+ <ul class="nav nav-tabs" id="list-tabs" role="tablist"> > [% IF Koha.Preference( 'opacuserlogin' ) == 1 %] >- [% IF !public %] >- <li id="privateshelves_tab" class="nav-item"> >- <a class="nav-link active" id="your_lists" href="/cgi-bin/koha/opac-shelves.pl?op=list&public=0">Your lists</a> >- </li> >- [% ELSE %] >- <li id="privateshelves_tab" class="nav-item"> >- <a class="nav-link" id="your_lists" href="/cgi-bin/koha/opac-shelves.pl?op=list&public=0">Your lists</a> >- </li> >- [% END %] >- [% END %] >- [% IF public %] >- <li id="publicshelves_tab" class="nav-item"> >- <a class="nav-link active" id="public_lists" href="/cgi-bin/koha/opac-shelves.pl?op=list&public=1">Public lists</a> >+ <li id="privateshelves_tab" class="nav-item" role="presentation"> >+ <a >+ class="[% !public ? 'nav-link active' : 'nav-link' %]" >+ id="your_lists" >+ href="/cgi-bin/koha/opac-shelves.pl?op=list&public=0" >+ data-tabname="your_lists" >+ aria-controls="privateshelves" >+ role="tab" >+ aria-selected="[% !public ? 'true' : 'false' | html %]" >+ >Your lists</a >+ > > </li> >- [% ELSE %] >- <li id="publicshelves_tab" class="nav-item"> >- <a class="nav-link" id="public_lists" href="/cgi-bin/koha/opac-shelves.pl?op=list&public=1">Public lists</a> >+ <li id="publicshelves_tab" class="nav-item" role="presentation"> >+ <a >+ class="[% public ? 'nav-link active' : 'nav-link' %]" >+ id="public_lists" >+ href="/cgi-bin/koha/opac-shelves.pl?op=list&public=1" >+ data-tabname="public_lists" >+ aria-controls="publicshelves" >+ role="tab" >+ aria-selected="[% public ? 'true' : 'false' | html %]" >+ >Public lists</a >+ > > </li> > [% END %] > </ul> > > <div class="tab-content"> > [% IF !public %] >- <div id="privateshelves" class="tab-pane active"> </div> >+ <div id="privateshelves" class="tab-pane active" role="tabpanel" aria-labelledby="your_lists"> </div> > [% ELSE %] >- <div id="publicshelves" class="tab-pane active"> </div> >+ <div id="publicshelves" class="tab-pane active" role="tabpanel" aria-labelledby="public_lists"> </div> > [% END %] > > [% IF !public || Koha.Preference('OpacAllowPublicListCreation') %] >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39497
:
180694
|
180695
|
180706
|
181713