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

Correct use of landmarks

- No content outside landmarks
- Remove bad use of <aside>
This commit is contained in:
Rohan Kumar 2022-04-18 08:56:22 -07:00
parent 92f1d70128
commit 070ad7c14d
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
3 changed files with 3 additions and 5 deletions

View file

@ -1,5 +1,5 @@
<a href="#content" class="skip">Skip to content</a>
<header id="banner" itemscope itemtype="https://schema.org/WPHeader">
<a href="#content" class="skip">Skip to content</a>
<nav aria-label="Main navigation">
<ul class="unstyled-list">
{{- $currentPage := . -}}

View file

@ -16,7 +16,7 @@
{{ $preWithTabIndex := `<pre tabindex="0">` }}
<!--Move the Table of Contents heading *inside* the <nav> element-->
{{ $tocHeadingOutside := `<h2 id="toc-hd">Table of Contents</h2><nav id="TableOfContents">` }}
{{ $tocHeadingOutside := `<h2>Table of Contents</h2><nav id="TableOfContents">` }}
{{ $tocHeadingInside := `<nav id=TableOfContents role="doc-toc"><h2 id="toc-hd">Table of Contents</h2>` }}
{{ .Content | replaceRE $references $referencesWithHeading | replaceRE $endnote $noEndnote | replaceRE $preWithoutTabIndex $preWithTabIndex | replaceRE $tocHeadingOutside $tocHeadingInside | safeHTML -}}

View file

@ -1,3 +1 @@
<aside aria-labelledby="toc-hd">
<h2 id="toc-hd">Table of Contents</h2>{{.Page.TableOfContents}}
</aside>
<h2>Table of Contents</h2>{{.Page.TableOfContents}}