Bugzilla – Attachment 105664 Details for
Bug 22807
Accessibility: Add 'Skip to main content' link
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22807: Add 'Skip to content' option
Bug-22807-Add-Skip-to-content-option.patch (text/plain), 2.14 KB, created by
Martin Renvoize (ashimema)
on 2020-06-09 14:10:58 UTC
(
hide
)
Description:
Bug 22807: Add 'Skip to content' option
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-06-09 14:10:58 UTC
Size:
2.14 KB
patch
obsolete
>From 1e050518046594e0b4df28c489d2cc32f8a133ee Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 9 Jun 2020 14:10:53 +0100 >Subject: [PATCH] Bug 22807: Add 'Skip to content' option > >This patch adds a 'Skip to content' link to the header bar which will >only appear upon the first use of 'tab' to navigate after any fresh page >load in the OPAC. > >Test plan >1/ Load any page in the OPAC >2/ Hit the `tab` key >3/ Note the new 'Skip to main content' link appears at the top left of >the screen. >4/ Hit `Enter` >5/ Note the page scrolls to the area of the page that has the #maincontent id. >6/ Note that the link has been hidden >--- > koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc | 1 + > koha-tmpl/opac-tmpl/bootstrap/js/global.js | 6 ++++++ > 2 files changed, 7 insertions(+) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >index 88dd9a9255..da3e48f5d5 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >@@ -12,6 +12,7 @@ > <div class="navbar navbar-inverse navbar-static-top"> > <div class="navbar-inner"> > <div class="container-fluid"> >+ <button id="scrolltocontent" class="sr-only sr-only-focusable pull-left">Skip to main content</button> > <h1 id="logo"> > <a class="brand" href="/cgi-bin/koha/opac-main.pl"> > [% IF ( LibraryNameTitle ) %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/global.js b/koha-tmpl/opac-tmpl/bootstrap/js/global.js >index 76ce7b5cb0..445f00a7ba 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/global.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/global.js >@@ -91,3 +91,9 @@ function confirmModal(message, title, yes_label, no_label, callback) { > $("#bootstrap-confirm-box-modal-cancel").text( no_label || 'Cancel' ); > $("#bootstrap-confirm-box-modal").modal('show'); > } >+ >+$("#scrolltocontent").click(function() { >+ $('html,body').animate({ >+ scrollTop: $(".maincontent").offset().top}, >+ 'slow'); >+}); >-- >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 22807
:
105663
|
105664
|
105678
|
105698
|
105699
|
105700
|
105708
|
105709
|
105710
|
105711
|
105712
|
105713
|
105714
|
106124
|
106125
|
106126
|
106127
|
106128