From 773be66ad250245f35c8f15719313a67a2630e64 Mon Sep 17 00:00:00 2001
From: tuxmain <tuxmain@zettascript.org>
Date: Mon, 19 Sep 2022 17:44:20 +0200
Subject: [PATCH] [contributeurs] a11y, Mastodon, Matrix

---
 content/contributeurs/tuxmain.md |  2 +
 sass/_duniter.sass               |  6 ++-
 templates/authors/content.html   | 92 ++++++++++++++++++++++++++++----
 3 files changed, 90 insertions(+), 10 deletions(-)

diff --git a/content/contributeurs/tuxmain.md b/content/contributeurs/tuxmain.md
index 357a352..860cbd1 100644
--- a/content/contributeurs/tuxmain.md
+++ b/content/contributeurs/tuxmain.md
@@ -11,6 +11,8 @@ forum_ml = "tuxmain"
 g1_pubkey = "45GfjkWCWQhJ3epJVGC2NSg1Rcu4Ue1vDD3kk9eLs5TQ"
 g1_map = true
 gitduniter = "tuxmain"
+mastodon = "https://toot.aquilenet.fr/web/@tuxmain"
+matrix = "@tuxmain:matrix.txmn.tk"
 
 [taxonomies]
 authors = ["tuxmain",]
diff --git a/sass/_duniter.sass b/sass/_duniter.sass
index f5e69ef..4927d2c 100644
--- a/sass/_duniter.sass
+++ b/sass/_duniter.sass
@@ -147,4 +147,8 @@ input.search_input
     color: gray
 
 .authors .author, .date
-    color: gray
\ No newline at end of file
+    color: gray
+
+.sr-only
+    /* Without this, screen-reader reads each word in a separate line */
+    width: initial !important
\ No newline at end of file
diff --git a/templates/authors/content.html b/templates/authors/content.html
index b98736f..145be03 100644
--- a/templates/authors/content.html
+++ b/templates/authors/content.html
@@ -4,23 +4,97 @@
 {% if page.extra.avatar %}<img class="avatar" src="/equipe/{{ page.extra.avatar }}"/>{% endif %}
 <ul>
     {% if page.extra.website %}
-        <li><a target="_blank" href="{{ page.extra.website }}"/><i class="fa fa-globe-e"></i> {{ page.extra.website }}</a></li>{% endif %}
+        <li>
+            <a target="_blank" href="{{ page.extra.website }}" title="Site perso">
+                <i class="fa fa-globe-e" aria-hidden="true"></i>
+                <span class="sr-only">Site perso&nbsp;:</span>
+                {{ page.extra.website }}
+            </a>
+        </li>
+    {% endif %}
     {% if page.extra.gitduniter %}
-        <li><a href="https://git.duniter.org/{{ page.extra.gitduniter }}"><img class="icon" src="/img/duniter_gitlab_small.png"/> GitLab Duniter</a></li>{% endif %}
+        <li>
+            <a href="https://git.duniter.org/{{ page.extra.gitduniter }}">
+                <img class="icon" src="/img/duniter_gitlab_small.png" aria-hidden="true"/>
+                GitLab Duniter
+            </a>
+        </li>
+    {% endif %}
     {% if page.extra.forum_duniter %}
-        <li><a target="_blank" href="https://forum.duniter.org/u/{{ page.extra.forum_duniter }}/summary"/><img class="icon" src="/img/duniter_forum.png"/> Forum Duniter</a></li>{% endif %}
+        <li>
+            <a target="_blank" href="https://forum.duniter.org/u/{{ page.extra.forum_duniter }}/summary">
+                <img class="icon" src="/img/duniter_forum.png" aria-hidden="true"/>
+                Forum Duniter
+            </a>
+        </li>
+    {% endif %}
     {% if page.extra.forum_ml %}
