MDL-61823 forms: ensure grouped elements have ID attribute.

This is used by the forms implementation for faux-label elements
so that when they are clicked on, the first input element of the
corresponding group is focused.
This commit is contained in:
Paul Holden
2025-04-03 14:52:11 +01:00
parent cdf702bea3
commit aaf84bc0cf
+2 -2
View File
@@ -8,7 +8,7 @@
{{/label}}
{{$element}}
{{#label}}
<fieldset class="w-100 m-0 p-0 border-0">
<fieldset class="w-100 m-0 p-0 border-0" id="{{element.id}}">
<legend class="sr-only">{{label}}</legend>
<div class="d-flex flex-wrap align-items-center">
{{#element.elements}}
@@ -19,7 +19,7 @@
</fieldset>
{{/label}}
{{^label}}
<div class="w-100 m-0 p-0 border-0">
<div class="w-100 m-0 p-0 border-0" id="{{element.id}}">
<div class="d-flex flex-wrap align-items-center">
{{#element.elements}}
{{{separator}}}