Bug 38643 - Advanced Search input fields need placeholders
Summary: Advanced Search input fields need placeholders
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Laura Escamilla
QA Contact: Nick Clemens (kidclamp)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-06 10:24 UTC by Jake Deery
Modified: 2026-01-23 15:56 UTC (History)
8 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
OPAC accessibility improvement: Added dynamic placeholder text to advanced search fields to provide clearer visual guidance and improve usability for users with cognitive accessibility needs.
Version(s) released in:
26.05.00
Circulation function:


Attachments
Bug 38643: Added dynamic placeholders to the advanced search inputs (10.76 KB, patch)
2025-08-29 15:59 UTC, Laura Escamilla
Details | Diff | Splinter Review
Bug 38643: Added JS for the dynamic placeholders (2.00 KB, patch)
2025-08-29 15:59 UTC, Laura Escamilla
Details | Diff | Splinter Review
Bug 38643: Added JS for the dynamic placeholders (2.05 KB, patch)
2025-09-05 20:12 UTC, Ludovic
Details | Diff | Splinter Review
Bug 38643: Added dynamic placeholders to the advanced search inputs (10.81 KB, patch)
2026-01-15 13:30 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 38643: Added JS for the dynamic placeholders (2.12 KB, patch)
2026-01-15 13:30 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 38643: (QA follow-up) Replace _() with __() in global.js (1.12 KB, patch)
2026-01-15 13:30 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 38643: Added dynamic placeholders to the advanced search inputs (10.86 KB, patch)
2026-01-21 14:23 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 38643: Added JS for the dynamic placeholders (2.17 KB, patch)
2026-01-21 14:23 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 38643: (QA follow-up) Replace _() with __() in global.js (1.18 KB, patch)
2026-01-21 14:23 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jake Deery 2024-12-06 10:24:40 UTC
It has come to our attention via a recent accessibility audit that the lack of placeholder text (i.e. visual labels) may disadvantage users of the OPAC who struggle cognitively. A placeholder similar to that on the main search bar could help to alleviate this issue.
Comment 1 Laura Escamilla 2025-08-29 15:59:42 UTC
Created attachment 185940 [details] [review]
Bug 38643: Added dynamic placeholders to the advanced search inputs
Comment 2 Laura Escamilla 2025-08-29 15:59:44 UTC
Created attachment 185941 [details] [review]
Bug 38643: Added JS for the dynamic placeholders

To test:

1. Visit http://localhost:8080/cgi-bin/koha/opac-main.pl — notice that the main search bar has a placeholder.
2. Visit the advanced search page. Notice that the search bars in the advanced search do not have placeholders.
3. Apply this patch. restart_all
4. Refresh the page on the advanced search. Notice that the search bars now have placeholders. Try switching out the dropdown options and notice that the placeholder text changes depending on what you select.
5. Test searches and make sure everything works as expected.
6. Sign off — have an amazing day! :D
Comment 3 Ludovic 2025-09-05 20:12:46 UTC
Created attachment 186248 [details] [review]
Bug 38643: Added JS for the dynamic placeholders

To test:

1. Visit http://localhost:8080/cgi-bin/koha/opac-main.pl — notice that the main search bar has a placeholder.
2. Visit the advanced search page. Notice that the search bars in the advanced search do not have placeholders.
3. Apply this patch. restart_all
4. Refresh the page on the advanced search. Notice that the search bars now have placeholders. Try switching out the dropdown options and notice that the placeholder text changes depending on what you select.
5. Test searches and make sure everything works as expected.
6. Sign off — have an amazing day! :D

Signed-off-by: Ludovic <ludovic.julien@inlibro.com>
Comment 4 Ludovic 2025-09-05 20:15:23 UTC
Hello,

I’ve tested the patch and it works perfectly, the placeholders update dynamically in the advanced search fields based on the selected option. This is a great improvement for accessibility and overall user experience, especially for users who may have cognitive difficulties.

I believe this feature would also be very beneficial in the staff interface (intranet), where internal users also perform advanced searches. Adding it there would greatly enhance consistency between both interfaces.

Thanks for this valuable contribution! :)
Comment 5 Owen Leonard 2026-01-15 13:30:28 UTC
Created attachment 191488 [details] [review]
Bug 38643: Added dynamic placeholders to the advanced search inputs

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 6 Owen Leonard 2026-01-15 13:30:31 UTC
Created attachment 191489 [details] [review]
Bug 38643: Added JS for the dynamic placeholders

To test:

1. Visit http://localhost:8080/cgi-bin/koha/opac-main.pl — notice that
   the main search bar has a placeholder.
2. Visit the advanced search page. Notice that the search bars in the
   advanced search do not have placeholders.
3. Apply this patch. restart_all
4. Refresh the page on the advanced search. Notice that the search bars
   now have placeholders. Try switching out the dropdown options and
   notice that the placeholder text changes depending on what you
   select.
5. Test searches and make sure everything works as expected.
6. Sign off — have an amazing day! :D

Signed-off-by: Ludovic <ludovic.julien@inlibro.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 7 Owen Leonard 2026-01-15 13:30:34 UTC
Created attachment 191490 [details] [review]
Bug 38643: (QA follow-up) Replace _() with __() in global.js

The double-underscore function is required for translations to be picked
up in JS files.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 8 Nick Clemens (kidclamp) 2026-01-21 14:23:27 UTC
Created attachment 191778 [details] [review]
Bug 38643: Added dynamic placeholders to the advanced search inputs

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 9 Nick Clemens (kidclamp) 2026-01-21 14:23:30 UTC
Created attachment 191779 [details] [review]
Bug 38643: Added JS for the dynamic placeholders

To test:

1. Visit http://localhost:8080/cgi-bin/koha/opac-main.pl — notice that
   the main search bar has a placeholder.
2. Visit the advanced search page. Notice that the search bars in the
   advanced search do not have placeholders.
3. Apply this patch. restart_all
4. Refresh the page on the advanced search. Notice that the search bars
   now have placeholders. Try switching out the dropdown options and
   notice that the placeholder text changes depending on what you
   select.
5. Test searches and make sure everything works as expected.
6. Sign off — have an amazing day! :D

Signed-off-by: Ludovic <ludovic.julien@inlibro.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 10 Nick Clemens (kidclamp) 2026-01-21 14:23:32 UTC
Created attachment 191780 [details] [review]
Bug 38643: (QA follow-up) Replace _() with __() in global.js

The double-underscore function is required for translations to be picked
up in JS files.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 11 Lucas Gass (lukeg) 2026-01-22 16:27:41 UTC
Nice work everyone!

Pushed to main for 26.05
Comment 12 Lucas Gass (lukeg) 2026-01-22 16:32:58 UTC
please add release notes