wai-website-theme 1.2 → 1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/backtotop.html +1 -1
  3. data/_includes/excol.html +1 -1
  4. data/_includes/feedback-box.html +13 -10
  5. data/_includes/footer.html +20 -6
  6. data/_includes/header.html +73 -35
  7. data/_includes/inpl.html +6 -0
  8. data/_includes/lang.html +7 -0
  9. data/_includes/link.html +92 -0
  10. data/_includes/menuitem.html +5 -3
  11. data/_includes/multilang-list-policy-links.html +1 -1
  12. data/_includes/navlist.html +1 -1
  13. data/_includes/prevnext.html +5 -4
  14. data/_includes/secondarynav.html +34 -6
  15. data/_includes/t.html +33 -0
  16. data/_includes/translation-note-msg.html +45 -0
  17. data/_includes/video-player.html +50 -9
  18. data/_layouts/default.html +32 -9
  19. data/_layouts/home.html +29 -5
  20. data/_layouts/news.html +27 -6
  21. data/_layouts/policy.html +27 -6
  22. data/_layouts/sidenav.html +27 -6
  23. data/_layouts/sidenavsidebar.html +27 -6
  24. data/assets/ableplayer/.gitattributes +0 -0
  25. data/assets/ableplayer/.gitignore +3 -1
  26. data/assets/ableplayer/Gruntfile.js +3 -1
  27. data/assets/ableplayer/LICENSE +0 -0
  28. data/assets/ableplayer/README.md +214 -170
  29. data/assets/ableplayer/_config.yml +1 -0
  30. data/assets/ableplayer/build/ableplayer.dist.js +2637 -744
  31. data/assets/ableplayer/build/ableplayer.js +2637 -744
  32. data/assets/ableplayer/build/ableplayer.min.css +2 -2
  33. data/assets/ableplayer/build/ableplayer.min.js +9 -7
  34. data/assets/ableplayer/button-icons/able-icons.svg +0 -0
  35. data/assets/ableplayer/button-icons/black/rabbit.png +0 -0
  36. data/assets/ableplayer/button-icons/black/turtle.png +0 -0
  37. data/assets/ableplayer/button-icons/white/rabbit.png +0 -0
  38. data/assets/ableplayer/button-icons/white/turtle.png +0 -0
  39. data/assets/ableplayer/images/wingrip.png +0 -0
  40. data/assets/ableplayer/package-lock.json +705 -0
  41. data/assets/ableplayer/package.json +11 -2
  42. data/assets/ableplayer/scripts/JQuery.doWhen.js +0 -0
  43. data/assets/ableplayer/scripts/ableplayer-base.js +129 -29
  44. data/assets/ableplayer/scripts/browser.js +0 -0
  45. data/assets/ableplayer/scripts/buildplayer.js +342 -262
  46. data/assets/ableplayer/scripts/caption.js +19 -0
  47. data/assets/ableplayer/scripts/chapters.js +21 -0
  48. data/assets/ableplayer/scripts/control.js +139 -56
  49. data/assets/ableplayer/scripts/description.js +0 -0
  50. data/assets/ableplayer/scripts/dialog.js +13 -13
  51. data/assets/ableplayer/scripts/dragdrop.js +102 -109
  52. data/assets/ableplayer/scripts/event.js +186 -83
  53. data/assets/ableplayer/scripts/initialize.js +261 -71
  54. data/assets/ableplayer/scripts/langs.js +4 -0
  55. data/assets/ableplayer/scripts/metadata.js +0 -0
  56. data/assets/ableplayer/scripts/misc.js +76 -7
  57. data/assets/ableplayer/scripts/preference.js +2 -2
  58. data/assets/ableplayer/scripts/search.js +10 -7
  59. data/assets/ableplayer/scripts/sign.js +0 -0
  60. data/assets/ableplayer/scripts/slider.js +35 -34
  61. data/assets/ableplayer/scripts/track.js +38 -22
  62. data/assets/ableplayer/scripts/transcript.js +15 -6
  63. data/assets/ableplayer/scripts/translation.js +29 -20
  64. data/assets/ableplayer/scripts/ttml2webvtt.js +87 -0
  65. data/assets/ableplayer/scripts/volume.js +16 -15
  66. data/assets/ableplayer/scripts/vts.js +1093 -0
  67. data/assets/ableplayer/scripts/webvtt.js +0 -0
  68. data/assets/ableplayer/scripts/youtube.js +16 -5
  69. data/assets/ableplayer/styles/ableplayer.css +125 -22
  70. data/assets/ableplayer/thirdparty/js.cookie.js +0 -0
  71. data/assets/ableplayer/thirdparty/modernizr.custom.js +0 -0
  72. data/assets/ableplayer/translations/ca.js +311 -1
  73. data/assets/ableplayer/translations/de.js +1 -1
  74. data/assets/ableplayer/translations/en.js +6 -0
  75. data/assets/ableplayer/translations/es.js +6 -0
  76. data/assets/ableplayer/translations/fr.js +6 -0
  77. data/assets/ableplayer/translations/he.js +311 -0
  78. data/assets/ableplayer/translations/it.js +7 -1
  79. data/assets/ableplayer/translations/ja.js +6 -0
  80. data/assets/ableplayer/translations/nb.js +311 -0
  81. data/assets/ableplayer/translations/nl.js +6 -0
  82. data/assets/ableplayer/translations/zh-tw.js +311 -0
  83. data/assets/css/style.css +1 -1
  84. data/assets/css/style.css.map +1 -1
  85. data/assets/fonts/{anonymouspro-bold.woff → anonymouspro/anonymouspro-bold.woff} +0 -0
  86. data/assets/fonts/{anonymouspro-bold.woff2 → anonymouspro/anonymouspro-bold.woff2} +0 -0
  87. data/assets/fonts/{anonymouspro-bolditalic.woff → anonymouspro/anonymouspro-bolditalic.woff} +0 -0
  88. data/assets/fonts/{anonymouspro-bolditalic.woff2 → anonymouspro/anonymouspro-bolditalic.woff2} +0 -0
  89. data/assets/fonts/{anonymouspro-italic.woff → anonymouspro/anonymouspro-italic.woff} +0 -0
  90. data/assets/fonts/{anonymouspro-italic.woff2 → anonymouspro/anonymouspro-italic.woff2} +0 -0
  91. data/assets/fonts/{anonymouspro-regular.woff → anonymouspro/anonymouspro-regular.woff} +0 -0
  92. data/assets/fonts/{anonymouspro-regular.woff2 → anonymouspro/anonymouspro-regular.woff2} +0 -0
  93. data/assets/fonts/notonaskh/bold-minimal.woff +0 -0
  94. data/assets/fonts/notonaskh/bold-minimal.woff2 +0 -0
  95. data/assets/fonts/notonaskh/bold.woff +0 -0
  96. data/assets/fonts/notonaskh/bold.woff2 +0 -0
  97. data/assets/fonts/notonaskh/regular-minimal.woff +0 -0
  98. data/assets/fonts/notonaskh/regular-minimal.woff2 +0 -0
  99. data/assets/fonts/notonaskh/regular.woff +0 -0
  100. data/assets/fonts/notonaskh/regular.woff2 +0 -0
  101. data/assets/fonts/{notosans-bold-subset.woff → notosans/notosans-bold-subset.woff} +0 -0
  102. data/assets/fonts/{notosans-bold-subset.woff2 → notosans/notosans-bold-subset.woff2} +0 -0
  103. data/assets/fonts/{notosans-bold.woff → notosans/notosans-bold.woff} +0 -0
  104. data/assets/fonts/{notosans-bold.woff2 → notosans/notosans-bold.woff2} +0 -0
  105. data/assets/fonts/{notosans-bolditalic-subset.woff → notosans/notosans-bolditalic-subset.woff} +0 -0
  106. data/assets/fonts/{notosans-bolditalic-subset.woff2 → notosans/notosans-bolditalic-subset.woff2} +0 -0
  107. data/assets/fonts/{notosans-bolditalic.woff → notosans/notosans-bolditalic.woff} +0 -0
  108. data/assets/fonts/{notosans-bolditalic.woff2 → notosans/notosans-bolditalic.woff2} +0 -0
  109. data/assets/fonts/{notosans-italic-subset.woff → notosans/notosans-italic-subset.woff} +0 -0
  110. data/assets/fonts/{notosans-italic-subset.woff2 → notosans/notosans-italic-subset.woff2} +0 -0
  111. data/assets/fonts/{notosans-italic.woff → notosans/notosans-italic.woff} +0 -0
  112. data/assets/fonts/{notosans-italic.woff2 → notosans/notosans-italic.woff2} +0 -0
  113. data/assets/fonts/{notosans-regular-subset.woff → notosans/notosans-regular-subset.woff} +0 -0
  114. data/assets/fonts/{notosans-regular-subset.woff2 → notosans/notosans-regular-subset.woff2} +0 -0
  115. data/assets/fonts/{notosans-regular.woff → notosans/notosans-regular.woff} +0 -0
  116. data/assets/fonts/{notosans-regular.woff2 → notosans/notosans-regular.woff2} +0 -0
  117. data/assets/fonts/notosansmono/notosansmono-semicondensed.woff +0 -0
  118. data/assets/fonts/notosansmono/notosansmono-semicondensed.woff2 +0 -0
  119. data/assets/fonts/notosansmono/notosansmono-semicondensedbold.woff +0 -0
  120. data/assets/fonts/notosansmono/notosansmono-semicondensedbold.woff2 +0 -0
  121. data/assets/images/icons.svg +24 -0
  122. data/assets/scripts/main.js +10 -3
  123. metadata +66 -33
  124. data/_data/lang.json +0 -730
  125. data/_data/techniques.yml +0 -180
  126. data/_data/wcag.yml +0 -125
  127. data/_includes/.DS_Store +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 343aadce3fce603d00b3753e0daa9194fca79530cb5b1342686d0f2844ef6f47
