From 59c6f6ca069df3d877db24a0a0aebcd0dfaca5a2 Mon Sep 17 00:00:00 2001 From: Vika Date: Wed, 25 Jan 2023 05:09:52 +0300 Subject: Add a skip link to the page layout I tried to run my website through a screen reader, and thought this would be a nice addition. Also it turns out my website is *mostly* accessible as it is -- yay for semantic HTML! --- kittybox-rs/templates/src/templates.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'kittybox-rs/templates/src') diff --git a/kittybox-rs/templates/src/templates.rs b/kittybox-rs/templates/src/templates.rs index ba5b684..ba52af7 100644 --- a/kittybox-rs/templates/src/templates.rs +++ b/kittybox-rs/templates/src/templates.rs @@ -31,6 +31,7 @@ markup::define! { }*/ } body { + a[href="#main_content", id="skip-to-content"] { "Skip to content" } // TODO Somehow compress headerbar into a menu when the screen space is tight nav #headerbar { ul { @@ -49,7 +50,7 @@ markup::define! { } } } - main { + main #main_content { @markup::raw(content) } footer { -- cgit 1.4.1