Bug 25234

Summary: Update OPAC search results pagination with aria labels
Product: Koha Reporter: Owen Leonard <oleonard>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: 1joynelson, lucas, martin.renvoize
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00
Bug Depends on:    
Bug Blocks: 23003    
Attachments: Bug 25234: Update OPAC search results pagination with aria labels
Bug 25234: Update OPAC search results pagination with aria labels
Bug 25234: Update OPAC search results pagination with aria labels
Bug 25234: Update OPAC search results pagination with aria labels

Description Owen Leonard 2020-04-21 21:18:56 UTC
For better accessibility I would like to add aria labels to the include file which generates OPAC search results pagination. See articles:

https://a11y-style-guide.com/style-guide/section-navigation.html#kssref-navigation-pagination
https://www.a11ymatters.com/pattern/pagination/
Comment 1 Owen Leonard 2020-04-21 21:29:11 UTC Comment hidden (obsolete)
Comment 2 Lucas Gass 2020-04-21 21:43:56 UTC
I was testing this and caught one small typo that existed before this change:

<a clas="page-num current"

should be 

<a class="page-num current"


Not 100% sure if we should fix that here or in a separate bug?
Comment 3 Owen Leonard 2020-04-22 01:05:50 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2020-04-22 01:06:35 UTC
(In reply to Lucas Gass from comment #2)
> Not 100% sure if we should fix that here or in a separate bug?

Easy enough to fix up the patch. Thanks for noticing it.
Comment 5 Lucas Gass 2020-04-23 22:02:09 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2020-04-24 10:24:13 UTC
Created attachment 103639 [details] [review]
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.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Martin Renvoize 2020-04-29 15:56:17 UTC
Always awesome to see some movement on accessibility, thanks Owe :)
Comment 8 Martin Renvoize 2020-04-29 16:36:22 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 9 Joy Nelson 2020-05-08 22:25:26 UTC
enhancement not backported to 19.11.x