4
- data.tar.gz: 9e2ec97fc02dd8dc87a20718af44a006d46469bb1b6acc7212c7f43385261bc3
3
+ metadata.gz: f5d6c9b666c105a8204fdf25caddda2cda783c72092c3608884e8ef68e1089d2
4
+ data.tar.gz: 728325f899dc25da7c85b235844650a43dee53dae339fea4ab8ff909d4d211c7
5
5
  SHA512:
6
- metadata.gz: a9378495845f5126c3eeea900864fc1eef02e0d0be8b8af766b6ac56688fde5a04c4deaa180894b9c61740443441a1a763a3c3230667c3b2a235f9009922c10b
7
- data.tar.gz: da7a7d2c5326d3e589769bd6b7e7faeebbf1f9317a658c85760f40b2c5e6fad21acce6f2f8132000850d1e2decdf9d7cf134a0df5586eefeb23696afa654ca1a
6
+ metadata.gz: 542172c938e59aea8ca7e01fee8e144539a30b277c5725e87a42629419bda20ce5ceee106a1d654ef56603cf1d3d9390df78aadd6876a0ad1d6b2d8c07981083
7
+ data.tar.gz: d56787541b933faaf1cbb4ef41da75dde904c8bea56011a5a63992e210aeab0e5389ae1436abc02f9d8a97dcabbaa2960908058662618887ff4d3abda14573e0
@@ -1 +1 @@
1
- <a class="button button-backtotop" href="#top"><span>{% include_cached icon.html name="arrow-up" %} Back to Top</span></a>
1
+ <a class="button button-backtotop" href="#top"><span>{% include_cached icon.html name="arrow-up" %} {% include t.html t="Back to Top" lang=include.lang %}</span></a>
@@ -3,7 +3,7 @@
3
3
  {%- endif -%}
4
4
  {%- if include.type == 'middle' -%}
5
5
  </summary>
