Skip to content

Commit 5af2fd1

Browse files
committed
Wrap content in <main> for a screen-reader landmark
1 parent ffef75f commit 5af2fd1

6 files changed

Lines changed: 22 additions & 22 deletions

File tree

_layouts/app.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ <h1 id="foundry"><a href="/{{ messages.suffix }}">{{ messages.foundry }}</a></h1
6666
<input type="number" id="font-size-number" min="10" max="500" value="{{ fontSize }}" title="{{ messages.app.font-size }}">
6767
</div>
6868
</div>
69-
<section dir="rtl">
69+
<main dir="rtl">
7070
<canvas tabindex="0" id="canvas"></canvas>
7171
<input type="text" id="hiddeninput">
72-
</section>
72+
</main>
7373
<p class="alternates-header" style="display: none;">{{ messages.app.alternates }}</p>
7474
<div id="alternates"></div>
7575
<footer>

_layouts/default.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ <h1 id="foundry"><a href="/{{ messages.suffix }}">{{ messages.foundry }}</a></h1
2626
<p class="lang-switcher-top">
2727
{% include language-switcher.html %}
2828
</p>
29-
<section>
29+
<main>
3030
{{ content }}
31-
</section>
31+
</main>
3232
<footer>
3333
{% include contact.html %}
3434
</footer>

_layouts/font.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ <h1 id="foundry"><a href="/{{ messages.suffix }}">{{ messages.foundry }}</a></h1
3232
{% include language-switcher.html %}
3333
</p>
3434
<h1 dir="rtl" id="title">{{ config.title }}{{ config.title-separator }}{{ config.subtitle }}</h1>
35-
<section>
35+
<main>
3636
{% if page.subtitle %}
3737
<h1>{{ page.title | default: config.title }} — {{ page.subtitle }}</h1>
3838
{% endif %}
3939
{{ content }}
40-
</section>
40+
</main>
4141

4242
<footer>
4343
{% if project == "amiri" %}

_sass/font.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ body {
2020
grid-template-areas:
2121
". nav nav"
2222
"header title title"
23-
"header section footer";
23+
"header main footer";
2424
gap: var(--main-gap);
2525
}
2626

@@ -36,8 +36,8 @@ header {
3636
grid-area: title;
3737
}
3838

39-
section {
40-
grid-area: section;
39+
main {
40+
grid-area: main;
4141
}
4242

4343
footer {
@@ -189,7 +189,7 @@ footer p {
189189
"nav"
190190
"lang-switcher"
191191
"title"
192-
"section"
192+
"main"
193193
"footer"
194194
"header"
195195
;
@@ -246,7 +246,7 @@ footer p {
246246
}
247247

248248
@media (max-width: 700px) {
249-
section>p:lang(en-US) {
249+
main>p:lang(en-US) {
250250
text-align: start;
251251
hyphens: revert;
252252
}

assets/css/app.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ body {
4040
grid-template-areas:
4141
". nav nav"
4242
"header toolbar toolbar"
43-
"header section alternates";
43+
"header main alternates";
4444
gap: var(--main-gap);
4545
}
4646

@@ -52,8 +52,8 @@ header {
5252
grid-area: header;
5353
}
5454

55-
section {
56-
grid-area: section;
55+
main {
56+
grid-area: main;
5757
}
5858

5959
footer {
@@ -152,7 +152,7 @@ footer {
152152
font-family: var(--latin-font);
153153
}
154154

155-
section {
155+
main {
156156
overflow: scroll;
157157
}
158158

@@ -309,7 +309,7 @@ input[type=range]::-moz-range-thumb {
309309
"nav"
310310
"lang-switcher"
311311
"toolbar"
312-
"section"
312+
"main"
313313
"alternates"
314314
"footer"
315315
;

assets/css/default.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ body {
2121
justify-content: space-between;
2222
grid-template-areas:
2323
". nav nav"
24-
"header section ."
25-
"header section .";
24+
"header main ."
25+
"header main .";
2626
gap: var(--main-gap);
2727
}
2828

@@ -34,8 +34,8 @@ header {
3434
grid-area: header;
3535
}
3636

37-
section {
38-
grid-area: section;
37+
main {
38+
grid-area: main;
3939
}
4040

4141
footer {
@@ -162,7 +162,7 @@ footer {
162162
"nav"
163163
"lang-switcher"
164164
"header"
165-
"section"
165+
"main"
166166
"footer"
167167
;
168168
}
@@ -201,7 +201,7 @@ footer {
201201
}
202202

203203
@media (max-width: 700px) {
204-
section>p:lang(en-US) {
204+
main>p:lang(en-US) {
205205
text-align: start;
206206
hyphens: revert;
207207
}

0 commit comments

Comments
 (0)