Bug 25154 - Accessibility: The 'Search results' page does not use heading markup where content is introduced
Summary: Accessibility: The 'Search results' page does not use heading markup where co...
Status: Pushed to oldoldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 25153
  Show dependency treegraph
 
Reported: 2020-04-15 09:31 UTC by Martin Renvoize
Modified: 2020-07-26 01:02 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.02, 19.11.08, 19.05.14


Attachments
Bug 25254: Add heading where content is introduced in opac-results.tt (4.29 KB, patch)
2020-06-11 12:32 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 25154: Add heading where content is introduced in opac-results.tt (4.20 KB, patch)
2020-06-11 15:41 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 25154: Add heading where content is introduced in opac-results.tt (4.26 KB, patch)
2020-06-11 18:44 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 25154: Add heading where content is introduced in opac-results.tt (4.31 KB, patch)
2020-06-21 14:36 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2020-04-15 09:31:41 UTC
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>
Comment 1 Martin Renvoize 2020-06-11 12:32:12 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2020-06-11 12:55:00 UTC
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
Comment 3 Martin Renvoize 2020-06-11 15:41:08 UTC Comment hidden (obsolete)
Comment 4 Martin Renvoize 2020-06-11 15:42:41 UTC
Good catch.. new patch uploaded.
Comment 5 Owen Leonard 2020-06-11 18:44:54 UTC
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>
Comment 6 Katrin Fischer 2020-06-21 14:36:34 UTC
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>
Comment 7 Jonathan Druart 2020-06-24 13:32:01 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 8 Lucas Gass 2020-07-10 17:20:19 UTC
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.
Comment 9 Lucas Gass 2020-07-10 17:23:02 UTC
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
Comment 10 Aleisha Amohia 2020-07-13 03:20:03 UTC
backported to 19.11.x for 19.11.08
Comment 11 Victor Grousset/tuxayo 2020-07-26 01:02:27 UTC
Backported to 19.05.x branch for 19.05.14