Bugzilla – Attachment 103436 Details for
Bug 25234
Update OPAC search results pagination with aria labels
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25234: Update OPAC search results pagination with aria labels
Bug-25234-Update-OPAC-search-results-pagination-wi.patch (text/plain), 6.36 KB, created by
Owen Leonard
on 2020-04-22 01:05:50 UTC
(
hide
)
Description:
Bug 25234: Update OPAC search results pagination with aria labels
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2020-04-22 01:05:50 UTC
Size:
6.36 KB
patch
obsolete
>From df2c3b8c4117c2ca69d777911585a718b6110fa0 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 21 Apr 2020 21:19:49 +0000 >Subject: [PATCH] Bug 25234: Update OPAC search results pagination with aria > labels > >This patch updates the include file which generates OPAC search results >pagination so that it has better semantic markup and correct aria >labels. > >To test, apply the patch and do a search in the OPAC which will return >multiple pages of search results. > >View the source to confirm the markup changes: > > - <nav> instead of <div> surrounding the list of links, with a > corresponding aria label > - Navigation links should have labels indicating which page in the > results they point to. > - The current link should have "aria-disabled," and "aria-current" set. > - Numbered links should have aria labels that indicate their number. >--- > .../bootstrap/en/includes/page-numbers.inc | 32 ++++++++++++++++------ > 1 file changed, 23 insertions(+), 9 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/page-numbers.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/page-numbers.inc >index b54a8caf40..d4326492b1 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/page-numbers.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/page-numbers.inc >@@ -1,23 +1,37 @@ > [% USE raw %] > [% IF ( PAGE_NUMBERS ) %] >- <div class="pagination pagination-small noprint"> >- [% IF hits_to_paginate < total %]<h6>[% hits_to_paginate | html %] of [% total | html %] results loaded, refine your search to view other records</h6>[% END %] >+ <nav class="pagination pagination-small noprint" aria-label="Search results pagination"> >+ [% IF hits_to_paginate < total %] >+ <h6>[% hits_to_paginate | html %] of [% total | html %] results loaded, refine your search to view other records</h6> >+ [% END %] > <ul> > [% IF ( previous_page_offset.defined ) %] >- <li class="page-first"><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %][% IF ( sort_by ) %]&sort_by=[% sort_by | uri %][% END %][% IF results_per_page %]&count=[% results_per_page | uri %][% END %]"><i class="fa fa-fw fa-angle-double-left"></i> First</a></li> >- <li class="page-prev"><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&offset=[% previous_page_offset | uri %][% IF ( sort_by ) %]&sort_by=[% sort_by | uri %][% END %][% IF results_per_page %]&count=[% results_per_page | uri %][% END %]"> <i class="fa fa-fw fa-angle-left"></i> Previous</a></li> >+ <li class="page-first"> >+ <a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %][% IF ( sort_by ) %]&sort_by=[% sort_by | uri %][% END %][% IF results_per_page %]&count=[% results_per_page | uri %][% END %]" aria-label="Go to the first page"><i class="fa fa-fw fa-angle-double-left"></i> First</a> >+ </li> >+ <li class="page-prev"> >+ <a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&offset=[% previous_page_offset | uri %][% IF ( sort_by ) %]&sort_by=[% sort_by | uri %][% END %][% IF results_per_page %]&count=[% results_per_page | uri %][% END %]" aria-label="Go to the previous page"> <i class="fa fa-fw fa-angle-left"></i> Previous</a> >+ </li> > [% END %] > [% FOREACH PAGE_NUMBER IN PAGE_NUMBERS %] > [% IF ( PAGE_NUMBER.highlight ) %] >- <li class="active"><a clas="page-num current" href="#">[% PAGE_NUMBER.pg | html %]</a></li> >+ <li class="active"> >+ <a class="page-num current" href="#" aria-disabled="true" aria-label="Current page: Page [% PAGE_NUMBER.pg | html %]" aria-current="true">[% PAGE_NUMBER.pg | html %]</a> >+ </li> > [% ELSE %] >- <li class="page-num"><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&offset=[% PAGE_NUMBER.offset | uri %][% IF ( sort_by ) %]&sort_by=[% sort_by | uri %][% END %][% IF results_per_page %]&count=[% results_per_page | uri %][% END %]">[% PAGE_NUMBER.pg | html %]</a></li> >+ <li class="page-num"> >+ <a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&offset=[% PAGE_NUMBER.offset | uri %][% IF ( sort_by ) %]&sort_by=[% sort_by | uri %][% END %][% IF results_per_page %]&count=[% results_per_page | uri %][% END %]" aria-label="Go to page [% PAGE_NUMBER.pg | html %]">[% PAGE_NUMBER.pg | html %]</a> >+ </li> > [% END %] > [% END %] > [% IF ( next_page_offset ) %] >- <li class="page-next"><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&offset=[% next_page_offset | uri %][% IF ( sort_by ) %]&sort_by=[% sort_by | uri %][% END %][% IF results_per_page %]&count=[% results_per_page | uri %][% END %]">Next <i class="fa fa-fw fa-angle-double-right"></i></a></li> >- <li class="page-last"><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&offset=[% last_page_offset | uri %][% IF ( sort_by ) %]&sort_by=[% sort_by | uri %][% END %][% IF results_per_page %]&count=[% results_per_page | uri %][% END %]">Last <i class="fa fa-fw fa-angle-double-right"></i></a></li> >+ <li class="page-next"> >+ <a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&offset=[% next_page_offset | uri %][% IF ( sort_by ) %]&sort_by=[% sort_by | uri %][% END %][% IF results_per_page %]&count=[% results_per_page | uri %][% END %]" aria-label="Go to the next page">Next <i class="fa fa-fw fa-angle-double-right"></i></a> >+ </li> >+ <li class="page-last"> >+ <a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&offset=[% last_page_offset | uri %][% IF ( sort_by ) %]&sort_by=[% sort_by | uri %][% END %][% IF results_per_page %]&count=[% results_per_page | uri %][% END %]" aria-label="Go to the last page">Last <i class="fa fa-fw fa-angle-double-right"></i></a> >+ </li> > [% END %] > </ul> >- </div> >+ </nav> > [% END %] >-- >2.11.0
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 25234
:
103423
|
103436
|
103609
|
103639