Bug 25244

Summary: Accessibility: Checkboxes on the search results page do not contain specific aria labels
Product: Koha Reporter: Martin Renvoize (ashimema) <martin.renvoize>
Component: OPACAssignee: Martin Renvoize (ashimema) <martin.renvoize>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: aleisha, bolshawh, hayleypelham, jonathan.druart, julian.maurice, lucas, oleonard, testopia, victor
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26655
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.03, 19.11.09, 19.05.15
Circulation function:
Bug Depends on: 25922    
Bug Blocks: 25243    
Attachments: Bug 25244: Add specific aria-label to search results
Bug 25244: Add specific aria-label to search results
Bug 25244: Add specific aria-label to search results
Bug 25244: (follow-up) QA corrections
Bug 25244: Add specific aria-label to search results
Bug 25244: (follow-up) QA corrections
Bug 25244: Add specific aria-label to search results

Description Martin Renvoize (ashimema) 2020-04-22 06:56:12 UTC
Multiple generic ‘Select this item’ check boxes are present on the search results pages that some users may not be able to differentiate between when navigating out of context.

1/ Search for an item
2/ Note that the results page has multiple checkboxes with matching aria tags.

Current code:
<td class="select selectcol">
<input name="biblionumber" class="cb" id="bib28526" aria-label="Select this item"
type="checkbox" value="28526">
<label for="bib28526"></label>
</td>

Solution:
Ensure that all form elements are uniquely descriptive of their purpose. For example:

<td class="select selectcol">
<input name="biblionumber" class="cb" id="bib28526" aria-label="Select ‘Taxing
time for housing’" type="checkbox" value="28526">
<label for="bib28526"></label>
</td>
Comment 1 Hayley Pelham 2020-06-15 03:57:59 UTC
Hi Martin,

I think I'm missing something, but I can't see aria-label for the checkboxes in the Staff client or the OPAC, not in the code on the webpage nor in the source code.

Could you please let me know how I can see what you're seeing for "Current code"?
Comment 2 Martin Renvoize (ashimema) 2020-06-29 14:36:54 UTC
Interesting.. it looks like standard Koha is missing the aria labels entirely.

Patch inbound
Comment 3 Martin Renvoize (ashimema) 2020-06-29 14:57:48 UTC
Created attachment 106404 [details] [review]
Bug 25244: Add specific aria-label to search results

This patch adds an arai-lebel to the select checkboxes on the search
results page of the OPAC.

Test plan
1/ Perform a search that will yield some results
2/ Inspect the 'checkbox' on the left side of the results table
3/ Note that there is no arai-label
4/ Apply patch
5/ Refresh the search results page
6/ Inspect the 'checkbox' on the left side of the results table
7/ Note that the aria-label now appears and contains relavant
information
8/ Signoff
Comment 4 Owen Leonard 2020-06-29 15:31:04 UTC
Created attachment 106406 [details] [review]
Bug 25244: Add specific aria-label to search results

This patch adds an arai-lebel to the select checkboxes on the search
results page of the OPAC.

Test plan
1/ Perform a search that will yield some results
2/ Inspect the 'checkbox' on the left side of the results table
3/ Note that there is no arai-label
4/ Apply patch
5/ Refresh the search results page
6/ Inspect the 'checkbox' on the left side of the results table
7/ Note that the aria-label now appears and contains relavant
information
8/ Signoff

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 5 Julian Maurice 2020-07-03 06:39:43 UTC
Shouldn't it be "Select bibliographic record" ?

I think the values of aria-label attributes are not automatically picked up by the translator, so it is not translatable.

