templates: add progressbar role to form steps (#40921)

This commit is contained in:
Frédéric Péters 2023-05-07 10:01:10 +02:00
parent ddbf32d982
commit 2e979748c3
1 changed files with 37 additions and 30 deletions

View File

@ -1,6 +1,12 @@
{% load i18n %}
<header id="steps" class="wcs-steps steps-{{page_labels|length}}">
<h2>{% trans "Steps" %}</h2>
<h2 id="steps--title">{% trans "Steps" %}</h2>
<div role="progressbar"
aria-labelledby="steps--title"
aria-valuemin="1"
aria-valuenow="{{ current_page_no }}"
aria-valuemax="{{ page_labels|length }}"
aria-valuetext="Étape {{ current_page_no }} : {{ page_labels|get:current_page_index }}">
{% block steps-list %}
<ol class="wcs-steps--list">
{% for page_label in page_labels %}
@ -31,4 +37,5 @@
{% endfor %}
</ol>
{% endblock %}
</div>
</header>