mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-17 04:59:37 -04:00
Change HTML for template list items
Moves the link out of the label and increases the hit-size for the checkbox. The intention is to reduce the chance of clicking the wrong thing by accident. This includes a TODO in the checkboxes component template code. The item meta needs to be associated with the checkbox input by use of `aria-describedby` but this needs changes in govuk-frontend-jinja to happen.
This commit is contained in:
@@ -78,6 +78,7 @@
|
||||
{% set itemDescribedBy = describedBy if not hasFieldset else "" %}
|
||||
{% set itemDescribedBy = (itemDescribedBy + " " + itemHintId) | trim %}
|
||||
<{{ groupItemElement }} class="govuk-checkboxes__item {%- if item.classes %} {{ item.classes }}{% endif %}">
|
||||
{%- if item.before %}{{ item.before }}{% endif -%}
|
||||
<input class="govuk-checkboxes__input" id="{{ id }}" name="{{ name }}" type="checkbox" value="{{ item.value }}"
|
||||
{{-" checked" if item.checked }}
|
||||
{{-" disabled" if item.disabled }}
|
||||
@@ -108,6 +109,7 @@
|
||||
{{ item.conditional.html | safe }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{%- if item.after %}{{ item.after }}{% endif -%}
|
||||
</{{ groupItemElement }}>
|
||||
{% if not params.asList and item.conditional %}
|
||||
<div class="govuk-checkboxes__conditional{% if not item.checked %} govuk-checkboxes__conditional--hidden{% endif %}" id="{{ conditionalId }}">
|
||||
|
||||
Reference in New Issue
Block a user