Improve accessibility

This commit is contained in:
2021-11-23 19:06:26 -06:00
parent 1380558384
commit 43d406c4fe
18 changed files with 90 additions and 30 deletions

View File

@ -1,7 +1,7 @@
<h{{ .Level }} id="{{ .Anchor | safeURL }}" class="section-header">
{{ .Text | safeHTML }}
<a href="#{{ .Anchor | safeURL }}">
<span class="section-header-link">
<span class="section-header-link" aria-label="{{ i18n "aria_header_link" }}">
{{ partial "icon.html" "link" }}
</span>
</a>

View File

@ -4,7 +4,7 @@
{{ partial "head.html" . }}
<body>
<a id="top"></a>
<a id="top" aria-hidden="true"></a>
<div class="top">
{{ partial "top.html" . }}
@ -29,7 +29,7 @@
</footer>
{{ end }}
<a id="back-to-top" href="#top">
<a id="back-to-top" href="#top" aria-label="{{ i18n "aria_back_to_top_button" }}">
{{ partial "icon.html" "chevron-up" }}
</a>
<noscript>

View File

@ -2,11 +2,7 @@
<h1>
{{ with .Params.icon }}{{ partial "icon.html" . }}{{ end }}
{{ .Title | markdownify }}
<span class="rss-link">
{{ with .OutputFormats.Get "rss" }}
<a href="{{ .Permalink }}" target="_blank" rel="noopener">{{ partial "icon.html" "rss-feed" }}</a>
{{ end }}
</span>
{{ partial "rss-link.html" . }}
</h1>
<div class="list-page-content">

View File

@ -28,7 +28,7 @@
{{ if .Params.Toc }}
<div class="table-of-contents">
<div class="table-of-contents" aria-label="{{ i18n "aria_table_of_contents" }}">
<details>
<summary>{{ i18n "table_of_contents" }}</summary>
{{ .TableOfContents }}