Bug 38643

Summary: Advanced Search input fields need placeholders
Product: Koha Reporter: Jake Deery <jake.deery>
Component: AccessibilityAssignee: Laura Escamilla <Laura.escamilla>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: Laura.escamilla, ludovic.julien, martin.renvoize, matt.blenkinsop, oleonard
Version: Main   
Hardware: All   
OS: All   
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 38643: Added dynamic placeholders to the advanced search inputs
Bug 38643: Added JS for the dynamic placeholders
Bug 38643: Added JS for the dynamic placeholders

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! :)