Skip to content

Commit

Permalink
Add skip links
Browse files Browse the repository at this point in the history
  • Loading branch information
mmistakes committed Jun 10, 2019
1 parent 7da5aca commit be41901
Show file tree
Hide file tree
Showing 6 changed files with 144 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Unreleased

### Enhancements

- Add skip links. [#2182](https://github.com/mmistakes/minimal-mistakes/issues/2182)

## [4.16.4](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.16.4)

### Enhancements
Expand Down
120 changes: 120 additions & 0 deletions _data/ui-text.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
# English (default)
# -----------------
en: &DEFAULT_EN
skip_links : "Skip links"
skip_primary_nav : "Skip to primary navigation"
skip_content : "Skip to content"
skip_footer : "Skip to footer"
page : "Page"
pagination_previous : "Previous"
pagination_next : "Next"
Expand Down Expand Up @@ -56,6 +60,10 @@ en-AU:
# Spanish
# -------
es: &DEFAULT_ES
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "Página"
pagination_previous : "Anterior"
pagination_next : "Siguiente"
Expand Down Expand Up @@ -105,6 +113,10 @@ es-CO:
# French
# ------
fr: &DEFAULT_FR
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "Page"
pagination_previous : "Précédent"
pagination_next : "Suivant"
Expand Down Expand Up @@ -156,6 +168,10 @@ fr-CH:
# Turkish
# -------
tr: &DEFAULT_TR
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "Sayfa"
pagination_previous : "Önceki"
pagination_next : "Sonraki"
Expand Down Expand Up @@ -200,6 +216,10 @@ tr-TR:
# Portuguese
# ----------
pt: &DEFAULT_PT
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "Página"
pagination_previous : "Anterior"
pagination_next : "Seguinte"
Expand Down Expand Up @@ -242,6 +262,10 @@ pt-PT:
<<: *DEFAULT_PT
# Brazilian Portuguese
pt-BR:
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "Página"
pagination_previous : "Anterior"
pagination_next : "Próxima"
Expand Down Expand Up @@ -287,6 +311,10 @@ pt-BR:
# Italian
# -------
it: &DEFAULT_IT
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "Pagina"
pagination_previous : "Precedente"
pagination_next : "Prossima"
Expand Down Expand Up @@ -334,6 +362,10 @@ it-IT:
# Chinese (zh-CN Chinese - China)
# --------------------------------
zh: &DEFAULT_ZH_HANS
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "页面"
pagination_previous : "向前"
pagination_next : "向后"
Expand Down Expand Up @@ -381,6 +413,10 @@ zh-SG:
<<: *DEFAULT_ZH_HANS
# Taiwan (Traditional Chinese)
zh-TW: &DEFAULT_ZH_HANT
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "頁面"
pagination_previous : "較舊"
pagination_next : "較新"
Expand Down Expand Up @@ -425,6 +461,10 @@ zh-HK:
# German / Deutsch
# ----------------
de: &DEFAULT_DE
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "Seite"
pagination_previous : "Vorherige"
pagination_next : "Nächste"
Expand Down Expand Up @@ -481,6 +521,10 @@ de-LU:
# Nepali (Nepal)
# --------------
ne: &DEFAULT_NE
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "पृष्‍ठ"
pagination_previous : "अघिल्लो"
pagination_next : "अर्को"
Expand Down Expand Up @@ -525,6 +569,10 @@ ne-NP:
# Korean
# ------
ko: &DEFAULT_KO
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "페이지"
pagination_previous : "이전"
pagination_next : "다음"
Expand Down Expand Up @@ -569,6 +617,10 @@ ko-KR:
# Russian / Русский
# -----------------
ru: &DEFAULT_RU
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "Страница"
pagination_previous : "Предыдущая"
pagination_next : "Следующая"
Expand Down Expand Up @@ -615,6 +667,10 @@ ru-RU:
# Lithuanian / Lietuviškai
# ------------------------
lt: &DEFAULT_LT
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "Puslapis"
pagination_previous : "Ankstesnis"
pagination_next : "Sekantis"
Expand Down Expand Up @@ -659,6 +715,10 @@ lt-LT:
# Greek
# -----
gr: &DEFAULT_GR
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "Σελίδα"
pagination_previous : "Προηγούμενo"
pagination_next : "Επόμενo"
Expand Down Expand Up @@ -705,6 +765,10 @@ gr-GR:
# Swedish
# -------
sv: &DEFAULT_SV
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "Sidan"
pagination_previous : "Föregående"
pagination_next : "Nästa"
Expand Down Expand Up @@ -754,6 +818,10 @@ sv-FI:
# Dutch
# -----
nl: &DEFAULT_NL
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "Pagina"
pagination_previous : "Vorige"
pagination_next : "Volgende"
Expand Down Expand Up @@ -800,6 +868,10 @@ nl-NL:
# Indonesian
# ----------
id: &DEFAULT_ID
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "Halaman"
pagination_previous : "Kembali"
pagination_next : "Maju"
Expand Down Expand Up @@ -844,6 +916,10 @@ id-ID:
# Vietnamese
# ----------
vi: &DEFAULT_VI
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "Trang"
pagination_previous : "Trước"
pagination_next : "Sau"
Expand Down Expand Up @@ -891,6 +967,10 @@ vi-VN:
# Danish
# ------
da: &DEFAULT_DA
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "Side"
pagination_previous : "Forrige"
pagination_next : "Næste"
Expand Down Expand Up @@ -938,6 +1018,10 @@ da-DK:
# Polish
# ------
pl: &DEFAULT_PL
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "Strona"
pagination_previous : "Poprzednia"
pagination_next : "Następna"
Expand Down Expand Up @@ -982,6 +1066,10 @@ pl-PL:
# Japanese
# --------
ja: &DEFAULT_JA
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "ページ"
pagination_previous : "前へ"
pagination_next : "次へ"
Expand Down Expand Up @@ -1028,6 +1116,10 @@ ja-JP:
# Slovak
# -----------------
sk: &DEFAULT_SK
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "Stránka"
pagination_previous : "Predošlá"
pagination_next : "Ďalšia"
Expand Down Expand Up @@ -1075,6 +1167,10 @@ sk-SK:
# Hungarian
# -----------------
hu: &DEFAULT_HU
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "Oldal"
pagination_previous : "Előző"
pagination_next : "Következő"
Expand Down Expand Up @@ -1122,6 +1218,10 @@ hu-HU:
# Romanian
# -----------------
ro: &DEFAULT_RO
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "Pagina"
pagination_previous : "Anterior"
pagination_next : "Următor"
Expand Down Expand Up @@ -1169,6 +1269,10 @@ ro-RO:
# Punjabi
# -----------------
pa: &DEFAULT_PA
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "ਸਫ਼ਾ"
pagination_previous : "ਪਿਛਲਾ"
pagination_next : "ਅਗਲਾ "
Expand Down Expand Up @@ -1216,6 +1320,10 @@ pa-IN:
# Persian (Farsi)
# --------------
fa: &DEFAULT_FA
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "صفحه"
pagination_previous : "قبلی"
pagination_next : "بعدی"
Expand Down Expand Up @@ -1263,6 +1371,10 @@ fa-IR:
# Malayalam
# -----------------
ml: &DEFAULT_ML
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "പേജ്"
pagination_previous : "തിരികെ"
pagination_next : "മുന്നോട്ട്"
Expand Down Expand Up @@ -1310,6 +1422,10 @@ ml-IN:
# Thailand
# --------------
th: &DEFAULT_TH
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "หน้า"
pagination_previous : "ก่อนหน้า"
pagination_next : "ถัดไป"
Expand Down Expand Up @@ -1357,6 +1473,10 @@ th-TH:
# Hindi
# -----------------
hi: &DEFAULT_HI
skip_links :
skip_primary_nav :
skip_content :
skip_footer :
page : "पृष्ठ"
pagination_previous : "पिछला"
pagination_next : "अगला"
Expand Down
8 changes: 8 additions & 0 deletions _includes/skip-links.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<nav class="skip-links">
<h2 class="screen-reader-text">{{ site.data.ui-text[site.locale].skip_links | default: 'Skip links' }}</h2>
<ul>
<li><a href="#site-nav" class="screen-reader-shortcut">{{{ site.data.ui-text[site.locale].skip_primary_nav | default: 'Skip to primary navigation' }}</a></li>
<li><a href="#main" class="screen-reader-shortcut">{{ site.data.ui-text[site.locale].skip_content | default: 'Skip to content' }}</a></li>
<li><a href="#footer" class="screen-reader-shortcut">{{ site.data.ui-text[site.locale].skip_footer | default: 'Skip to footer' }}</a></li>
</ul>
</nav>
4 changes: 2 additions & 2 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</head>

<body class="layout--{{ page.layout | default: layout.layout }}{% if page.classes or layout.classes %}{{ page.classes | default: layout.classes | join: ' ' | prepend: ' ' }}{% endif %}">

{% include_cached skip-links.html %}
{% include_cached browser-upgrade.html %}
{% include_cached masthead.html %}

Expand All @@ -29,7 +29,7 @@
</div>
{% endif %}

<div class="page__footer">
<div id="footer" class="page__footer">
<footer>
{% include footer/custom.html %}
{% include_cached footer.html %}
Expand Down
8 changes: 7 additions & 1 deletion docs/_docs/18-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ permalink: /docs/history/
excerpt: "Change log of enhancements and bug fixes made to the theme."
sidebar:
nav: docs
last_modified_at: 2019-05-26T20:46:18-04:00
last_modified_at: 2019-06-10T19:30:51-04:00
toc: false
---

## Unreleased

### Enhancements

- Add skip links. [#2182](https://github.com/mmistakes/minimal-mistakes/issues/2182)

## [4.16.4](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.16.4)

### Enhancements
Expand Down
2 changes: 1 addition & 1 deletion docs/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</head>

<body class="layout--{{ page.layout | default: layout.layout }}{% if page.classes or layout.classes %}{{ page.classes | default: layout.classes | join: ' ' | prepend: ' ' }}{% endif %}">

{% include_cached skip-links.html %}
{% include browser-upgrade.html %}
{% include masthead.html %}

Expand Down

0 comments on commit be41901

Please sign in to comment.