Skip to content

Commit 1a1caa8

Browse files
authored
Merge pull request #419 from maykinmedia/fix/search-usables
[#789] Search and questionnaire accesibility fixes
2 parents 22fea17 + f6fe73a commit 1a1caa8

File tree

8 files changed

+25
-17
lines changed

8 files changed

+25
-17
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
{% load i18n filter_tags icon_tags form_tags %}
22

33
<div>
4-
<aside class="filter filter--open" aria-label="{% trans "Filter" %}">
5-
<h4 class="h4 filter__title">
4+
<fieldset class="filter filter--open" aria-label="{% trans "Filter" %}">
5+
<legend class="filter__title">
66
{{ field.label }}
7-
{% icon icon="expand_more" %}
8-
</h4>
7+
</legend>
98
<div class="filter__list">
109
{% for option in field.field.choices %}
1110
{% choice_checkbox choice=option name=field.name data=field.data index=forloop.counter %}
1211
{% endfor %}
1312
</div>
14-
</aside>
13+
</fieldset>
1514
<hr class="divider divider--small">
1615
</div>
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{% load l10n form_tags %}
22

3-
<label class="checkbox">
3+
<div class="checkbox">
44
<input
55
class="checkbox__input"
66
type="checkbox"
@@ -10,4 +10,4 @@
1010
{% if choice.0 in data or choice.0|add:0 in data %}checked="checked"{% endif %}
1111
/>
1212
<label class="checkbox__label" for="id_{{ name }}_{{ index }}">{{ choice.1 }}</label>
13-
</label>
13+
</div>

src/open_inwoner/components/templates/components/Step/StepIndicator.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<aside class="step-indicator" aria-label="{% trans "Stappen indicator" %}">
55
<ol class="step-indicator__list">
66
{% for step in steps %}
7-
<li class="step-indicator__list-item{% if step.is_current %} step-indicator__list-item--active{% elif step.is_completed %} step-indicator__list-item--completed{% endif %} P" data-step={{ step.step }}>
7+
<li class="step-indicator__list-item{% if step.is_current %} step-indicator__list-item--active{% elif step.is_completed %} step-indicator__list-item--completed{% endif %} P" data-step={{ step.step }} aria-checked="{{ step.is_completed|yesno:"true,false" }}">
88
{% if step.object %}
99
{% link href=step.object.get_absolute_url secondary=True bold=True text=step.object_display %}
1010
{% endif %}

src/open_inwoner/scss/components/Filter/Filter.scss

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
.filter {
2+
border: 0 solid transparent;
3+
24
&--open {
35
.filter__list {
46
display: grid;
57
}
68
}
79

810
&__title {
9-
color: var(--color-gray-dark);
11+
color: var(--font-color-heading-4);
1012
font-family: var(--font-family-heading);
1113
font-size: var(--font-size-heading-4);
1214
font-weight: bold;

src/open_inwoner/scss/components/Questionnaire/Questionnaire.scss

+6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
.questionnaire {
2+
&__fieldset {
3+
border: 0 solid transparent;
4+
legend {
5+
padding: 0;
6+
}
7+
}
28
&__list {
39
list-style: none;
410
padding: var(--spacing-large) 0;

src/open_inwoner/scss/components/SearchResults/SearchResults.scss

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
font-weight: normal;
2222
}
2323

24-
.search-results__item {
24+
&__item {
2525
color: var(--color-black);
2626
font-family: var(--font-family-body);
2727
font-size: var(--font-size-body);
@@ -30,7 +30,7 @@
3030
text-decoration: none;
3131
}
3232

33-
.search-results__item-title {
33+
&__item-title {
3434
color: var(--color-black);
3535
font-family: var(--font-family-body);
3636
font-size: var(--font-size-heading-3);
@@ -40,14 +40,14 @@
4040
margin: 0 0 6px;
4141
}
4242

43-
.search-results__item-info-container {
43+
&__item-info-container {
4444
display: grid;
4545
grid-template-columns: 1fr auto;
4646
gap: var(--spacing-large);
4747
align-items: end;
4848
}
4949

50-
.search-results__item-intro {
50+
&__item-intro {
5151
color: var(--color-black);
5252
font-family: var(--font-family-body);
5353
font-size: var(--font-size-body);
@@ -56,7 +56,7 @@
5656
margin: 0;
5757
}
5858

59-
.search-results__item-type {
59+
&__item-type {
6060
color: var(--color-black);
6161
font-family: var(--font-family-body);
6262
font-size: var(--font-size-body);

src/open_inwoner/templates/pages/questionnaire/questionnaire-step.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ <h1 class="h1" data-title="{{ form.instance.get_title }}" data-code="{{ form.ins
1717

1818
{% step_indicator form.instance.depth form.instance.depth object_list=form.instance.get_tree_path object_list_str='question_subject' %}
1919

20-
<h4 class="h4" id="question">{{ form.instance.question }}</h4>
20+
<fieldset class="questionnaire__fieldset">
21+
<legend class="h4" id="question">{{ form.instance.question }}</legend>
2122

2223
{% if form.instance.help_text %}
2324
<p class="p p--compact">{{ form.instance.help_text }}</p>
@@ -53,7 +54,7 @@ <h4 class="h4" id="question">{{ form.instance.question }}</h4>
5354
{% card_container products=form.instance.related_products.published small=True %}
5455
{% endif %}
5556
{% endrender_form %}
56-
57+
</fieldset>
5758
{% endrender_column %}
5859
{% endrender_grid %}
5960
{% endblock %}

src/open_inwoner/templates/pages/search.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ <h2 class="h2 search-results__title">
3838
<div class="search-results__list">
3939
{% for hit in page_obj %}
4040
<a class="search-results__item" href="{% url 'pdc:product_detail' hit.slug %}">
41-
<p class="search-results__item-title">{{ hit.name }}</p>
41+
<h3 class="search-results__item-title">{{ hit.name }}</h3>
4242
<div class="search-results__item-info-container">
4343
<p class="search-results__item-intro">{{ hit.summary }}</p>
4444
<p class="search-results__item-type">{% trans "product" %}</p>

0 commit comments

Comments
 (0)