mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-27 14:12:09 +00:00
f798de7e63
- Stop using draft WAI-ARIA 1.3 that isn't supported yet - Make in-page links focusable across shortcodes/partials - Replace existing in-page heading anchor links with a more accessible option. - Make backlinks aria-labelledby instead of giving them an aria-label, so they can be translated.
8 lines
387 B
HTML
8 lines
387 B
HTML
<h{{ .Level }} id="{{ .Anchor | safeURL }}" tabindex="-1">{{ .Text | safeHTML -}}</h{{ .Level }}>
|
|
{{- if and (eq .Level 2) (eq .Page.Section "posts") }}
|
|
<a
|
|
id="{{ .Anchor | safeURL }}-anchor" href="#{{ .Anchor | safeURL }}"
|
|
aria-labelledby="{{ .Anchor | safeURL }}-prefix {{ .Anchor | safeURL }}">
|
|
<span id="{{ .Anchor | safeURL }}-prefix">Permalink to section</span>
|
|
</a>
|
|
{{- end }}
|