a11y: use dl/dt/dd for profile data (#74066)

This commit is contained in:
Frédéric Péters 2023-06-20 16:56:14 +02:00
parent d5a1cf8ec3
commit ba0003a857
7 changed files with 23 additions and 29 deletions

View File

@ -376,7 +376,7 @@ div.widget label {
} }
} }
#profile span.label { #profile .label {
color: $font-color; color: $font-color;
font-weight: bold; font-weight: bold;
} }

View File

@ -116,7 +116,7 @@ main {
} }
} }
#profile .field .label { #profile .label {
color: $tertiary-color; color: $tertiary-color;
} }

View File

@ -512,15 +512,13 @@ div.column.account-management {
div#profile { div#profile {
column-count: 2; column-count: 2;
div.field { .label {
border-top: 1px solid #d2d2d2; border-top: 1px solid #d2d2d2;
padding-top: 0.5ex; padding-top: 0.5ex;
page-break-inside: avoid;
}
span.label {
color: #5caac2; color: #5caac2;
break-after: avoid;
} }
div.value { .value {
color: #929292; color: #929292;
} }
} }

View File

@ -377,7 +377,7 @@ div.widget label {
} }
} }
#profile span.label { #profile .label {
color: $font-color; color: $font-color;
font-weight: bold; font-weight: bold;
} }

View File

@ -410,7 +410,7 @@ div#nav #nav-button.toggled + ul li {
} }
/* Account management */ /* Account management */
#profile span.label { #profile .label {
display: block; display: block;
color: $red; color: $red;
font-size: inherit; font-size: inherit;

View File

@ -571,15 +571,13 @@ div#sidebar + div#columns-wrapper > div.a2-block {
div#profile { div#profile {
column-count: 2; column-count: 2;
div.field { .label {
border-top: 1px solid #d2d2d2; border-top: 1px solid #d2d2d2;
padding-top: 0.5ex; padding-top: 0.5ex;
page-break-inside: avoid;
}
span.label {
color: #5caac2; color: #5caac2;
break-after: avoid;
} }
div.value { .value {
color: #535353; color: #535353;
} }
} }

View File

@ -52,11 +52,11 @@
{% endblock %} {% endblock %}
{% block profile-data %} {% block profile-data %}
<div id="profile" class="cell--body"> <div id="profile" class="cell--body">
{% if attributes %} <dl>
{% for attribute in attributes %} {% if attributes %}
<div class="field"> {% for attribute in attributes %}
<span class="label">{{ attribute.attribute.label|capfirst }}</span> <dt class="label">{{ attribute.attribute.label|capfirst }}</dt>
<div class="value"> <dd class="value">
{% if attribute.values|length == 0 %}<span class="nodata">(non spécifié)</span> {% if attribute.values|length == 0 %}<span class="nodata">(non spécifié)</span>
{% elif attribute.values|length == 1 %}{{ attribute.values.0 }}{% else %} {% elif attribute.values|length == 1 %}{{ attribute.values.0 }}{% else %}
<ul> <ul>
@ -65,16 +65,14 @@
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %} {% endif %}
</div> </dd>
</div> {% endfor %}
{% endfor %} {% endif %}
{% endif %} {% if LAST_LOGIN %}
{% if LAST_LOGIN %} <dt class="label">Dernière connexion</dt>
<div class="field"> <dd class="value">{{ LAST_LOGIN }}</dd>
<span class="label">Dernière connexion</span> {% endif %}
<div class="value">{{ LAST_LOGIN }}</div> </dl>
</div>
{% endif %}
</div> </div>
{% endblock %} {% endblock %}
{% block profile-bottom %}{% endblock %} {% block profile-bottom %}{% endblock %}