6
- <div markdown="block">
6
+ <div markdown="block"{%-if include.dir %} dir="{{include.dir}}"{%- endif -%}{%-if include.lang %} lang="{{include.lang}}"{%- endif -%}>
7
7
  {%- endif -%}
8
8
  {%- if include.type == 'end' -%}
9
9
  </div>
@@ -1,11 +1,12 @@
1
1
  {%- if page.collection -%}{%- assign col = site.collections | where: "label", page.collection | first -%}{%- endif- %}
2
- {%- assign helptitle = "Help improve this page" -%}
2
+ {%- capture helptitle -%}{% include t.html t="Help improve this page" %}{%- endcapture -%}
3
3
  {%- if page.feedbackmail -%}
4
4
  {%- assign feedbackmail = page.feedbackmail -%}
5
5
  {%- else -%}
6
6
  {%- assign feedbackmail = "wai-eo-editors@w3.org" -%}
7
7
  {%- endif -%}
8
- {%- capture helpdesc -%}Please share your ideas, suggestions, or comments via e-mail to the publicly-archived list [{{feedbackmail}}](mailto:{{feedbackmail}}?subject=%s) or via GitHub.{%- endcapture -%}
8
+ {% assign reppattern = "$1|" | append: feedbackmail%}
9
+ {%- capture helpdesc -%}{% include t.html t="Please share your ideas, suggestions, or comments via e-mail to the publicly-archived list [$1](mailto:$1?subject=%s) or via GitHub." replace=reppattern %}{%- endcapture -%}
9
10
 
10
11
  {%- unless page.github.hide -%}
11
12
  {%- if page.github.repository -%}{%- assign repo = page.github.repository -%}{%endif%}
@@ -42,21 +43,23 @@
42
43
  {%- endif- %}
43
44
 
44
45
  {%- include box.html type="start" title=helptitle h=2 class="icon space-above" icon="comments" id="helpimprove" -%}
45
- {%- assign url_title = page.title | uri_escape -%}
46
+ {%- if page.lang -%}
47
+ {%- assign url_title = "[" | append: page.lang | append: "] " | append: page.title | uri_escape -%}
48
+ {%- else -%}
49
+ {%- assign url_title = page.title | uri_escape -%}
50
+ {%- endif -%}
46
51
  {% unless feedbackmail == "wai@w3.org" %}
47
- {%- capture mailbody -%}[put comment here...]{%- endcapture -%}
52
+ {%- capture mailbody -%}{% include t.html t="[put comment here...]" %}{%- endcapture -%}
48
53
  {% else %}
49
- {%- capture mailbody -%}[put comment here...]
50
-
51
- I give permission to share this to a publicly-archived e-mail list.{%- endcapture -%}
54
+ {%- capture mailbody -%}{% include t.html t="[put comment here...]\n\nI give permission to share this to a publicly-archived e-mail list." %}"}{%- endcapture -%}
52
55
  {% endunless %}
53
56
  {%- assign mailbody = mailbody | uri_escape -%}
54
57
  {{- helpdesc | replace: "%s", url_title | markdownify -}}
55
58
  <div class="button-group">
56
- <a href="{{ "mailto:" | append: feedbackmail | append: "?subject=%s" | replace: "%s", url_title | append: "&body=" | append: mailbody }}" class="button"><span>E-mail</span></a>
57
- <a href="https://github.com/{{repo}}/edit/{{branch}}/{{path}}" class="button"><span>Fork &amp; Edit on GitHub</span></a>
59
+ <a href="{{ "mailto:" | append: feedbackmail | append: "?subject=%s" | replace: "%s", url_title | append: "&body=" | append: mailbody }}" class="button"><span>{% include t.html t="E-mail" %}</span></a>
60
+ <a href="https://github.com/{{repo}}/edit/{{branch}}/{{path}}" class="button"><span>{% include t.html t="Fork &amp; Edit on GitHub" %}</span></a>
58
61
  {%- comment -%}<a href="https://github.com/{{repo}}/issues" class="button"><span>List of GitHub Issues</span></a>{%- endcomment -%}
59
- <a href="https://github.com/{{repo}}/issues/new" class="button"><span>New GitHub Issue</span></a>
62
+ <a href="https://github.com/{{repo}}/issues/new{%- unless page.lang == 'en' -%}?title={{ "[" | append: page.lang | append: "] " | uri_escape }}{%- endunless -%}" class="button"><span>{% include t.html t="New GitHub Issue" %}</span></a>
60
63
  </div>
61
64
  {%- include box.html type="end" -%}
62
65
  {%- endunless -%}
@@ -1,15 +1,28 @@
1
1
  {%- assign col = site.collections | where: "label", page.collection | first -%}
2
+ {%- if page.changelog -%}
3
+ {%- assign chagelogpage=site.documents | where:"ref", page.changelog | first -%}
4
+ {%- unless changelogpage.ref -%}
5
+ {%- assign changelogpage=site.pages | where:"ref", page.changelog | first -%}
6
+ {%- endunless -%}
7
+ {% assign changelogpageurl = changelogpage.url | relative_url %}
8
+ {%- capture changelogtext -%}
9
+ {%- include_cached t.html t="Changelog" lang=page.lang -%}
10
+ {%- endcapture -%}
11
+ {%- assign changelog = '<a href="' | append: changelogpageurl | append: '">' | append: changelogtext | append: '</a>' -%}
12
+ {%- else -%}
13
+ {%- assign changelog = "" -%}
14
+ {%- endif -%}
2
15
  {% if col.footer %}
3
16
  <footer class="page-footer default-grid" aria-label="Page">
4
17
  <div class="inner">
5
- {{col.footer}}
18
+ {{col.footer | replace: "CHANGELOG", changelog }}
6
19
  </div>
7
20
  </footer>
8
21
  {% else %}
9
22
  {% if page.footer %}
10
23
  <footer class="page-footer default-grid" aria-label="Page">
11
24
  <div class="inner">
12
- {{page.footer}}
25
+ {{page.footer | replace: "CHANGELOG", changelog}}
13
26
  </div>
