From de5d5ee0e7fcc1ad29bf8c6cfeac2aa987557740 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Tue, 26 Jun 2018 12:37:33 +0200 Subject: [PATCH] Add skip navigation / skip to content links Signed-off-by: Jan-Christoph Borchardt --- core/css/header.scss | 21 +++++++++++++++++++++ core/templates/layout.user.php | 4 ++++ 2 files changed, 25 insertions(+) diff --git a/core/css/header.scss b/core/css/header.scss index fdb2bb24e1..e218f86fa9 100644 --- a/core/css/header.scss +++ b/core/css/header.scss @@ -564,3 +564,24 @@ nav[role='navigation'] { display: none; } } + +/* Skip navigation links – show only on keyboard focus */ +.skip-navigation { + padding: 11px; + position: absolute; + overflow: hidden; + z-index: 1000; + top: -999px; + left: 3px; + /* Force primary color, otherwise too light focused color */ + background: var(--color-primary) !important; + + &.skip-content { + left: 253px; + } + + &:focus, + &:active { + top: 50px; + } +} diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index 596f958341..26669f4a57 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -27,6 +27,10 @@ + + Skip to main content + Skip to navigation of app +