Skip to content

Commit 0dd4831

Browse files
committed
Added aria labels to footer links
1 parent a201390 commit 0dd4831

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

material/partials/footer.html

+6-4
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,28 @@
66
{% if page.previous_page or page.next_page %}
77
<nav class="md-footer__inner md-grid" aria-label="{{ lang.t('footer.title') }}">
88
{% if page.previous_page %}
9-
<a href="{{ page.previous_page.url | url }}" class="md-footer__link md-footer__link--prev" rel="prev">
9+
{% set direction = lang.t("footer.previous") %}
10+
<a href="{{ page.previous_page.url | url }}" class="md-footer__link md-footer__link--prev" aria-label="{{ direction }}: {{ page.previous_page.title }}" rel="prev">
1011
<div class="md-footer__button md-icon">
1112
{% include ".icons/material/arrow-left.svg" %}
1213
</div>
1314
<div class="md-footer__title">
1415
<div class="md-ellipsis">
1516
<span class="md-footer__direction">
16-
{{ lang.t("footer.previous") }}
17+
{{ direction }}
1718
</span>
1819
{{ page.previous_page.title }}
1920
</div>
2021
</div>
2122
</a>
2223
{% endif %}
2324
{% if page.next_page %}
24-
<a href="{{ page.next_page.url | url }}" class="md-footer__link md-footer__link--next" rel="next">
25+
{% set direction = lang.t("footer.next") %}
26+
<a href="{{ page.next_page.url | url }}" class="md-footer__link md-footer__link--next" aria-label="{{ direction }}: {{ page.next_page.title }}" rel="next">
2527
<div class="md-footer__title">
2628
<div class="md-ellipsis">
2729
<span class="md-footer__direction">
28-
{{ lang.t("footer.next") }}
30+
{{ direction }}
2931
</span>
3032
{{ page.next_page.title }}
3133
</div>

src/partials/footer.html

+6-2
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@
3434

3535
<!-- Link to previous page -->
3636
{% if page.previous_page %}
37+
{% set direction = lang.t("footer.previous") %}
3738
<a
3839
href="{{ page.previous_page.url | url }}"
3940
class="md-footer__link md-footer__link--prev"
41+
aria-label="{{ direction }}: {{ page.previous_page.title }}"
4042
rel="prev"
4143
>
4244
<div class="md-footer__button md-icon">
@@ -45,7 +47,7 @@
4547
<div class="md-footer__title">
4648
<div class="md-ellipsis">
4749
<span class="md-footer__direction">
48-
{{ lang.t("footer.previous") }}
50+
{{ direction }}
4951
</span>
5052
{{ page.previous_page.title }}
5153
</div>
@@ -55,15 +57,17 @@
5557

5658
<!-- Link to next page -->
5759
{% if page.next_page %}
60+
{% set direction = lang.t("footer.next") %}
5861
<a
5962
href="{{ page.next_page.url | url }}"
6063
class="md-footer__link md-footer__link--next"
64+
aria-label="{{ direction }}: {{ page.next_page.title }}"
6165
rel="next"
6266
>
6367
<div class="md-footer__title">
6468
<div class="md-ellipsis">
6569
<span class="md-footer__direction">
66-
{{ lang.t("footer.next") }}
70+
{{ direction }}
6771
</span>
6872
{{ page.next_page.title }}
6973
</div>

src/partials/source-date.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@
2020
IN THE SOFTWARE.
2121
-->
2222

23-
<!-- Kept for backward compatibility. This file wil be removed in v8 -->
23+
<!-- Kept for backward compatibility. This file will be removed in v8 -->
2424
{% include "partials/source-file.html" %}

0 commit comments

Comments
 (0)