14
27
  </footer>
15
28
  {% endif %}
@@ -18,20 +31,21 @@
18
31
  <footer class="site-footer grid-4q" aria-label="Site">
19
32
  <div class="q1-start q3-end about">
20
33
  <div>
21
- <p><a class="largelink" href="https://w3.org/WAI/">W3C Web Accessibility Initiative (WAI)</a></p>
22
- <p>Strategies, standards, and supporting resources to make the Web accessible to people with disabilities.</p>
34
+ <p><a class="largelink" href="https://w3.org/WAI/" lang="en" dir="auto" translate="no">W3C Web Accessibility Initiative (WAI)</a></p>
35
+ <p>{% include t.html t="Strategies, standards, and supporting resources to make the Web accessible to people with disabilities." %}</p>
23
36
  </div>
24
- <div>
37
+ <div lang="en" dir="auto" {% if site.data.lang[pagelang].rtl %}style="text-align: right;"{% endif %} translate="no">
25
38
  <p>Copyright &#xA9; {{ 'now' | date: "%Y" }} W3C <sup>&#xAE;</sup> (<a href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="http://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="http://www.keio.ac.jp/">Keio</a>, <a href="http://ev.buaa.edu.cn/">Beihang</a>) <a href="{{ "/about/using-wai-material/" | relative_url }}">Permission to Use WAI Material</a>.</p>
26
39
  </div>
27
40
  </div>
28
41
  <div class="q4-start q4-end">
29
- <ul>
42
+ <ul style="margin-bottom:0">
30
43
  <li><a href="{{ "/about/contacting/" | relative_url }}">Contact WAI</a></li>
31
44
  <li><a href="{{ "/sitemap/" | relative_url }}">Site Map</a></li>
32
45
  <li><a href="{{ "/news/" | relative_url }}">News</a></li>
33
46
  <li><a href="{{ "/sitemap/#archive" | relative_url }}">Archive</a></li>
34
47
  <li><a href="{{ "/about/accessibility-statement/" | relative_url }}">Accessibility Statement</a></li>
48
+ <li><a href="{{ "/translations/" | relative_url }}"> Translations</a></li>
35
49
  <li><a href="{{ "/roles/" | relative_url }}">Resources for Roles</a></li>
36
50
  </ul>
37
51
  </div>
@@ -3,29 +3,58 @@ The first section creates an array of page urls that are page urls of this colle
3
3
  {%- endcomment -%}
4
4
  {%- assign col = site.collections | where: "label", page.collection | first -%}
5
5
  {%- unless site.published == true -%}
6
- <section class="default-grid info" tabindex="0">
7
- <p class="inner">{% if site.warning_icon %}{% include_cached icon.html name="info" %} {% endif %}{% if site.warning_message %}{{site.warning_message}}{% else %}This is an unpublished draft preview that might include content that is not yet approved. The published website is at <a href="https://www.w3.org/WAI/">w3.org/WAI/</a>.{% endif %}
6
+ <section class="default-grid info" tabindex="0" lang="en">
7
+ <p class="inner" style="margin: 0;padding: 1em 0;">{% if site.warning_icon %}{% include_cached icon.html name="info" %} {% endif %}{% if site.warning_message %}{{site.warning_message}}{% else %}This is an unpublished draft preview that might include content that is not yet approved. The published website is at <a href="https://www.w3.org/WAI/">w3.org/WAI/</a>.{% endif %}
8
8
  </p>
9
9
  </section>
10
10
  {%- endunless -%}
11
- <nav aria-label="Skip Link and Accessibility Options" id="controls" class="default-grid">
12
- <ul>
13
- <li><a href="#main">Skip to Content</a></li>
14
- <li><a href="{{ "/meta/customize/" | relative_url }}">Change Text Size or Colors</a></li>
15
- </ul>
11
+ <nav aria-label="Skip Link, Customization, and Language Selector" id="controls" class="default-grid">
12
+ {% if include.translations[0].ref %}
13
+ {%- comment -%} Translations on this page {%- endcomment-%}
14
+ <ul>
15
+ <li><a href="#main">{% include_cached t.html t="Skip to Content" lang=pagelang %}</a></li>
16
+ <li class="opt"><a href="{{ "/meta/customize/" | relative_url }}">{% include_cached t.html t="Change Text Size or Colors" lang=pagelang %}</a></li>
17
+ <li class="opt languagelist">
18
+ <strong>{% include_cached t.html t="This&nbsp;page&nbsp;in:" lang=pagelang %}</strong>
19
+ <ul class="languagelistul">
20
+ {%- for p in include.translations %}
21
+ {%- if forloop.first -%}
22
+ <li>{% if 'en' == pagelang %}<strong style="text-transform: capitalize;">{{ site.data.lang['en'].nativeName }}</strong>{% else %}<a style="text-transform: capitalize;" href="{{ englishpageurl | relative_url }}" lang="en" dir="auto" translate="no">{{ site.data.lang['en'].nativeName }}</a>{% endif %}</li>
23
+ {%- endif -%}
24
+ <li>{% if p.lang == pagelang %}<strong style="text-transform: capitalize;">{{ site.data.lang[p.lang].nativeName }}</strong>{% else %}<a style="text-transform: capitalize;" href="{{ p.url | relative_url }}" lang="{{ p.lang }}" dir="auto" translate="no">{{ site.data.lang[p.lang].nativeName }}</a>{% endif %}</li>
25
+ {% endfor -%}
26
+ </ul>
27
+ </li>
28
+ <li class="opt">
29
+ <a href="{{ "/translations/" | relative_url }}">{% include_cached t.html t="All&nbsp;Translations" lang=pagelang %} {% include_cached icon.html name="translations" %}</a>
30
+ </li>
31
+ <li><button id="showoptions" data-showhidebuttonid="header-showoptions" class="showhidebutton button-inline" data-target="#controls .opt" aria-expanded="false" data-large-aria-expanded="true" data-showtext='{% include_cached icon.html name="languages" %} {% include_cached t.html t="Show Customization, Languages, Translations" lang=pagelang %}' data-hidetext='{% include_cached t.html t="Hide Options" lang=pagelang %}'>{% include_cached icon.html name="languages" %} {% include_cached t.html t="Show Customization, Languages, Translations" lang=pagelang %}</button></li>
32
+ </ul>
33
+ {% else %}
34
+ {%- comment -%} No Translations on this page {%- endcomment-%}
35
+ <ul>
36
+ <li><a href="#main">{% include_cached t.html t="Skip to Content" lang=pagelang %}</a></li>
37
+ <li class="opt">
38
+ <a href="{{ "/meta/customize/" | relative_url }}">{% include_cached t.html t="Change Text Size or Colors" lang=pagelang %}</a>
39
+ </li>
40
+ <li class="opt">
41
+ <a href="{{ "/translations/" |relative_url }}">{% include_cached t.html t="All Translations" lang=pagelang %} {% include_cached icon.html name="translations" %}</a>
42
+ </li>
43
+ </ul>
44
+ {%- endif -%}
16
45
  </nav>
