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/
Created attachment 103423 [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.
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?
Created attachment 103436 [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.
(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.
Created attachment 103609 [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>
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>
Always awesome to see some movement on accessibility, thanks Owe :)
Nice work everyone! Pushed to master for 20.05
enhancement not backported to 19.11.x