Bug 38643 - Advanced Search input fields need placeholders
Summary: Advanced Search input fields need placeholders
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Laura Escamilla
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-06 10:24 UTC by Jake Deery
Modified: 2025-09-05 20:15 UTC (History)
5 users (show)

See Also:
GIT URL:
Change sponsored?: ---
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 (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

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