From 328bcad2968926232f6dacd6e8c9d375ef29560c Mon Sep 17 00:00:00 2001 From: Marie Birner Date: Sat, 2 Aug 2025 19:45:09 +0200 Subject: [PATCH] [TASK] improve a11y in header nav --- src/page.rs | 18 +++++++++++++++--- static/serve/style.css | 1 - 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/page.rs b/src/page.rs index 9f55061..bd81237 100644 --- a/src/page.rs +++ b/src/page.rs @@ -16,9 +16,21 @@ pub fn new(content: Markup) -> Markup { li { a href="/" { strong { "Digital Shadows" } } } } ul { - li { a href="/" { "🏠" } } - li { a href="/game" { "📸" } } - li { div id="theme_switcher" style="width: 20px; height: 20px;" {} } + li { + a href="/"{ + span role="img" aria-label="home" { + "🏠" + } + } + } + li { + a href="/game" { + span role="img" aria-label="camera" { + "📸" + } + } + } + li { span id="theme_switcher" style="width: 20px; height: 20px;" {} } } } } diff --git a/static/serve/style.css b/static/serve/style.css index 809ccff..400a1ec 100644 --- a/static/serve/style.css +++ b/static/serve/style.css @@ -17,7 +17,6 @@ h1 { margin-top: clamp(3rem, 1.875rem + 2vw, 5rem); margin-bottom: clamp(5rem, 1.875rem + 2vw, 8rem); text-align: center; - text-shadow: 0 1px 0px #378ab4, 1px 0 0px #5dabcd, 1px 2px 1px #378ab4, 2px 1px 1px #5dabcd, 2px 3px 2px #378ab4, 3px 2px 2px #5dabcd, 3px 4px 2px #378ab4, 4px 3px 3px #5dabcd, 4px 5px 3px #378ab4, 5px 4px 2px #5dabcd, 5px 6px 2px #378ab4, 6px 5px 2px #5dabcd, 6px 7px 1px #378ab4, 7px 6px 1px #5dabcd, 7px 8px 0px #378ab4, 8px 7px 0px #5dabcd; } header a {