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 -}}
|
{{ 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>
|
||||||
|
|
Loading…
Reference in a new issue