Bug 33810 - Accessibility: OPAC Advanced Search fields are not labelled
Summary: Accessibility: OPAC Advanced Search fields are not labelled
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Matt Blenkinsop
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 25243
  Show dependency treegraph
 
Reported: 2023-05-23 14:48 UTC by Matt Blenkinsop
Modified: 2023-11-13 15:23 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.06,22.11.12


Attachments
Bug 33810: Opac advanced search fields need aria-labels (2.34 KB, patch)
2023-05-23 14:51 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 33810: Opac advanced search fields need aria-labels (2.38 KB, patch)
2023-05-24 09:34 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 33810: Opac advanced search fields need aria-labels (2.35 KB, patch)
2023-08-17 08:08 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 33810: Opac advanced search fields need aria-labels (2.39 KB, patch)
2023-08-17 08:24 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 33810: Opac advanced search fields need aria-labels (2.46 KB, patch)
2023-10-20 20:49 UTC, Emily Lamancusa
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Blenkinsop 2023-05-23 14:48:29 UTC
The OPAC Advanced Search fields are not labelled and have been failed in an Accessibility report carried out by the Shaw Trust for the British Museum. The search field dropdowns do not have any labelling at all and the text inputs have a title, rather than a label element or an aria-label.
Comment 1 Matt Blenkinsop 2023-05-23 14:51:00 UTC
Created attachment 151577 [details] [review]
Bug 33810: Opac advanced search fields need aria-labels

The OPAC advanced search fields need aria-labels to assist with screen reading. This patch adds labels to both the dropdown selects and the text inputs
Comment 2 Owen Leonard 2023-05-23 17:15:19 UTC
"Choose search field 1," "Choose search field 2," etc seem a little unclear to me.

What about "Choose search type for field 1" ?

Then perhaps the text input could also refer to the field number? "Enter field 1 search terms" ? That might help the user understand the context.

I also think this patch should address the search operator dropdowns that appear if you click the "More options" button.
Comment 3 Matt Blenkinsop 2023-05-24 09:34:04 UTC
Created attachment 151618 [details] [review]
Bug 33810: Opac advanced search fields need aria-labels

The OPAC advanced search fields need aria-labels to assist with screen reading. This patch adds labels to both the dropdown selects and the text inputs
Comment 4 Matt Blenkinsop 2023-05-24 09:35:29 UTC
Thanks Owen, I've updated the patch.

For the "More Options" fields, all of those dropdowns already have labels with a "for" attribute so I don't think they are currently an issue for screen reading. Unless you want some aria-labels with more specific descriptions? let me know and I can take a look
Comment 5 Johanna Miettunen 2023-08-17 07:55:48 UTC
Can you please give instructions how to test this.
Comment 6 Owen Leonard 2023-08-17 08:06:16 UTC
(In reply to Johanna Miettunen from comment #5)
> Can you please give instructions how to test this.

I think this browser extension is a good option: https://addons.mozilla.org/en-US/firefox/addon/wave-accessibility-tool/ (Firefox version)
Comment 7 Owen Leonard 2023-08-17 08:08:54 UTC
Created attachment 154493 [details] [review]
Bug 33810: Opac advanced search fields need aria-labels

The OPAC advanced search fields need aria-labels to assist with screen reading. This patch adds labels to both the dropdown selects and the text inputs
Comment 8 Biblibre Sandboxes 2023-08-17 08:24:23 UTC
Created attachment 154498 [details] [review]
Bug 33810: Opac advanced search fields need aria-labels

The OPAC advanced search fields need aria-labels to assist with screen reading. This patch adds labels to both the dropdown selects and the text inputs

Signed-off-by: joubu <xxx@example.org>
Comment 9 Edith Speller 2023-08-18 15:18:46 UTC
Hello, I'm new to Bugzilla so I don't know if it's right to comment on a bug that's been signed off! Sorry if I am breaching etiquette.

I agree the bugfix is an improvement and makes the change as described. 

However:
a) the operator dropdowns (name="op") accessed when clicking 'more options' are still not labelled 
b) there's still no *visible* labels for the advanced search index fields.  

I suspect b) needs a new bug to be opened as would need to add visible text labels for the index dropdowns (name="idx"). The search boxes could be aria-labelledby the selected option in the corresponding index dropdown if each option could be given an ID to enable this. 

Context: https://www.w3.org/WAI/WCAG21/Understanding/labels-or-instructions.html
Comment 10 Emily Lamancusa 2023-10-20 20:49:43 UTC
Created attachment 157579 [details] [review]
Bug 33810: Opac advanced search fields need aria-labels

The OPAC advanced search fields need aria-labels to assist with screen reading. This patch adds labels to both the dropdown selects and the text inputs

Signed-off-by: joubu <xxx@example.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 11 Emily Lamancusa 2023-10-20 21:07:38 UTC
Thanks for the accessibility improvement! Marking this as a bug because a missing accessibility feature is a bug, not an enhancement IMO.

Edith - thanks for the input! I am seeing labels on those elements now (unless I'm misunderstanding which sections you're referring to). Can you take another look, and file a new bug (and mark which Koha version you're using) if there is still something missing?
Comment 12 Tomás Cohen Arazi 2023-10-23 14:37:46 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 13 Fridolin Somers 2023-11-08 07:14:47 UTC
Pushed to 23.05.x for 23.05.06
Comment 14 Matt Blenkinsop 2023-11-13 15:23:08 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x