Skip to content

Commit deeefb7

Browse files
Accessibilite assistant v2 (#1350)
* Accessibility improvements - use list in suggestions - use title attribute on logo * add empty option label in contact form * Better accessibilty search form
1 parent b7e3e42 commit deeefb7

File tree

5 files changed

+17
-8
lines changed

5 files changed

+17
-8
lines changed

qfdmd/forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class ContactForm(DsfrBaseForm):
5555
subject = forms.ChoiceField(
5656
label="Votre sujet",
5757
choices=[
58-
("", ""),
58+
("", "Sélectionner une option"),
5959
(
6060
"integration",
6161
"Je souhaite obtenir de l'aide pour intégrer cet outil",

templates/components/header/header.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
class="qf-bg-none qf-flex qf-gap-2w"
66
data-testid="header-logo-link"
77
href="{% url 'home' %}"
8+
title="Que faire de mes Objets ou Déchets ? - Page d'accueil"
89
>
910
<img
1011
src="{% static 'assistant/bloc-marque.svg' %}"

templates/components/search/view.html

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,29 @@
1919
data-turbo-frame="search-results"
2020
action="{% url 'qfdmd:search' %}"
2121
class="qf-pl-4w {# should match the svg icon width #}
22-
qf-flex qf-relative
22+
qf-flex qf-flex-row-reverse qf-relative
2323
md:group-data-[home]:qf-h-7w
2424
qf-h-5w
2525
qf-content-center
2626
"
2727
>
28+
29+
{% for field in search_form %}
30+
{{ field }}
31+
{% endfor %}
2832
<button
2933
aria-label="Rechercher"
3034
type="submit"
3135
class="qf-absolute qf-top-0 qf-bottom-0 qf-left-0
3236
qf-m-auto qf-pl-1v
3337
fr-btn fr-icon-search-line fr-btn--tertiary-no-outline
38+
focus:qf-bg-green-menthe-850-hover
39+
focus:qf-text-white
40+
focus:!qf-outline-none
41+
qf-h-full
42+
!qf-max-h-[none]
3443
qf-text-green-menthe-main-548"
3544
></button>
36-
37-
{% for field in search_form %}
38-
{{ field }}
39-
{% endfor %}
4045
</form>
4146

4247
<turbo-frame

templates/components/search/widget.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
It is used mainly for styles, to add clasnames.
66
{% endcomment %}
7+
<label for="{{ widget.attrs.id }}" class="qf-sr-only">Entrez un déchet :</label>
78
<input
89
class="qf-pl-1w qf-pr-2w
910
focus:qf-outline-none

templates/qfdmd/home.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,23 @@
2323
<p class="qf-m-0">
2424
En panne d’inspiration ? Essayez une des suggestions ci‑dessous.
2525
</p>
26-
<div
26+
<ul
2727
class="qf-flex qf-gap-x-2w qf-gap-y-3w
2828
qf-flex-wrap qf-items-center qf-justify-center "
2929
>
3030
{% for suggestion in object_list %}
3131
{% with suggestion.produit as produit %}
32+
<li class="qf-list-none qf-p-0">
3233
<a
3334
class="qf-btn"
3435
href="{% url 'qfdmd:synonyme-detail' slug=produit.slug %}{% if request.GET %}?{{ request.GET.urlencode }}{% endif %}"
3536
>
3637
{{ produit.nom|capfirst }}
3738
</a>
39+
</li>
3840
{% endwith %}
3941
{% endfor %}
40-
</div>
42+
</ul>
4143
</div>
4244

4345
<div class="qf-max-w-3xl qf-mx-auto">

0 commit comments

Comments
 (0)