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-03-05 22:29:14 +00:00
parent b00c328d2d
commit aec6078818
+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="visually-hidden">{{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}}}