Bugzilla – Attachment 107176 Details for
Bug 26041
Accessibility: The date picker calendar is not keyboard accessible
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26041: Enable keyboard navigation without 'ctrl'
Bug-26041-Enable-keyboard-navigation-without-ctrl.patch (text/plain), 2.45 KB, created by
Martin Renvoize (ashimema)
on 2020-07-22 12:34:45 UTC
(
hide
)
Description:
Bug 26041: Enable keyboard navigation without 'ctrl'
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-07-22 12:34:45 UTC
Size:
2.45 KB
patch
obsolete
>From ed3f7c35bc5b2a16a93ff90811d239e0abc68110 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 22 Jul 2020 13:28:44 +0100 >Subject: [PATCH] Bug 26041: Enable keyboard navigation without 'ctrl' > >This patch enables keyboard navigation using the arrow keys without the >need to hold the control key for the jQuery UI datepicker. > >Test plan >1/ Navigate to an item in the opac and attempt to place a hold >2/ On the resultant screen, use keyboard navigation to trigger the 'Show >more options' dropdown. >3/ Focus on one of the date inputs using keyboard navigation. >4/ Use 'ctrl + arrow' keys to navigate the datepicker. >5/ Note that prior to the patch using 'bare' arrow keys does not trigger >anything >6/ Apply the patch and confirm that the datepicker can now be naviated >using the arrow keys without holding the ctrl key. >7/ Confirm that using the ctrl key combinations continue to work as >expected too. >8/ Signoff >--- > .../bootstrap/en/includes/opac-bottom.inc | 1 + > koha-tmpl/opac-tmpl/bootstrap/js/a11y.js | 15 +++++++++++++++ > 2 files changed, 16 insertions(+) > create mode 100644 koha-tmpl/opac-tmpl/bootstrap/js/a11y.js > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc >index a32e7a56ee..591d354b52 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc >@@ -98,6 +98,7 @@ $.widget.bridge('uitooltip', $.ui.tooltip); > [% Asset.js("lib/bootstrap/js/bootstrap.min.js") | $raw %] > [% Asset.js("lib/fontfaceobserver.min.js") | $raw %] > [% Asset.js("js/global.js") | $raw %] >+[% Asset.js("js/a11y.js") | $raw %] > <script> > Modernizr.load([ > // Test need for polyfill >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/a11y.js b/koha-tmpl/opac-tmpl/bootstrap/js/a11y.js >new file mode 100644 >index 0000000000..59f348f62f >--- /dev/null >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/a11y.js >@@ -0,0 +1,15 @@ >+// jQuery Datepicker - Map arrow keys >+var doKeyDown = $.datepicker._doKeyDown >+$.extend($.datepicker, { >+ _doKeyDown: function(event) { >+ if (event.which === $.ui.keyCode.LEFT || >+ event.which === $.ui.keyCode.RIGHT || >+ event.which === $.ui.keyCode.UP || >+ event.which === $.ui.keyCode.DOWN) { >+ event.ctrlKey = true; >+ doKeyDown(event); >+ } else { >+ doKeyDown(event); >+ } >+ } >+}); >-- >2.20.1
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 26041
:
107176
|
107274
|
107276
|
108664
|
109470
|
109544
|
109558