From 07a29cc2163fb87858fd0fca190dd80287c65d6a Mon Sep 17 00:00:00 2001 From: Jake Deery Date: Thu, 23 Oct 2025 10:13:48 +0100 Subject: [PATCH] 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 == --- .../opac-tmpl/bootstrap/en/modules/opac-suggestions.tt | 3 --- opac/opac-suggestions.pl | 7 ------- 2 files changed, 10 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt index bd8775cf11f..59595a93bc6 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt @@ -289,9 +289,6 @@ [% END %] [% END %] - - -
  • negcap
  • diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl index 30bf425a370..4c349cf64c1 100755 --- a/opac/opac-suggestions.pl +++ b/opac/opac-suggestions.pl @@ -41,7 +41,6 @@ use Koha::DateUtils qw( dt_from_string ); my $input = CGI->new; my $op = $input->param('op') || 'else'; my $biblionumber = $input->param('biblionumber'); -my $negcaptcha = $input->param('negcap'); my $suggested_by_anyone = $input->param('suggested_by_anyone') || 0; my $title_filter = $input->param('title_filter'); my $need_confirm = 0; @@ -62,12 +61,6 @@ my $suggestion = { note => scalar $input->param('note'), }; -# If a spambot accidentally populates the 'negcap' field in the suggestions form, then silently skip and return. -if ($negcaptcha) { - print $input->redirect("/cgi-bin/koha/opac-suggestions.pl"); - exit; -} - my ( $template, $borrowernumber, $cookie, @messages ); my $deleted = $input->param('deleted'); my $submitted = $input->param('submitted'); -- 2.50.1 (Apple Git-155)