Bugzilla – Attachment 189151 Details for
Bug 41202
Remove the 'negcap' field from the OPAC purchase suggestion form
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41202: Remove hidden negcap for accessibility
Bug-41202-Remove-hidden-negcap-for-accessibility.patch (text/plain), 2.93 KB, created by
Jake Deery
on 2025-11-06 09:45:58 UTC
(
hide
)
Description:
Bug 41202: Remove hidden negcap for accessibility
Filename:
MIME Type:
Creator:
Jake Deery
Created:
2025-11-06 09:45:58 UTC
Size:
2.93 KB
patch
obsolete
>From 07a29cc2163fb87858fd0fca190dd80287c65d6a Mon Sep 17 00:00:00 2001 >From: Jake Deery <jake.deery@openfifth.co.uk> >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 %] > </li> > [% END %] >- >- <!-- Add a hidden 'negcap' field --> >- <li id="negcap" style="position: absolute; left: -2000px;"> negcap <input type="text" name="negcap" /> </li> > </ol> > </fieldset> > <fieldset class="action"> >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)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41202
:
189151
|
189380