17
46
  <header id="site-header" class="default-grid with-gap">
18
47
  <div class="logos">
19
- <a class="home w3c" href="{{ "https://www.w3.org/" | relative_url }}">
48
+ <a lang="en" class="home w3c" href="{{ "https://www.w3.org/" | relative_url }}">
20
49
  <svg role="img" aria-label="W3C" viewBox="0 0 68 34" xmlns="http://www.w3.org/2000/svg"><g><path d="m16.117 1.006 5.759 19.58 5.759-19.58h4.17 11.444v1.946l-5.879 10.128c2.065.663 3.627 1.868 4.686 3.615 1.059 1.748 1.589 3.799 1.589 6.155 0 2.914-.775 5.363-2.324 7.348s-3.555 2.978-6.017 2.978c-1.854 0-3.469-.589-4.845-1.767-1.377-1.178-2.396-2.773-3.058-4.786l3.256-1.35c.477 1.218 1.106 2.178 1.887 2.879.781.702 1.701 1.052 2.76 1.052 1.112 0 2.052-.622 2.82-1.866.768-1.245 1.152-2.74 1.152-4.489 0-1.933-.411-3.429-1.231-4.488-.954-1.244-2.45-1.867-4.489-1.867h-1.588v-1.906l5.56-9.612h-6.712l-.382.65-8.163 27.548h-.397l-5.958-19.937-5.957 19.937h-.397l-9.53-32.168h4.17l5.759 19.58 3.892-13.185-1.906-6.395z"/><path d="m64.92 1.006c-.819 0-1.554.295-2.111.861-.591.6-.92 1.376-.92 2.178s.313 1.545.887 2.128c.583.591 1.334.912 2.145.912.793 0 1.562-.321 2.161-.903.574-.557.887-1.3.887-2.136 0-.811-.321-1.57-.878-2.136-.584-.592-1.344-.904-2.171-.904zm2.643 3.065c0 .701-.271 1.351-.768 1.832-.524.507-1.174.777-1.892.777-.675 0-1.342-.278-1.84-.785s-.777-1.157-.777-1.849.287-1.368.802-1.891c.481-.49 1.131-.751 1.84-.751.726 0 1.376.271 1.883.785.49.489.752 1.147.752 1.882zm-2.559-1.807h-1.3v3.445h.65v-1.469h.642l.701 1.469h.726l-.769-1.57c.498-.102.785-.439.785-.929 0-.625-.472-.946-1.435-.946zm-.118.422c.608 0 .886.169.886.591 0 .405-.278.549-.87.549h-.549v-1.14z"/><path d="m59.807.825.676 4.107-2.391 4.575s-.918-1.941-2.443-3.015c-1.285-.905-2.122-1.102-3.431-.832-1.681.347-3.587 2.357-4.419 4.835-.995 2.965-1.005 4.4-1.04 5.718-.056 2.113.277 3.362.277 3.362s-1.452-2.686-1.438-6.62c.009-2.808.451-5.354 1.75-7.867 1.143-2.209 2.842-3.535 4.35-3.691 1.559-.161 2.791.59 3.743 1.403 1 .854 2.01 2.721 2.01 2.721z"/><path d="m60.102 24.063s-1.057 1.889-1.715 2.617c-.659.728-1.837 2.01-3.292 2.651s-2.218.762-3.656.624c-1.437-.138-2.772-.97-3.24-1.317s-1.664-1.369-2.34-2.322-1.733-2.859-1.733-2.859.589 1.91.958 2.721c.212.467.864 1.894 1.789 3.136.863 1.159 2.539 3.154 5.086 3.604 2.547.451 4.297-.693 4.73-.97s1.346-1.042 1.924-1.66c.603-.645 1.174-1.468 1.49-1.962.231-.36.607-1.092.607-1.092z"/></g></svg>
21
50
  </a>
22
- <a class="home" href="{{ "/" | relative_url }}">
51
+ <a lang="en" class="home" href="{{ "/" | relative_url }}">
23
52
  <span class="wai"><span class="wa">Web&nbsp;Accessibility</span> <span class="i"><span class="initieative">Initiative</span> <span>WAI</span></span></span>
24
53
  </a>
25
54
  <div class="claim">
26
- <span>Strategies, standards, resources to make the Web accessible to people with disabilities</span>
55
+ <span>{% include_cached t.html t="Strategies, standards, resources to make the Web accessible to people with disabilities" lang=pagelang %}</span>
27
56
  </div>
28
- <button class="button button-menu" aria-haspopup="true" aria-expanded="false" id="openmenu"><span>{% include_cached icon.html name="menu" %} Menu</span></button>
57
+ <button class="button button-menu" aria-haspopup="true" aria-expanded="false" id="openmenu"><span>{% include_cached icon.html name="menu" %} {% include_cached t.html t="Menu" lang=pagelang %}</span></button>
29
58
  </div>
30
59
 
31
60
  <div class="navigations">
