On the opac-suggestions page, there is a visually hidden negcap field. It is terrible for accessibility, and seems only to exist to halt bots – which seems unnecessary, given how this page requires users to log in anyway. I propose we remove this field entirely, with possible future development to use some other sort of captcha on this page, if it is deemed necessary.
Created attachment 189151 [details] [review] Bug 41202: Remove hidden negcap for accessibility This patch removes the negcap field on opac-suggestions, as it serves no purpose other than to confuse screen readers. If ncessary, it should be replaced in a follow-up patch with a visually accessible captcha field. == TO TEST == a) go to /cgi-bin/koha/opac-suggestions.pl?op=add_form&biblionumber=56 b) notice as you tab through the form, the focus caret seems to disappear c) inspect the code, and see the negcap field d) complete and submit the form successfully == APPLY PATCH == e) repeat steps a-d f) notice tabbing now works correctly g) notice the negcap field is no longer present h) the form should still successfully submit == SIGN OFF ==
Created attachment 189380 [details] [review] Bug 41202: Remove hidden negcap for accessibility This patch removes the negcap field on opac-suggestions, as it serves no purpose other than to confuse screen readers. If ncessary, it should be replaced in a follow-up patch with a visually accessible captcha field. == TO TEST == a) go to /cgi-bin/koha/opac-suggestions.pl?op=add_form&biblionumber=56 b) notice as you tab through the form, the focus caret seems to disappear c) inspect the code, and see the negcap field d) complete and submit the form successfully == APPLY PATCH == e) repeat steps a-d f) notice tabbing now works correctly g) notice the negcap field is no longer present h) the form should still successfully submit == SIGN OFF == Signed-off-by: David Nind <david@davidnind.com>
I've signed off, as what is in the test plan works. However, if anonymous suggestions are allowed (AnonSuggestions = Allow, and AnonymousPatron set (for example, to 19), then the 'negcap' field is also removed from teh form. Testing notes (using KTD): 1. The hidden field is between the 'Notes' and 'Submit your suggestion' fields. When you tab from notes to submit, tab twice to get the submit field to be selected. 2. If you inspect the source before the patch, you will see this HTML markup (after the patch, it is no longer there): <!-- Add a hidden 'negcap' field --> <li id="negcap" style="position: absolute; left: -2000px;"> negcap <input type="text" name="negcap"> </li>