commit 314ec1716a51cdeab1a4c005aa3909b77668b699
parent f252552c7560fd71171089c93221fd7f17a47694
Author: Christian Grothoff <grothoff@gnunet.org>
Date: Mon, 10 Oct 2022 12:13:13 +0200
add accessibility skip link to demo pages
Diffstat:
2 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/talermerchantdemos/static/demo.css b/talermerchantdemos/static/demo.css
@@ -1,6 +1,22 @@
@charset "UTF-8";
@import url(/static/theme.css);
+
+.skip {
+ position: absolute;
+ left: -10000px;
+ top: auto;
+ width: 1px;
+ height: 1px;
+ overflow: hidden;
+}
+
+.skip:focus {
+ position: static;
+ width: auto;
+ height: auto;
+}
+
.demobar h1 {
text-align: center;
}
diff --git a/talermerchantdemos/templates/common-base.html.j2 b/talermerchantdemos/templates/common-base.html.j2
@@ -26,6 +26,7 @@
<body>
<header class="demobar" style="display: flex; flex-direction: row; justify-content: space-between;">
+ <a href="#main" class="skip">Skip to main content</a>
<div style="max-width: 50em; margin-left: 2em;">
{% block header_content %}
<p>This is the header content.</p>