diff options
author | Alex Shpak <alex-shpak@users.noreply.github.com> | 2020-07-07 23:06:21 +0200 |
---|---|---|
committer | Alex Shpak <alex-shpak@users.noreply.github.com> | 2020-07-07 23:06:21 +0200 |
commit | bf93dafdfa6b1c3977e25d093527f40a058f114d (patch) | |
tree | 715837df621208eae090b7acc0a28d8613f5eb20 /layouts | |
parent | f416a71bf8bb77e7af9ade9eea7fe3b662962290 (diff) |
Improve accessibility and keyboard navigation
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/baseof.html | 10 | ||||
-rw-r--r-- | layouts/shortcodes/tabs.html | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 5784d2a..9c8811e 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -7,7 +7,8 @@ </head> <body dir={{ .Site.Language.LanguageDirection }}> - <input type="checkbox" class="hidden" id="menu-control" /> + <input type="checkbox" class="hidden toggle" id="menu-control" /> + <input type="checkbox" class="hidden toggle" id="toc-control" /> <main class="container flex"> <aside class="book-menu"> {{ template "menu" . }} <!-- Left menu Content --> @@ -52,10 +53,9 @@ {{ partial "docs/header" . }} {{ if default true (default .Site.Params.BookToC .Params.BookToC) }} - <input type="checkbox" class="hidden" id="toc-control" /> - <aside class="hidden clearfix"> - {{ template "toc" . }} - </aside> + <aside class="hidden clearfix"> + {{ template "toc" . }} + </aside> {{ end }} {{ end }} diff --git a/layouts/shortcodes/tabs.html b/layouts/shortcodes/tabs.html index 982f6a0..01c1a63 100644 --- a/layouts/shortcodes/tabs.html +++ b/layouts/shortcodes/tabs.html @@ -4,7 +4,7 @@ <div class="book-tabs"> {{- range $index, $tab := .Scratch.Get $group -}} - <input type="radio" class="hidden" name="{{ $group }}" id="{{ printf "%s-%d" $group $index }}" {{ if not $index }}checked="checked"{{ end }} /> + <input type="radio" class="toggle" name="{{ $group }}" id="{{ printf "%s-%d" $group $index }}" {{ if not $index }}checked="checked"{{ end }} /> <label for="{{ printf "%s-%d" $group $index }}"> {{- $tab.Name -}} </label> |