Bug 27876

Summary: Accessibility: OPAC - Reduce heading redundancy
Product: Koha Reporter: Wainui Witika-Park <wainuiwitikapark>
Component: OPACAssignee: Wainui Witika-Park <wainuiwitikapark>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: bolshawh, fridolin.somers, jonathan.druart
Version: unspecifiedKeywords: accessibility
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00
Circulation function:
Bug Depends on: 27610, 27740    
Bug Blocks: 28242    
Attachments: Bug 27876: added sr-only to caption of table in Charges page
Bug 27876: took away redundant heading in OPAC full serial issues
Bug 27876: changed Your tags title to caption in OPAC
Bug 27876: Added caption to checkout history table
Bug 27876: Added caption to checkout history table
Bug 27876: Added caption to holds history table
Bug 27876: added sr-only to caption of table in Charges page
Bug 27876: took away redundant heading in OPAC full serial issues
Bug 27876: changed Your tags title to caption in OPAC
Bug 27876: added sr-only to caption of table in Charges page
Bug 27876: took away redundant heading in OPAC full serial issues
Bug 27876: changed Your tags title to caption in OPAC

Description Wainui Witika-Park 2021-03-05 00:53:49 UTC
Bug 27610 created <h1> headings on each page of the OPAC, then Bug 27740 fixed the hierarchy of the other headings in each page to ensure there was no skipping of heading levels, and that items that appeared as headings of some sort, had an <h> tag.

There are now a few headings that are redundant (e.g. Purchase suggestions https://snipboard.io/SCFALO.jpg) so this bug will deal with issues like this.

Many of the alerts and errors are also tagged as headings, which for many cases is not correct. Therefore, this bug will also deal with these issues.
Comment 1 Wainui Witika-Park 2021-04-07 02:24:30 UTC
I don't think this bug needs to address error alerts anymore
Comment 2 Jonathan Druart 2021-04-14 15:12:04 UTC
Do you think you could provide a patch soon?
Comment 3 Martin Renvoize (ashimema) 2021-04-15 15:00:22 UTC
Ooh.. I fixed the purchase suggestsions one as a followup in bug 27740.. I felt it was a QA fail otherwise.

As for the alerts and errors.. I think that also ties into my followup questions on bug 27740.. such content area's likely need some sort of 'title' but without necessarily interfering with the header hierarchy..
Comment 4 Wainui Witika-Park 2021-04-23 02:47:50 UTC
Hi all, yeah I'm working on this now so will hopefully be able to provide a patch soon. Please feel free to point out any pages in particular that you think need addressing.
Comment 5 Wainui Witika-Park 2021-04-25 03:33:27 UTC
Created attachment 120148 [details] [review]
Bug 27876: added sr-only to caption of table in Charges page

Made the "Your charges" caption of the table in the Charges page of the
OPAC hidden and for screen-readers only so that it takes out redundancy.

To test:
1) Apply patch
2) Go to OPAC
3) Go to Charges page
4) Ensure that there is no visible caption above the table that says
"Your charges"
5) Check that the code has the caption still with sr-only class

Sponsored-by: Catalyst IT
Comment 6 Wainui Witika-Park 2021-04-25 03:49:54 UTC
Created attachment 120149 [details] [review]
Bug 27876: took away redundant heading in OPAC full serial issues

Changed <h2> to <h1> and deleted current <h1> to eliminate redundancy.

To test:
1) Apply patch
2) Go to OPAC
3) Go to opac-serial-issues.pl
4) Check there is only one main heading and it is <h1>

Sponsored-by: Catalyst IT
Comment 7 Wainui Witika-Park 2021-04-25 04:08:24 UTC
Created attachment 120150 [details] [review]
Bug 27876: changed Your tags title to caption in OPAC

On the tags page, changed the <h2> "Your tags" to a <caption> to reduce
heading redundancy but keep the information available.

To test:
1) Apply patch
2) Go to OPAC
3) Go to opac-tags.pl
4) Ensure that there is a caption above the table that says "Your tags"
and that it is not a heading tag

Sponsored-by: Catalyst IT
Comment 8 Wainui Witika-Park 2021-04-25 08:36:25 UTC
Created attachment 120151 [details] [review]
Bug 27876: Added caption to checkout history table

Added a sr-only caption to the checkout history table but made it hidden
and for screen-readers only. This is to keep it consistent with the
Charges page and table but is also the best practice for tables. This
ensures there is still no visible redundancy but is better for
accessible.

To test:
1) Apply patch
2) Go to OPAC
3) Go to checkout history page
4) Check that the page looks the same
5) Check that the code has a caption "Your checkout history" that has
the class "sr-only"

Sponsored-by: Catalyst IT
Comment 9 Wainui Witika-Park 2021-04-25 08:38:23 UTC
Created attachment 120152 [details] [review]
Bug 27876: Added caption to checkout history table

Added a sr-only caption to the checkout history table but made it hidden
and for screen-readers only. This is to keep it consistent with the
Charges page and table but is also the best practice for tables. This
ensures there is still no visible redundancy but is better for
accessibility.

To test:
1) Apply patch
2) Go to OPAC
3) Go to checkout history page
4) Check that the page looks the same
5) Check that the code has a caption "Your checkout history" that has
the class "sr-only"

Sponsored-by: Catalyst IT
Comment 10 Wainui Witika-Park 2021-04-25 08:44:09 UTC
Created attachment 120153 [details] [review]
Bug 27876: Added caption to holds history table

