Skip to content

Commit

Permalink
Accessibility improvements
Browse files Browse the repository at this point in the history
- Adds semantic 'article' tag to blog posts

Removed from PR:
- Adds main landmark (this is particularly helpful for screen readers - tested with NVDA on Windows)
  • Loading branch information
coliff committed Apr 23, 2024
1 parent 2949d9d commit fb13167
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/layouts/_default/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{{- /* Don't lazyload the first asset in each page (video, banner etc) */ -}}
{{- $lazyload := cond (eq $i 0) false true -}}

<div class="post">
<article class="post">
<h1 class="post-title fw-semibold">
<a href="{{ .RelPermalink }}" class="text-decoration-none">{{ .Title }}</a>
</h1>
Expand All @@ -22,7 +22,7 @@ <h1 class="post-title fw-semibold">
{{- end }}

{{ .Content }}
</div>
</article>
{{- end }}
</div>

Expand Down
4 changes: 2 additions & 2 deletions src/layouts/posts/single.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{ define "main" }}
<div class="posts-container mx-auto my-5">
<div class="post">
<article class="post">
<h1 class="post-title fw-semibold">{{ .Page.Title }}</h1>
{{ partial "author-info" (dict "context" .) -}}

Expand All @@ -13,7 +13,7 @@ <h1 class="post-title fw-semibold">{{ .Page.Title }}</h1>
{{- end -}}

{{ .Content }}
</div>
</article>

<div class="related">
<h2 class="h3 mb-3">Related posts</h2>
Expand Down

0 comments on commit fb13167

Please sign in to comment.