1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-12-27 10:52:09 +00:00
seirdy.one/layouts/shortcodes/transcribed-image-transcript.html
Rohan Kumar 22dfabd262
Give transcripts back their headings
<div> can't be given an accessible name, and a <section> should have a
heading. Sigh.
2022-06-29 21:40:35 -07:00

15 lines
408 B
HTML

{{ with .Parent -}}
{{- $type := "image" -}}
{{- with .Get "type" -}}
{{- $type = . -}}
{{- end -}}
<details>
<summary>Toggle {{ $type }} <span itemprop="accessibilityFeature">transcript</span></summary>
<section id="transcript-{{ .Get "id" }}">
<h5>{{ $type | humanize }} transcript</h5>
{{- end }}
<div itemprop="embeddedTextCaption">
{{ .Inner | markdownify | safeHTML }}
</div>
</section>
</details>