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.
Created attachment 185940 [details] [review] Bug 38643: Added dynamic placeholders to the advanced search inputs
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
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>
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! :)