Library Catalogue - OPAC 1/ Perform a search 2/ The resultant page does not use heading mark-up where content is being introduced. As there are many links present on the page within the filer and search section, a heading is required to enable screen reader users to determine where the search results begin. Headings also allow screen reader users to skip to different sections of content quickly. Current code: <p id="numresults"> <strong>Your search returned 4013 results.</strong> Solution: Ensure that a heading is used to introduce the search results, for example: <h2>Your search returned 4013 results</h2>
Created attachment 105743 [details] [review] Bug 25254: Add heading where content is introduced in opac-results.tt Prior to this patch, the search results page did not contain a semantically accurate heading to introduce he main content of the page. Test plan 1/ Perform a search in the OPAC that yields results 2/ Inspect the page and note that the 'title' stating how many results are found is not semantically marked up as a heading to introduce the content. 3/ Apply the patch 4/ Reload the page 5/ Inspect the page and note that the 'title' stating how many results are found is now properly marked up as a second level heading and appropriately designated as the start of the 'maincontent' block with an associated '.maincontent' class. 6/ Perform a search which yields zero results 7/ Note that the 'No results found' title is properly marked up as a second level heading. 8/ Signoff
I don't think we want to add the "maincontent" class to the <h2>. I think we should try to keep that class for container <div>s. Anyway, it's already added to the <div> right above the "[% IF ( searchdesc ) %]" block
Created attachment 105768 [details] [review] Bug 25154: Add heading where content is introduced in opac-results.tt Prior to this patch, the search results page did not contain a semantically accurate heading to introduce he main content of the page. Test plan 1/ Perform a search in the OPAC that yields results 2/ Inspect the page and note that the 'title' stating how many results are found is not semantically marked up as a heading to introduce the content. 3/ Apply the patch 4/ Reload the page 5/ Inspect the page and note that the 'title' stating how many results are found is now properly marked up as a second level heading and appropriately designated as the start of the 'maincontent' block with an associated '.maincontent' class. 6/ Perform a search which yields zero results 7/ Note that the 'No results found' title is properly marked up as a second level heading. 8/ Signoff
Good catch.. new patch uploaded.
Created attachment 105770 [details] [review] Bug 25154: Add heading where content is introduced in opac-results.tt Prior to this patch, the search results page did not contain a semantically accurate heading to introduce he main content of the page. Test plan 1/ Perform a search in the OPAC that yields results 2/ Inspect the page and note that the 'title' stating how many results are found is not semantically marked up as a heading to introduce the content. 3/ Apply the patch 4/ Reload the page 5/ Inspect the page and note that the 'title' stating how many results are found is now properly marked up as a second level heading and appropriately designated as the start of the 'maincontent' block with an associated '.maincontent' class. 6/ Perform a search which yields zero results 7/ Note that the 'No results found' title is properly marked up as a second level heading. 8/ Signoff Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 106122 [details] [review] Bug 25154: Add heading where content is introduced in opac-results.tt Prior to this patch, the search results page did not contain a semantically accurate heading to introduce he main content of the page. Test plan 1/ Perform a search in the OPAC that yields results 2/ Inspect the page and note that the 'title' stating how many results are found is not semantically marked up as a heading to introduce the content. 3/ Apply the patch 4/ Reload the page 5/ Inspect the page and note that the 'title' stating how many results are found is now properly marked up as a second level heading and appropriately designated as the start of the 'maincontent' block with an associated '.maincontent' class. 6/ Perform a search which yields zero results 7/ Note that the 'No results found' title is properly marked up as a second level heading. 8/ Signoff Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 20.11, thanks to everybody involved!
This patch fails the QA script for me: FAIL koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt FAIL forbidden patterns forbidden pattern: Font Awesome icons need the aria-hidden attribute for accessibility purpose (see bug 25166) (line 105) Which I do not understand because that line does include the aria-hidden attribute.
I don't see how the QA script failure could be a problem, I am backporting this anyway since it improves accessibility. backported to 20.05.x for 20.05.02
backported to 19.11.x for 19.11.08
Backported to 19.05.x branch for 19.05.14