From 36c91ff9070204ef7161e45a8690c59b597232e9 Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Fri, 15 Dec 2023 12:45:41 +0000 Subject: [PATCH] MDL-80431 forms: do not use fieldset tag without a legend --- lib/form/templates/element-group.mustache | 28 +++++++++++++++-------- theme/upgrade.txt | 1 + 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/lib/form/templates/element-group.mustache b/lib/form/templates/element-group.mustache index 67d7866eeed..208dd6d0d14 100644 --- a/lib/form/templates/element-group.mustache +++ b/lib/form/templates/element-group.mustache @@ -7,17 +7,27 @@ {{/element.hiddenlabel}} {{/label}} {{$element}} -
- {{#label}} + {{#label}} +
{{label}} - {{/label}} -
- {{#element.elements}} - {{{separator}}} - {{{html}}} - {{/element.elements}} +
+ {{#element.elements}} + {{{separator}}} + {{{html}}} + {{/element.elements}} +
+
+ {{/label}} + {{^label}} +
+
+ {{#element.elements}} + {{{separator}}} + {{{html}}} + {{/element.elements}} +
-
+ {{/label}} {{/element}} {{/ core_form/element-template }} {{#js}} diff --git a/theme/upgrade.txt b/theme/upgrade.txt index d7f16177da5..5610a75127d 100644 --- a/theme/upgrade.txt +++ b/theme/upgrade.txt @@ -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.