Bug 22807: Add 'Skip to content' option
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 9 Jun 2020 13:10:53 +0000 (14:10 +0100)
committerLucas Gass <lucas@bywatersolutions.com>
Fri, 10 Jul 2020 17:29:01 +0000 (17:29 +0000)
commitc8da2d3278a89df4d670465bfc55e269a4472f4e
tree1d385e462269e9ca5f011ceef6a09bf4828cfd45
parent987eb51a3330e69b018633d01ed987d9cf04dfb7
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` or Click the button
5/ Note the page scrolls to the area of the page that has the first block
   containing a .maincontent class.
6/ Note that the next available focusable element after the first .maincontent
   block has been given focus.
7/ Note that the link has been hidden

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c36560a1ad731af955c005306c2c2800057cd890)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc
koha-tmpl/opac-tmpl/bootstrap/js/global.js