@@ -37,10 +66,11 @@ The first section creates an array of page urls that are page urls of this colle
37
66
  <form action="{{ "/search/" | relative_url }}" role="search">
38
67
  <div>
39
68
  <label for="header-search">
40
- <span class="visuallyhidden">Search:</span>
41
- <input id="header-search" type="search" name="q" placeholder="Search" aria-label="search">
69
+ <span class="visuallyhidden">{% include_cached t.html t="Search" lang=pagelang %}:</span>
70
+ <input id="header-search" type="search" name="q" placeholder="{% include_cached t.html t="Search" lang=pagelang %}" aria-label="{% include_cached t.html t="Search" lang=pagelang %}">
42
71
  </label>
43
- <button class="button button-icon button-nobg button-noborder"><span>{% include_cached icon.html name="search" label="Submit Search" %}</span></button>
72
+ {%capture submitsearch%}{% include_cached t.html t="Submit Search" lang=pagelang %}{%endcapture%}
73
+ <button class="button button-icon button-nobg button-noborder"><span>{% include_cached icon.html name="search" label=submitsearch %}</span></button>
44
74
  </div>
45
75
  </form>
46
76
  </li>
@@ -48,27 +78,35 @@ The first section creates an array of page urls that are page urls of this colle
48
78
  </nav>
49
79
  </div>
50
80
  </header>
51
- {%- if page.parent == '/' -%}{%- assign parent_is_home = true -%}{% endif %}
52
- {%- if col.parent == '/' -%}{%- assign parent_is_home = true -%}{% endif %}
53
- {%- if col.parent == '/news/' -%}{%- assign parent_is_home = true -%}{% endif %}
81
+ {%- if page.parent == '/' -%}{%- assign parent_is_home = true -%}{%- endif -%}
82
+ {%- if col.parent == '/' -%}{%- assign parent_is_home = true -%}{%- endif -%}
83
+ {%- if col.parent == '/news/' -%}{%- assign parent_is_home = true -%}{%- endif -%}
54
84
  {%- if parent_is_home -%}
55
- {%- assign a_name = "" -%}
56
- {%- assign a_url = "" -%}
57
- {%- assign b_name = "" -%}
58
- {%- assign b_url = "" -%}
59
- {%- assign c_name = "" -%}
60
- {%- assign c_url = "" -%}
61
- {%- assign d_name = "" -%}
62
- {%- assign d_url = "" -%}
85
+ {%- assign a_name = "" -%}
86
+ {%- assign a_url = "" -%}
87
+ {%- assign b_name = "" -%}
88
+ {%- assign b_url = "" -%}
89
+ {%- assign c_name = "" -%}
90
+ {%- assign c_url = "" -%}
91
+ {%- assign d_name = "" -%}
92
+ {%- assign d_url = "" -%}
63
93
  {% else %}
64
94
  {%- if col.parent -%}
65
95
  {%- assign searchurl = col.parent -%}
66
96
  {%- else -%}
67
- {%- if page.parent -%}
97
+ {%- if page.parent == "/" -%}
68
98
  {%- assign searchurl = page.parent -%}
99
+ {%- else -%}
100
+ {%- if (page.ref and pagelang) -%}
101
+ {%- if pagelang != "en" -%}
102
+ {%- assign searchurl = enpage.url -%}
103
+ {%- else -%}
104
+ {%- assign searchurl = page.url -%}
105
+ {%- endif -%}
69
106
  {%- else -%}
70
107
  {%- assign searchurl = page.url -%}
71
108
  {%- endif -%}
109
+ {%- endif -%}
72
110
  {%- endif -%}
73
111
  {%- assign search = true -%}
74
112
  {%- for n in site.data.navigation -%}
@@ -119,19 +157,19 @@ The first section creates an array of page urls that are page urls of this colle
119
157
  {%- endfor -%}
120
158
  {%- endif -%}
121
159
 
122
- <nav class="mainnav" aria-label="Main">
160
+ <nav class="mainnav" aria-label="Main" lang="en">
123
161
  {%- if page.url == "/" %}{% assign a_url = "" %}{% endif -%}
124
- {%- include navlist.html data=site.data.navigation current=a_url -%}
162
+ {%- include_cached navlist.html data=site.data.navigation current=a_url -%}
125
163
  </nav>
126
164
 
127
165
  {%- unless page.url == "/" -%}
128
- <nav class="breadcrumb default-grid" aria-label="Breadcrumb">
129
- <ul class="default-container">
130
- <li><a href="{{ "/" | relative_url }}">Home</a></li>
131
- {%- unless a_name == "" -%}<li><a href="{{ a_url | relative_url }}"{% if a_url == page.url%} aria-current="page"{%endif%}>{{a_name}}</a></li>{%- endunless -%}
132
- {%- unless b_name == "" -%}<li><a href="{{ b_url | relative_url }}"{% if b_url == page.url%} aria-current="page"{%endif%}>{{b_name}}</a></li>{%- endunless -%}
133
- {%- unless c_name == "" -%}<li><a href="{{ c_url | relative_url }}"{% if c_url == page.url%} aria-current="page"{%endif%}>{{c_name}}</a></li>{%- endunless -%}
134
- {%- unless d_name == "" -%}<li><a href="{{ d_url | relative_url }}"{% if d_url == page.url%} aria-current="page"{%endif%}>{{d_name}}</a></li>{%- endunless -%}
166
+ <nav{% comment %} style="grid-column: 2/8; display: flex;"{% endcomment %} class="default-grid breadcrumb" aria-label="Breadcrumb" lang="en">
167
+ <ul style="align-self: center;">
168
+ <li><a href="{{ "/" | relative_url }}" lang="en">Home{%comment%}{% include_cached t.html t="Home" lang=pagelang %}{%endcomment%}</a></li>
169
+ {%- unless a_name == "" -%}<li>{% if a_url == enpage.url%}{% include_cached link.html to=a_url text=a_name aria-current="page" lang=page.lang hidelangnotice=true %}{% else %}{% include_cached link.html text=a_name to=a_url lang=page.lang hidelangnotice=true %}{% endif %}</li>{%- endunless -%}
170
+ {%- unless b_name == "" -%}<li>{% if b_url == enpage.url%}{% include_cached link.html text=b_name to=b_url aria-current="page" lang=page.lang hidelangnotice=true %}{% else %}{% include_cached link.html text=b_name to=b_url lang=page.lang hidelangnotice=true %}{% endif %}</li>{%- endunless -%}
171
+ {%- unless c_name == "" -%}<li>{% if c_url == enpage.url%}{% include_cached link.html text=c_name to=c_url aria-current="page" lang=page.lang hidelangnotice=true %}{% else %}{% include_cached link.html text=c_name to=c_url lang=page.lang hidelangnotice=true %}{% endif %}</li>{%- endunless -%}
172
+ {%- unless d_name == "" -%}<li>{% if d_url == enpage.url%}{% include_cached link.html text=d_name to=d_url aria-current="page" lang=page.lang hidelangnotice=true %}{% else %}{% include_cached link.html text=d_name to=d_url lang=page.lang hidelangnotice=true %}{% endif %}</li>{%- endunless -%}
135
173
  {%- if col.parent == '/news/' -%}<li><a href="{{ '/news/' | relative_url }}">News</a></li>{%- endif -%}
