Skip to content

Commit 19508c7

Browse files
committed
Wrap content in <main> tag in base layout
Wraps page content within a <main> element for improved semantic HTML structure and accessibility ([document should have one main landmark ](https://dequeuniversity.com/rules/axe/4.10/landmark-one-main)).
1 parent 6db283f commit 19508c7

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

_layouts/base.html

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,16 @@ <h1><a href="{{ site.baseurl }}/">{{ site.title }}</a></h1>
119119
{% endif -%}
120120
</header>
121121

122-
{% comment -%}
123-
This is primarily intended to remove the trailing slash from the
124-
self-closing `img` tags that result from rendered Markdown text.
125-
{% endcomment -%}
126-
{% capture rendered_content -%}
127-
{{ content }}
128-
{% endcapture -%}
129-
{{ rendered_content | replace: " />", ">" | replace: "/>", ">" -}}
122+
<main>
123+
{% comment -%}
124+
This is primarily intended to remove the trailing slash from the
125+
self-closing `img` tags that result from rendered Markdown text.
126+
{% endcomment -%}
127+
{% capture rendered_content -%}
128+
{{ content }}
129+
{% endcapture -%}
130+
{{ rendered_content | replace: " />", ">" | replace: "/>", ">" -}}
131+
</main>
130132
</div>
131133

132134
{% if site.forkme_nwo -%}

0 commit comments

Comments
 (0)