fix: improve a11y of checkbox with tooltip

This commit is contained in:
Björn Fromme
2025-03-27 10:45:10 +01:00
parent fe20b6ab2b
commit 3d9177f979
+2
View File
@@ -94,6 +94,7 @@
{%- if form.vars.attr.tooltip is defined -%} {%- if form.vars.attr.tooltip is defined -%}
{%- set tooltip = form.vars.attr.tooltip -%} {%- set tooltip = form.vars.attr.tooltip -%}
{%- endif -%} {%- endif -%}
<div>
<div class="{{ html_classes('relative flex items-start', { 'cursor-not-allowed': form.vars.attr.readonly is defined }) }}"{% if tooltip is not null %} {{ stimulus_controller('tooltip', { 'content': tooltip }) }}{% endif %}> <div class="{{ html_classes('relative flex items-start', { 'cursor-not-allowed': form.vars.attr.readonly is defined }) }}"{% if tooltip is not null %} {{ stimulus_controller('tooltip', { 'content': tooltip }) }}{% endif %}>
<div class="flex h-6 items-center"> <div class="flex h-6 items-center">
{{ form_widget(form) }} {{ form_widget(form) }}
@@ -105,6 +106,7 @@
{{- form_errors(form) -}} {{- form_errors(form) -}}
</div> </div>
</div> </div>
</div>
{% endblock %} {% endblock %}
{%- block choice_widget_collapsed -%} {%- block choice_widget_collapsed -%}