summaryrefslogtreecommitdiff
path: root/layouts/partials/header.html
diff options
context:
space:
mode:
authorAditya Telange <21258296+adityatelange@users.noreply.github.com>2020-10-30 01:15:29 +0530
committerAditya Telange <21258296+adityatelange@users.noreply.github.com>2020-10-30 01:15:43 +0530
commitb239f42f6b419c1835ffdaa8286c7fd638a55303 (patch)
tree697f1fce789200b52c2dbef17099d38c540fdf59 /layouts/partials/header.html
parent9acbc2c134c2052c54833d9ad63fa048694b9895 (diff)
Add accesskeys (attribute specifies a shortcut key to activate/focus an element.)
c - ToC Open/Close g- Go To Top h - Home (according to current lang) t - Theme toggle more: https://www.w3schools.com/tags/att_global_accesskey.asp
Diffstat (limited to 'layouts/partials/header.html')
-rw-r--r--layouts/partials/header.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 48a9f4e..233587b 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -33,7 +33,7 @@
<header class="header">
<nav class="nav">
<div class="logo">
- <a href="{{ "" | absLangURL }}">
+ <a href="{{ "" | absLangURL }}" accesskey="h">
{{- if .Site.Params.label.icon }}
<img src="{{- .Site.Params.label.icon -}}" alt="logo" aria-label="logo"
height="{{- .Site.Params.label.iconHeight | default "30px" -}}">
@@ -43,7 +43,7 @@
<span class="logo-switches">
{{- if (and (not .Site.Params.disableThemeToggle) (not (or (eq .Site.Params.defaultTheme "light") (eq .Site.Params.defaultTheme "dark")))) }}
<span class="theme-toggle">
- <a id="theme-toggle">
+ <a id="theme-toggle" accesskey="t">
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">