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.
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
"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.
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
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
Can you please give instructions how to test this.
(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)
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
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>
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
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>
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?
Pushed to master for 23.11. Nice work everyone, thanks!
Pushed to 23.05.x for 23.05.06
Nice work everyone! Pushed to oldstable for 22.11.x