mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-10 00: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:
parent
f12a5b4883
commit
22dfabd262
1 changed files with 12 additions and 11 deletions
|
@ -1,14 +1,15 @@
|
||||||
|
{{ with .Parent -}}
|
||||||
|
{{- $type := "image" -}}
|
||||||
|
{{- with .Get "type" -}}
|
||||||
|
{{- $type = . -}}
|
||||||
|
{{- end -}}
|
||||||
<details>
|
<details>
|
||||||
{{ with .Parent -}}
|
<summary>Toggle {{ $type }} <span itemprop="accessibilityFeature">transcript</span></summary>
|
||||||
{{- $type := "image" -}}
|
<section id="transcript-{{ .Get "id" }}">
|
||||||
{{- with .Get "type" -}}
|
<h5>{{ $type | humanize }} transcript</h5>
|
||||||
{{- $type = . -}}
|
{{- end }}
|
||||||
{{- end -}}
|
<div itemprop="embeddedTextCaption">
|
||||||
<summary><span id="btn-{{ .Get "id" }}">{{ $type | humanize }} <span itemprop="accessibilityFeature">transcript</span></span></summary>
|
{{ .Inner | markdownify | safeHTML }}
|
||||||
<div id="transcript-{{ .Get "id" }}" aria-labelledby="btn-{{ .Get "id" }}">
|
|
||||||
{{- end -}}
|
|
||||||
<div itemprop="embeddedTextCaption">
|
|
||||||
{{ .Inner | markdownify | safeHTML }}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</section>
|
||||||
</details>
|
</details>
|
||||||
|
|
Loading…
Reference in a new issue