Added a sr-only caption to the holds history table but made it hidden
and for screen-readers only. This is to keep it consistent with the
Charges and checkout histories pages and tables but is also the best practice for tables. This ensures there is still no visible redundancy but is better for accessibility.

To test:
1) Apply patch
2) Go to OPAC
3) Go to holds history page
4) Check that the page looks the same
5) Check that the code has a caption "Your holds history" that has
the class "sr-only"

Sponsored-by: Catalyst IT
Comment 11 Wainui Witika-Park 2021-04-25 08:57:22 UTC
Apologies for the confusing patches making them obsolete etc. I have decided that adding captions to tables and making them sr-only should be a separate bug. Except the charges page I left the caption there but with sr-only as I it already had a caption.
Comment 12 Henry Bolshaw 2021-04-27 08:20:15 UTC
Created attachment 120199 [details] [review]
Bug 27876: added sr-only to caption of table in Charges page

Made the "Your charges" caption of the table in the Charges page of the
OPAC hidden and for screen-readers only so that it takes out redundancy.

To test:
1) Apply patch
2) Go to OPAC
3) Go to Charges page
4) Ensure that there is no visible caption above the table that says
"Your charges"
5) Check that the code has the caption still with sr-only class

Sponsored-by: Catalyst IT

Signed-off-by: Henry Bolshaw <bolshawh@parliament.uk>
Comment 13 Henry Bolshaw 2021-04-27 08:20:20 UTC
Created attachment 120200 [details] [review]
Bug 27876: took away redundant heading in OPAC full serial issues

Changed <h2> to <h1> and deleted current <h1> to eliminate redundancy.

To test:
1) Apply patch
2) Go to OPAC
3) Go to opac-serial-issues.pl
4) Check there is only one main heading and it is <h1>

Sponsored-by: Catalyst IT

Signed-off-by: Henry Bolshaw <bolshawh@parliament.uk>
Comment 14 Henry Bolshaw 2021-04-27 08:20:24 UTC
Created attachment 120201 [details] [review]
Bug 27876: changed Your tags title to caption in OPAC

On the tags page, changed the <h2> "Your tags" to a <caption> to reduce
heading redundancy but keep the information available.

To test:
1) Apply patch
2) Go to OPAC
3) Go to opac-tags.pl
4) Ensure that there is a caption above the table that says "Your tags"
and that it is not a heading tag

Sponsored-by: Catalyst IT

Signed-off-by: Henry Bolshaw <bolshawh@parliament.uk>
Comment 15 Henry Bolshaw 2021-04-27 08:25:06 UTC
This is great. I have followed the test plans and signed off. I also checked the pages using the NVDA screenreader: the change on the tags page makes the table much easier to understand!

Wainui, are you going to create a separate bug for table captions? Let me know if you weren't and I'll submit one.
Comment 16 Wainui Witika-Park 2021-04-28 00:13:52 UTC
(In reply to Henry Bolshaw from comment #15)
> This is great. I have followed the test plans and signed off. I also checked
> the pages using the NVDA screenreader: the change on the tags page makes the
> table much easier to understand!
> 
> Wainui, are you going to create a separate bug for table captions? Let me
> know if you weren't and I'll submit one.

Hi Henry, thanks so much! Yeah I can submit a bug for that :)
Comment 17 Wainui Witika-Park 2021-04-28 04:25:58 UTC
(In reply to Henry Bolshaw from comment #15)

> Wainui, are you going to create a separate bug for table captions? Let me
> know if you weren't and I'll submit one.

Please see Bug 28242 and Bug 28243 for dealing with table captions as well as other elements that need labels/legends. It will be useful for many of these to be "sr-only" so that they don't interfere with other headings and don't create redundancy.
Comment 18 Nick Clemens (kidclamp) 2021-05-07 18:54:05 UTC
Created attachment 120716 [details] [review]
Bug 27876: added sr-only to caption of table in Charges page

Made the "Your charges" caption of the table in the Charges page of the
OPAC hidden and for screen-readers only so that it takes out redundancy.

To test:
1) Apply patch
2) Go to OPAC
3) Go to Charges page
4) Ensure that there is no visible caption above the table that says
"Your charges"
5) Check that the code has the caption still with sr-only class

Sponsored-by: Catalyst IT

Signed-off-by: Henry Bolshaw <bolshawh@parliament.uk>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 19 Nick Clemens (kidclamp) 2021-05-07 18:54:08 UTC
Created attachment 120717 [details] [review]
Bug 27876: took away redundant heading in OPAC full serial issues

Changed <h2> to <h1> and deleted current <h1> to eliminate redundancy.

To test:
1) Apply patch
2) Go to OPAC
3) Go to opac-serial-issues.pl
4) Check there is only one main heading and it is <h1>

Sponsored-by: Catalyst IT

Signed-off-by: Henry Bolshaw <bolshawh@parliament.uk>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 20 Nick Clemens (kidclamp) 2021-05-07 18:54:12 UTC
Created attachment 120718 [details] [review]
Bug 27876: changed Your tags title to caption in OPAC

On the tags page, changed the <h2> "Your tags" to a <caption> to reduce
heading redundancy but keep the information available.

To test:
1) Apply patch
2) Go to OPAC
3) Go to opac-tags.pl
4) Ensure that there is a caption above the table that says "Your tags"
and that it is not a heading tag

Sponsored-by: Catalyst IT

Signed-off-by: Henry Bolshaw <bolshawh@parliament.uk>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 21 Jonathan Druart 2021-05-10 14:18:27 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 22 Fridolin Somers 2021-05-12 14:58:25 UTC
Depends on Bug 27610 not in 20.11.x