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 @@
|
|||
<details>
|
||||
{{ with .Parent -}}
|
||||
{{- $type := "image" -}}
|
||||
{{- with .Get "type" -}}
|
||||
{{- $type = . -}}
|
||||
{{- end -}}
|
||||
<summary><span id="btn-{{ .Get "id" }}">{{ $type | humanize }} <span itemprop="accessibilityFeature">transcript</span></span></summary>
|
||||
<div id="transcript-{{ .Get "id" }}" aria-labelledby="btn-{{ .Get "id" }}">
|
||||
{{- 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>
|
||||
</div>
|
||||
</section>
|
||||
</details>
|
||||
|
|
Loading…
Reference in a new issue