-        <li><a target="_blank" href="https://forum.monnaie-libre.fr/u/{{ page.extra.forum_ml }}/summary"/><img class="icon" src="/img/logo_forum_ml_180x180.png"/> Forum Monnaie Libre</a></li>{% endif %}
+        <li>
+            <a target="_blank" href="https://forum.monnaie-libre.fr/u/{{ page.extra.forum_ml }}/summary">
+                <img class="icon" src="/img/logo_forum_ml_180x180.png" aria-hidden="true"/>
+                Forum Monnaie Libre
+            </a>
+        </li>
+    {% endif %}
     {% if page.extra.phone %}
-        <li><i class="fa fa-phone"></i> {{ page.extra.phone }}</li>{% endif %}
+        <li>
+            <i class="fa fa-phone" aria-hidden="true" title="Téléphone"></i>
+            <span class="sr-only">Téléphone&nbsp;:</span>
+            {{ page.extra.phone }}
+        </li>
+    {% endif %}
     {% if page.extra.email %}
-        <li><a href="mailto:{{ page.extra.email }}"><i class="fa fa-envelope"></i> {{ page.extra.email }}</li></a>{% endif %}
+        <li>
+            <a href="mailto:{{ page.extra.email }}" title="E-mail">
+                <i class="fa fa-envelope" aria-hidden="true"></i>
+                <span class="sr-only">E-mail&nbsp;:</span>
+                {{ page.extra.email }}
+            </a>
+        </li>
+    {% endif %}
     {% if page.extra.xmpp %}
-        <li><a href="xmpp:{{ page.extra.xmpp }}"><i class="fa fa-xmpp"></i> {{ page.extra.xmpp }}</li></a>{% endif %}
+        <li>
+            <a href="xmpp:{{ page.extra.xmpp }}" title="XMPP">
+                <i class="fa fa-xmpp" aria-hidden="true"></i>
+                <span class="sr-only">XMPP&nbsp;:</span>
+                {{ page.extra.xmpp }}
+            </a>
+        </li>
+    {% endif %}
+    {% if page.extra.mastodon %}
+        <li>
+            <a href="{{ page.extra.mastodon }}">
+                <i class="fa fa-mastodon" aria-hidden="true"></i>
+                Mastodon
+            </a>
+        </li>
+    {% endif %}
+    {% if page.extra.matrix %}
+        <li>
+            <a href="https://matrix.to/#/{{ page.extra.matrix }}" title="Matrix">
+                <i class="fa fa-matrix-org" aria-hidden="true"></i>
+                <span class="sr-only">Matrix&nbsp;:</span>
+                {{ page.extra.matrix }}
+            </li>
+        </a>
+    {% endif %}
     {% if page.extra.g1_pubkey %}
-        <li><a href="https://demo.cesium.app/index.html#/app/wot/{{ page.extra.g1_pubkey }}/"><img class="icon" src="/img/gbrevedot.svg"/> {{ page.extra.g1_pubkey | truncate(length=8) }}</li></a>{% endif %}
+        <li>
+            <a href="https://demo.cesium.app/index.html#/app/wot/{{ page.extra.g1_pubkey }}/" title="Clé publique Ğ1">
+                <img class="icon" src="/img/gbrevedot.svg" aria-hidden="true"/>
+                <span class="sr-only">Clé publique Ğ1&nbsp;:</span>
+                {{ page.extra.g1_pubkey | truncate(length=8) }}
+            </a>
+        </li>
+    {% endif %}
     {% if page.extra.g1_map %}
-        <li><a href="https://carte.monnaie-libre.fr?pubkey={{ page.extra.g1_pubkey }}"><img class="icon" src="/img/carte_ml.png"/> Carte Monnaie Libre</li></a>{% endif %}
+        <li>
+            <a href="https://carte.monnaie-libre.fr?pubkey={{ page.extra.g1_pubkey }}">
+                <img class="icon" src="/img/carte_ml.png" aria-hidden="true"/>
+                Carte Monnaie Libre
+            </a>
+        </li>
+    {% endif %}
 </ul>
 
 {{ page.content | safe }}
-- 
GitLab