| Summary: | Remove the 'negcap' field from the OPAC purchase suggestion form | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Jake Deery <jake.deery> |
| Component: | Accessibility | Assignee: | Jake Deery <jake.deery> |
| Status: | Signed Off --- | QA Contact: | Testopia <testopia> |
| Severity: | trivial | ||
| Priority: | P5 - low | CC: | david, dcook, m.de.rooy, martin.renvoize, matt.blenkinsop, oleonard |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=3144 | ||
| 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 41202: Remove hidden negcap for accessibility
Bug 41202: Remove hidden negcap for accessibility |
||
|
Description
Jake Deery
2025-11-06 09:37:43 UTC
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> Hi David, Thanks for the sign-off. I agree with your sentiment around negcap and anonymous access. I think we need a better solution, though – something that doesn't break accessibility. Perhaps a follow-up bug, which addresses reimplementing this using a proper captcha library? We could also then use that on the self-reg form, too. Thanks, Jake |