Skip to content

Commit 9b58dbc

Browse files
docs: enhance accessibility by adding aria-labels
risk: low
1 parent 777c00d commit 9b58dbc

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎docs/assets/icons/external-link.svg‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎docs/assets/scss/typography.scss‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,12 @@ body {
4141
margin-top: 2em;
4242
margin-bottom: 1em;
4343

44-
&[id]:before {
45-
@include mq(large) {
46-
height: 179px;
47-
margin-top: -179px;
48-
}
44+
&[id] {
45+
scroll-margin-top: 179px;
46+
}
47+
48+
&[id]::before {
49+
display: none;
4950
}
5051

5152
a {

‎docs/layouts/partials/prev-next-pages.html‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
{{ else }}
1717
{{ if $currentPage.NextInSection }}
1818
{{ with $currentPage.NextInSection }}
19-
<a href="{{ .RelPermalink }}" class="gd-docs-prev-next-pages__link gd-docs-prev-next-pages__prev">
19+
<a href="{{ .RelPermalink }}" class="gd-docs-prev-next-pages__link gd-docs-prev-next-pages__prev" aria-label="{{ .LinkTitle }} (Prev article)">
2020
<span class="gd-docs-prev-next-pages__chevron">{{ with resources.Get "icons/chevron.svg" }}{{ ( . | minify).Content | safeHTML }}{{ end }}</span>
2121
{{ .LinkTitle }}
2222
</a>
@@ -32,15 +32,15 @@
3232

3333
{{ if $currentPage.IsSection }}
3434
{{ with index $currentPage.Pages.ByWeight 0 }}
35-
<a href="{{ .RelPermalink }}" class="gd-docs-prev-next-pages__link gd-docs-prev-next-pages__next">
35+
<a href="{{ .RelPermalink }}" class="gd-docs-prev-next-pages__link gd-docs-prev-next-pages__next" aria-label="{{ .LinkTitle }} (Next article)">
3636
<span class="gd-docs-prev-next-pages__chevron">{{ with resources.Get "icons/chevron.svg" }}{{ ( . | minify).Content | safeHTML }}{{ end }}</span>
3737
{{ .LinkTitle }}
3838
</a>
3939
{{ end }}
4040
{{ else }}
4141
{{ if $currentPage.PrevInSection }}
4242
{{ with $currentPage.PrevInSection }}
43-
<a href="{{ $currentPage.PrevInSection.RelPermalink }}" class="gd-docs-prev-next-pages__link gd-docs-prev-next-pages__next">
43+
<a href="{{ $currentPage.PrevInSection.RelPermalink }}" class="gd-docs-prev-next-pages__link gd-docs-prev-next-pages__next" aria-label="{{ .LinkTitle }} (Next article)">
4444
<span class="gd-docs-prev-next-pages__chevron">{{ with resources.Get "icons/chevron.svg" }}{{ ( . | minify).Content | safeHTML }}{{ end }}</span>
4545
{{ $currentPage.PrevInSection.LinkTitle }}
4646
</a>

0 commit comments

Comments
 (0)