Bug 41199 - Advanced Search fields could use more visible label options
Summary: Advanced Search fields could use more visible label options
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Jake Deery
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-06 08:26 UTC by Jake Deery
Modified: 2026-02-23 11:58 UTC (History)
5 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 41199: Add optional labels to search fields (24.73 KB, patch)
2025-11-06 08:47 UTC, Jake Deery
Details | Diff | Splinter Review
On refresh of OPAC advanced search (16.85 KB, text/plain)
2026-02-05 09:03 UTC, Ray Delahunty
Details
Bug 41199: Add optional labels to search fields (23.74 KB, patch)
2026-02-23 11:57 UTC, Jake Deery
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jake Deery 2025-11-06 08:26:58 UTC
The advanced search & search masthead could both do with more visible labels. This aids users in navigating the system, and also helps to provide screen readers with more context about an input field.

We should offer a syspref that controls the number of visible labels, so libraries can have greater control over the extent of these labels.
Comment 1 Jake Deery 2025-11-06 08:47:33 UTC
Created attachment 189147 [details] [review]
Bug 41199: Add optional labels to search fields

This patch adds the OPACShowLabelsForSearchInputs, which, when enabled,
will add numerous additional labels to the OPAC's advanced search and
masthead search regions. When disabled, this syspref will exhibit the
same behaviour we see now.

== TO TEST ==
a)  visually look at the OPAC's mainpage, and advanced search page
    *)  notice the input fields lack visual labels
== APPLY PATCH ==
b)  repeat step a)
    *)  observe how nothing has visually changed
c)  set the OPACShowLabelsForSearchInputs syspref to Show
d)  repeat step a) again
    *)  notice how there are now visual labels associated with each of
    the input fields
e)  revert the OPACShowLabelsForSearchInputs syspref to Don't show
f)  repeat step a) again
    *)  notice how there are again no visual labels
== SIGN OFF ==
Comment 2 Ray Delahunty 2026-02-05 09:03:38 UTC
Created attachment 192523 [details]
On refresh of OPAC advanced search

Signoff failed. Patch log file below shows error, and OPAC refresh fails (error trace attached). The new system parameter is present after the patch was applied, set to Don't show.


Bug 41199 - Advanced Search fields could use more visible label options
189147 - Bug 41199: Add optional labels to search fields
Apply? [(y)es, (n)o, (i)nteractive] Applying: Bug 41199: Add optional labels to search fields
Using index info to reconstruct a base tree...
M	installer/data/mysql/mandatory/sysprefs.sql
M	koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss
M	koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc
M	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt
CONFLICT (content): Merge conflict in koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt
Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc
CONFLICT (content): Merge conflict in koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc
Auto-merging koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss
Auto-merging installer/data/mysql/mandatory/sysprefs.sql
CONFLICT (content): Merge conflict in installer/data/mysql/mandatory/sysprefs.sql
error: Failed to merge in the changes.
Patch failed at 0001 Bug 41199: Add optional labels to search fields
[33mhint: Use 'git am --show-current-patch=diff' to see the failed patch[m
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-41199-Add-optional-labels-to-search-fields-nb2qu_jx.patch

DEV atomic update /kohadevbox/koha/installer/data/mysql/atomicupdate/bug_41199_add_labels_to_advsearch.pl  [08:53:29]: Bug 41199 - Add a way to enable/disable search input field labels
	[32mAdded new system preference 'OPACShowLabelsForSearchInputs'[0m
Comment 3 Jake Deery 2026-02-23 11:57:41 UTC
Created attachment 193628 [details] [review]
Bug 41199: Add optional labels to search fields

This patch adds the OPACShowLabelsForSearchInputs, which, when enabled,
will add numerous additional labels to the OPAC's advanced search and
masthead search regions. When disabled, this syspref will exhibit the
same behaviour we see now.

== TO TEST ==
a)  visually look at the OPAC's mainpage, and advanced search page
    *)  notice the input fields lack visual labels
== APPLY PATCH ==
b)  repeat step a)
    *)  observe how nothing has visually changed
c)  set the OPACShowLabelsForSearchInputs syspref to Show
d)  repeat step a) again
    *)  notice how there are now visual labels associated with each of
    the input fields
e)  revert the OPACShowLabelsForSearchInputs syspref to Don't show
f)  repeat step a) again
    *)  notice how there are again no visual labels
== SIGN OFF ==