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

Improve image transcript navigation

- Identify the transcript with a subheading, ending in a period so that
  the aria-description separates the identifier from the concept.
- Put the transcript in a <section>
- Snuck in a trivial syntax fix for the generator element.
This commit is contained in:
Rohan Kumar 2022-05-06 10:31:52 -07:00
parent 8579559978
commit 372589a57a
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
2 changed files with 6 additions and 4 deletions

View file

@ -63,5 +63,5 @@
<meta property="og:image:alt" content="White-on-black colon and semicolon">
<meta property="og:url" content="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">
<meta property="og:description" content="{{ $description }}">
{{ hugo.Generator }}
{{ hugo.Generator | replaceRE " />" ">" | safeHTML}}
</head>

View file

@ -1,9 +1,11 @@
<details>
<summary>Toggle transcript</summary>
<div itemprop="embeddedTextCaption"
{{ with .Parent -}}
id="transcript-{{ .Get "id" }}"
{{- end -}}>
<section id="transcript-{{ .Get "id" }}">
<h5>Image transcript.</h5>
{{- end -}}
<div itemprop="embeddedTextCaption">
{{ .Inner | markdownify | safeHTML }}
</div>
</section>
</details>