Also, QA script complains about missing TT filters
Comment 6 Martin Renvoize (ashimema) 2020-07-03 12:56:15 UTC
(In reply to Julian Maurice from comment #5)
> Shouldn't it be "Select bibliographic record" ?

Hmm, perhaps "Select search result: ".. your right it's a bib record and not an item, but to an OPAC user I'm not sure they'd want to draw the difference.. it's used for selecting a result to place on hold etc.

> 
> I think the values of aria-label attributes are not automatically picked up
> by the translator, so it is not translatable.

Good question.. I didn't think about that.. is that not a wider issue though.. we need aria-labels for accessibility.. we really ought to pick them for translations.

> 
> Also, QA script complains about missing TT filters

Oops.. I'll fix that.
Comment 7 Martin Renvoize (ashimema) 2020-07-03 12:58:42 UTC
Created attachment 106499 [details] [review]
Bug 25244: Add specific aria-label to search results

This patch adds an arai-lebel to the select checkboxes on the search
results page of the OPAC.

Test plan
1/ Perform a search that will yield some results
2/ Inspect the 'checkbox' on the left side of the results table
3/ Note that there is no arai-label
4/ Apply patch
5/ Refresh the search results page
6/ Inspect the 'checkbox' on the left side of the results table
7/ Note that the aria-label now appears and contains relavant
information
8/ Signoff

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 8 Martin Renvoize (ashimema) 2020-07-03 12:58:45 UTC
Created attachment 106500 [details] [review]
Bug 25244: (follow-up) QA corrections
Comment 9 Martin Renvoize (ashimema) 2020-07-03 13:10:37 UTC
Added bug 25922 to track the translation tools enhancement to allow the pickup of aria-labels for translation.
Comment 10 Julian Maurice 2020-07-03 13:39:06 UTC
Created attachment 106511 [details] [review]
Bug 25244: Add specific aria-label to search results

This patch adds an arai-lebel to the select checkboxes on the search
results page of the OPAC.

Test plan
1/ Perform a search that will yield some results
2/ Inspect the 'checkbox' on the left side of the results table
3/ Note that there is no arai-label
4/ Apply patch
5/ Refresh the search results page
6/ Inspect the 'checkbox' on the left side of the results table
7/ Note that the aria-label now appears and contains relavant
information
8/ Signoff

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 11 Julian Maurice 2020-07-03 13:39:10 UTC
Created attachment 106512 [details] [review]
Bug 25244: (follow-up) QA corrections

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 12 Katrin Fischer 2020-07-04 23:14:38 UTC
Can we switch item for something else please? In German item (for holdings) and item (like a list item) are not the same word and there is not enough context to make sense for translation here.
Comment 13 Katrin Fischer 2020-07-04 23:18:12 UTC
(In reply to Katrin Fischer from comment #12)
> Can we switch item for something else please? In German item (for holdings)
> and item (like a list item) are not the same word and there is not enough
> context to make sense for translation here.

I realized now, that the follow-up took care of this.
Comment 14 Jonathan Druart 2020-07-20 14:51:02 UTC
Created attachment 107109 [details] [review]
Bug 25244: Add specific aria-label to search results

This patch adds an arai-lebel to the select checkboxes on the search
results page of the OPAC.

Test plan
1/ Perform a search that will yield some results
2/ Inspect the 'checkbox' on the left side of the results table
3/ Note that there is no arai-label
4/ Apply patch
5/ Refresh the search results page
6/ Inspect the 'checkbox' on the left side of the results table
7/ Note that the aria-label now appears and contains relavant
information
8/ Signoff

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Bug 25244: (follow-up) QA corrections

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 15 Jonathan Druart 2020-07-20 14:51:49 UTC
Patches squashed.
Comment 16 Jonathan Druart 2020-07-20 15:48:44 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 17 Lucas Gass (lukeg) 2020-07-27 17:19:44 UTC
backported to 20.05.x for 20.05.03
Comment 18 Aleisha Amohia 2020-08-03 23:11:59 UTC
backported to 19.11.x for 19.11.09
Comment 19 Victor Grousset/tuxayo 2020-09-18 20:18:59 UTC
Backported to 19.05.x branch for 19.05.15