Add aria-labels for header links

This commit is contained in:
Will Faught
2023-01-07 16:57:43 -08:00
parent d39846cbb3
commit a702e275fe
2 changed files with 2 additions and 2 deletions

View File

@@ -3,7 +3,7 @@
{{ if .Scratch.Get "paige_show_full_pages" }}
{{ .Content }}
{{ else }}
{{ .Content | replaceRE `(<h[1-6] id="([^"]+)".+)(</h[1-6]+>)` `${1}<a class="paige-header-link" href="#${2}">#</a>${3}` | safeHTML }}
{{ .Content | replaceRE `(<h[1-6] id="([^"]+)".+)(</h[1-6]+>)` `${1}<a aria-label="Link to this section" class="paige-header-link" href="#${2}">#</a>${3}` | safeHTML }}
{{ end }}
</section>
{{ end }}