136
174
  {%- if page.parent == "/"-%}<li><a href="{{ page.url | relative_url }}" aria-current="page">{{page.title}}</a></li>{%- endif -%}
137
175
  {%- if col.parent -%}
@@ -0,0 +1,6 @@
1
+ {%- comment -%}
2
+ inpl.html IN Page Language
3
+
4
+ takes a language array and outputs the value for the language of the current page
5
+ {%- endcomment -%}
6
+ {%- if include.a[include.lang] -%}{{include.a[include.lang]}}{%- else -%}{{include.a.en}}{%- endif -%}
@@ -0,0 +1,7 @@
1
+ {% if include.type == 'start' %}
2
+ <div lang="{{include.lang}}" markdown>
3
+ {% endif %}
4
+ {% if include.type == 'end' %}
5
+ </div>
6
+ </aside>
7
+ {% endif %}
@@ -0,0 +1,92 @@
1
+ {%- comment -%}
2
+
3
+ NEVER use inclue_cached with this.
4
+
5
+ Always use
6
+ {%include link.html to="/path/to/page/" text="Link Text" %}
7
+ Or
8
+ {%include link.html to="/path/to/page/" fallback="English Link Text" %}
9
+
10
+ The page title of the linked page is used unless a link text is specified. Fallback is displayed if the page cannot be found in that language.
11
+ {%- endcomment -%}
12
+ {%- assign pagelang = 'en' -%}
13
+ {%- if page.lang -%}
14
+ {%- assign pagelang = page.lang -%}
15
+ {%- endif -%}
16
+ {%- if include.lang -%}
17
+ {%- assign pagelang = include.lang -%}
18
+ {%- endif -%}
19
+ {%- assign in_lang = true -%}
20
+ {%- assign link_page=site.documents | where:"ref", include.to | where: "lang", pagelang | first -%}
21
+ {%- unless link_page.url -%}
22
+ {%- assign link_page=site.pages | where:"ref", include.to | where: "lang", pagelang | first -%}
23
+ {%- endunless -%}
24
+ {%- unless link_page.url -%}
25
+ {%- assign in_lang = false -%}
26
+ {%- assign link_page=site.documents | where:"url", include.to | first -%}
27
+ {%- endunless -%}
28
+ {%- unless link_page.url -%}
29
+ {%- assign in_lang = false -%}
30
+ {%- assign link_page=site.pages | where:"url", include.to | first -%}
31
+ {%- endunless -%}
32
+ {%- if pagelang == 'en' %}{%- assign in_lang = true -%}{% endif -%}
33
+
34
+ {%- assign link_text = "" -%}
35
+ {%- if include.text -%}
36
+ {%- if include.text.en -%}
37
+ {%- if include.text[pagelang] -%}
38
+ {%- assign link_text = include.text[pagelang] -%}
39
+ {%- else -%}
40
+ {%- assign link_text = include.text.en -%}
41
+ {%- endif -%}
42
+ {%- else -%}
43
+ {%- assign link_text = include.text -%}
44
+ {%- endif -%}
45
+ {% else %}
46
+ {%- if include.usenavtitle -%}
47
+ {%- if link_page.nav_title -%}
48
+ {%- assign link_text = link_page.nav_title -%}
49
+ {%- else -%}
50
+ {%- assign link_text = link_page.title -%}
51
+ {% endif %}
52
+ {%- else -%}
53
+ {%- assign link_text = link_page.title -%}
54
+ {%- endif -%}
55
+ {%- endif -%}
56
+
57
+ {%- unless link_text -%}
58
+ {%- if include.fallback -%}
59
+ {%- assign link_text = include.fallback -%}
60
+ {%- else -%}
61
+ {%- assign link_text = '[page not found in this repository, no fallback text given]' -%}
62
+ {%- endif -%}
63
+ {%- endunless -%}
64
+
65
+ {%- assign linklang = 'en' -%}
66
+ {%- if link_page.lang -%}
67
+ {%- assign linklang = link_page.lang -%}
68
+ {%- endif -%}
69
+
70
+ {%- assign protocol = include.to | split: "://" -%}
71
+ {%- if protocol[0] == "" -%}
72
+ {%- assign linkurl = 'https://www.w3.org/WAI' | append: include.to -%}
73
+ {%- else -%}
74
+ {%- assign linkurl = include.to -%}
75
+ {%- endif -%}
76
+
77
+ {%- if link_page.url -%}
78
+ {%- assign linkurl = link_page.url | relative_url -%}
79
+ {%- endif -%}
80
+
81
+ {%- if include.id -%}
82
+ {%- assign linkurl = linkurl | append:'#' | append: include.id -%}
83
+ {%- endif -%}
84
+
85
+ {%- if include.fallback -%}
86
+ {%- unless in_lang -%}
87
+ {%- assign linklang = pagelang -%}
88
+ {%- assign link_text = include.fallback -%}
89
+ {%- endunless -%}
90
+ {%- endif -%}
91
+
92
+ <a lang="{{linklang}}" href="{{linkurl}}"{% if include.aria-current %} aria-current="{{include.aria-current}}"{% endif %}{% if include.class %} class="{{include.class}}"{% endif %}><span>{{ link_text }}{%- unless in_lang %}{% unless include.hidelangnotice %} <span class="lang" lang="{{pagelang}}" dir="auto" translate="no">({% include_cached t.html t="in English" lang=pagelang %})</span>{% endunless -%}{% endunless -%}{% if include.different %} {% include_cached different.html %}{% endif %}{% if include.external %} {% include_cached external.html %}{% endif %}</span></a>
@@ -1,13 +1,15 @@
1
+ {%- if include.current %}{% assign aria="page" %}{% else %}{% if include.insub%}{% assign aria="location" %}{% endif %}{% endif -%}
1
2
  {%- unless include.hide -%}
