MDL-80431 forms: do not use fieldset tag without a legend

This commit is contained in:
Marina Glancy 2023-12-15 12:45:41 +00:00
parent 38a3310c92
commit 36c91ff907
2 changed files with 20 additions and 9 deletions

View File

@ -7,17 +7,27 @@
{{/element.hiddenlabel}}
{{/label}}
{{$element}}
<fieldset class="w-100 m-0 p-0 border-0">
{{#label}}
{{#label}}
<fieldset class="w-100 m-0 p-0 border-0">
<legend class="sr-only">{{label}}</legend>
{{/label}}
<div class="d-flex flex-wrap align-items-center">
{{#element.elements}}
{{{separator}}}
{{{html}}}
{{/element.elements}}
<div class="d-flex flex-wrap align-items-center">
{{#element.elements}}
{{{separator}}}
{{{html}}}
{{/element.elements}}
</div>
</fieldset>
{{/label}}
{{^label}}
<div class="w-100 m-0 p-0 border-0">
<div class="d-flex flex-wrap align-items-center">
{{#element.elements}}
{{{separator}}}
{{{html}}}
{{/element.elements}}
</div>
</div>
</fieldset>
{{/label}}
{{/element}}
{{/ core_form/element-template }}
{{#js}}

View File

@ -5,6 +5,7 @@ information provided here is intended especially for theme designer.
* Theme selection is now performed using cards and modals.
* The 'choosereadme' string for each theme is expected to be plain text. HTML content will not render when displayed in the modal.
* Theme selector page has been moved to admin/themeselector.php (previously theme/index.php)
* Moodleforms no longer use tag 'fieldset' for groups without labels (legends). Avoid targeting tag 'fieldset' in the theme CSS.
=== 4.3 ===
* The core_renderer::htmllize_file_tree method has been deprecated. This was missed before Moodle 2.0.