a11y: do not hide steps to a11y devices (#71072)
gitea/publik-base-theme/pipeline/head This commit looks good Details

This commit is contained in:
Frédéric Péters 2023-05-04 08:19:40 +02:00
parent 4d02ef817e
commit ddbf32d982
1 changed files with 6 additions and 6 deletions

View File

@ -5,7 +5,7 @@
<ol class="wcs-steps--list">
{% for page_label in page_labels %}
{% spaceless %}
<li {% if forloop.counter != current_page_no %}aria-hidden="true"{% endif %}
<li
class="wcs-step
{% if forloop.first %}first{% endif %}
{% if forloop.last %}last{% endif %}
@ -13,10 +13,8 @@
{% if forloop.counter < current_page_no %}step-before{% endif %}
{% if forloop.counter > current_page_no %}step-after{% endif %}" >
<abbr
{% if forloop.counter == current_page_no %}
aria-label="Étape {{ forloop.counter }} sur {{ page_labels|length }}:"
title="Étape {{ forloop.counter }} sur {{ page_labels|length }}"
{% endif %}
aria-label="Étape {{ forloop.counter }} sur {{ page_labels|length }}:"
title="Étape {{ forloop.counter }} sur {{ page_labels|length }}"
class="marker wcs-step--marker">
<span class="wcs-step--marker-nb">
{{ forloop.counter }}
@ -25,7 +23,9 @@
{{ page_labels|length }}
</span>
</abbr>
<span class="label wcs-step--label">{{ page_label }}</span>
<span class="label wcs-step--label">{{ page_label }}
{% if forloop.counter == current_page_no %}<span class="sr-only">(étape courante)</span>{% endif %}
</span>
</li>
{% endspaceless %}
{% endfor %}