From fda442b0441934995b03779e3821799be5f4049c Mon Sep 17 00:00:00 2001 From: andesol Date: Wed, 28 Sep 2022 17:10:46 +0200 Subject: [PATCH] add skip to main content link --- .../assets/styles/components/_buttons.scss | 15 +++++++++++++++ .../theme/sphinx_book_theme/layout.html | 2 ++ 2 files changed, 17 insertions(+) diff --git a/src/sphinx_book_theme/assets/styles/components/_buttons.scss b/src/sphinx_book_theme/assets/styles/components/_buttons.scss index fba7a86d8..a3605c24e 100644 --- a/src/sphinx_book_theme/assets/styles/components/_buttons.scss +++ b/src/sphinx_book_theme/assets/styles/components/_buttons.scss @@ -117,3 +117,18 @@ div.header-article-main { display: none; } } + +.skip-link { + display: block; + left: -999px; + position: absolute; + top: -999px; + + &:focus { + left: 0; + padding: 0.2rem 0.3rem; + position: relative; + top: 0; + z-index: 999999; + } +} diff --git a/src/sphinx_book_theme/theme/sphinx_book_theme/layout.html b/src/sphinx_book_theme/theme/sphinx_book_theme/layout.html index 37f19bce7..545b7e995 100644 --- a/src/sphinx_book_theme/theme/sphinx_book_theme/layout.html +++ b/src/sphinx_book_theme/theme/sphinx_book_theme/layout.html @@ -15,6 +15,8 @@ + +
{%- include "sections/announcement.html" -%}