2
3
  <li>
3
- <a class="page-link" {% if include.current %} aria-current="page" {% else %}{% if include.insub%} aria-current="location" {% endif %}{% endif %} href="{{ include.url | relative_url }}"><span>{% comment %}{% if include.url == searchurl %}{% include_cached icon.html name="chevron-right" %} {% endif %}{% endcomment %}{{include.name}}{% if include.different == true %} {% include_cached icon.html name="different-view" label="Different Layout" %}{% endif %}</span></a>
4
+ {% include_cached link.html to=include.url text=include.name aria-current=aria different=include.different external=include.external class="page-link" usenavtitle=true lang=page.lang hidelangnotice=true %}
4
5
  {{include.submenu}}
5
6
  </li>
6
7
  {%- else -%}
7
8
  {%- if include.current == true -%}
8
9
  <li>
9
- <a class="page-link" {% if include.current %} aria-current="page" {% else %}{% if include.insub%} aria-current="location" {% endif %}{% endif %} href="{{ include.url | relative_url }}"><span>{% comment %}{% if include.url == searchurl %}{% include_cached icon.html name="chevron-right" %} {% endif %}{% endcomment %}{{include.name}}{% if include.different == true %} {% include_cached icon.html name="different-view" label="Different Layout" %}{% endif %}</span></a>
10
+ {% include_cached link.html to=include.url text=include.name aria-current=aria different=include.different external=include.external class="page-link" usenavtitle=true lang=page.lang hidelangnotice=true %}
10
11
  {{include.submenu}}
11
12
  </li>
12
13
  {%- endif -%}
13
- {%- endunless -%}
14
+ {%- endunless -%}
15
+ {% assign aria=false %}
@@ -20,7 +20,7 @@
20
20
  {% unless lng == "en" %}
21
21
  (<span lang="{{lng}}">{{site.data.lang[lng].nativeName}}</span>)
22
22
  {% endunless %}
23
- {% if include.external %}{% include_cached icon.html name="external-link" label="External Site" %}{% endif %} </a>
23
+ {% if include.external %}{% include external.html %}{% endif %} </a>
24
24
  </li>
25
25
 
26
26
  {% endif %}
@@ -3,7 +3,7 @@
3
3
  {%- assign the_url = item.pages.first.url -%}
4
4
  {%- unless item.mainnav == false -%}
5
5
  <li>
6
- <a href="{{ the_url | relative_url }}"{% if include.current == the_url %} aria-current="location"{% endif %}><span>{{item.name}}</span></a>
6
+ <a href="{{ the_url | relative_url }}"{% if include.current == the_url %} aria-current="location"{% endif %}><span>{% include_cached inpl.html lang=page.lang a=item.name %}</span></a>
7
7
  </li>
8
8
  {%- endunless -%}
9
9
  {%- if forloop.last %}</ul>{% endif -%}
@@ -1,10 +1,11 @@
1
+ {%- if page.lang -%}{%- assign lang = page.lang -%}{%- else -%}{%- assign lang = "en" -%}{%- endif -%}
1
2
  {%- if page.order -%}
2
3
  {%- assign col = site.collections | where: "label", page.collection | first -%}
3
4
  {%- unless col.prevnext == false -%}
4
5
  {%- if page.group -%}
5
- {%- assign docs = col.docs | where: "group", page.group -%}
6
+ {%- assign docs = col.docs | where: "group", page.group | where: "lang", lang -%}
6
7
  {%- else -%}
7
- {%- assign docs = col.docs -%}
8
+ {%- assign docs = col.docs | where: "lang", lang -%}
8
9
  {%- endif -%}
9
10
  <nav class="pager" aria-label="Previous/Next Page">
10
11
  <ul>
@@ -13,7 +14,7 @@
13
14
  <a href="{{p.url | relative_url }}">
14
15
  {% include_cached icon.html name="arrow-left" class="pager--item-icon" %}
15
16
  <span class="pager--item-text">
16
- <span class="pager--item-text-direction">Previous:</span>
17
+ <span class="pager--item-text-direction">{% include t.html t="Previous" %}:</span>
17
18
  <span class="pager--item-text-target">{% if p.nav_title %}{{p.nav_title}}{% else %}{{p.title}}{% endif %}</span>
18
19
  </span>
19
20
  </a>
@@ -24,7 +25,7 @@
24
25
  <a href="{{p.url | relative_url }}">
25
26
  {% include_cached icon.html name="arrow-right" class="pager--item-icon" %}
26
27
  <span class="pager--item-text">
27
- <span class="pager--item-text-direction">Next:</span>
28
+ <span class="pager--item-text-direction">{% include t.html t="Next" %}:</span>
28
29
  <span class="pager--item-text-target">{% if p.nav_title %}{{p.nav_title}}{% else %}{{p.title}}{% endif %}</span>
29
30
  </span>
30
31
  </a>