Improve accessibility of event form

- use <label> tag instead of <legend>
- display time selectors on same line as date selector
This commit is contained in:
2025-11-26 13:38:24 +01:00
parent 0d32810d0d
commit 330b8fddb3
4 changed files with 45 additions and 4 deletions

View File

@@ -0,0 +1,6 @@
kind: UX
body: Improve accessibility of event form
time: 2025-11-26T13:39:10.462348982+01:00
custom:
Issue: "474"
SchemaChange: No schema change

View File

@@ -486,7 +486,7 @@ final class ParticipationController extends AbstractController
return $this->redirectToRoute(
'chill_event__event_show',
['event_id' => $event->getId()]
['id' => $event->getId()]
);
}

View File

@@ -14,8 +14,25 @@
{{ form_errors(edit_form) }}
{{ form_row(edit_form.circle) }}
{{ form_row(edit_form.name) }}
{{ form_row(edit_form.date) }}
<div class="mb-3 row">
<label for="{{ edit_form.date.date.vars.id }}" class="col-form-label col-sm-4 required">
{{ 'Date'|trans }}
</label>
<div class="col-sm-8 d-flex align-items-start gap-2">
{{ form_widget(edit_form.date.date, {
attr: {
class: 'form-control',
style: 'flex: 1 1 auto;'
}
}) }}
{{ form_widget(edit_form.date.time, {
attr: {
class: 'form-control',
style: 'flex: 0 0 200px; max-width: 200px; white-space: nowrap;'
}
}) }}
</div>
</div>
{{ form_row(edit_form.type, { label: "Event type" }) }}
{{ form_row(edit_form.themes) }}
{{ form_row(edit_form.moderator) }}

View File

@@ -16,7 +16,25 @@
{{ form_errors(form) }}
{{ form_row(form.name) }}
{{ form_row(form.circle) }}
{{ form_row(form.date) }}
<div class="mb-3 row">
<label for="{{ form.date.date.vars.id }}" class="col-form-label col-sm-4 required">
{{ 'Date'|trans }}
</label>
<div class="col-sm-8 d-flex align-items-start gap-2">
{{ form_widget(form.date.date, {
attr: {
class: 'form-control',
style: 'flex: 1 1 auto;'
}
}) }}
{{ form_widget(form.date.time, {
attr: {
class: 'form-control',
style: 'flex: 0 0 200px; max-width: 200px; white-space: nowrap;'
}
}) }}
</div>
</div>
{{ form_row(form.type, { label: "Event type" }) }}
{{ form_row(form.themes) }}
{{ form_row(form.moderator) }}