1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-27 14:12:09 +00:00

Give transcripts back their headings

<div> can't be given an accessible name, and a <section> should have a
heading. Sigh.
This commit is contained in:
Rohan Kumar 2022-06-29 21:37:38 -07:00
parent f12a5b4883
commit 22dfabd262
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479

View file

@ -1,14 +1,15 @@
<details>
{{ with .Parent -}} {{ with .Parent -}}
{{- $type := "image" -}} {{- $type := "image" -}}
{{- with .Get "type" -}} {{- with .Get "type" -}}
{{- $type = . -}} {{- $type = . -}}
{{- end -}} {{- end -}}
<summary><span id="btn-{{ .Get "id" }}">{{ $type | humanize }} <span itemprop="accessibilityFeature">transcript</span></span></summary> <details>
<div id="transcript-{{ .Get "id" }}" aria-labelledby="btn-{{ .Get "id" }}"> <summary>Toggle {{ $type }} <span itemprop="accessibilityFeature">transcript</span></summary>
{{- end -}} <section id="transcript-{{ .Get "id" }}">
<h5>{{ $type | humanize }} transcript</h5>
{{- end }}
<div itemprop="embeddedTextCaption"> <div itemprop="embeddedTextCaption">
{{ .Inner | markdownify | safeHTML }} {{ .Inner | markdownify | safeHTML }}
</div> </div>
</div> </section>
</details> </details>