From b52100c11ee6ec96548d73ab32b795473e297700 Mon Sep 17 00:00:00 2001
From: catch <catch@35733.no-reply.drupal.org>
Date: Thu, 12 Jan 2023 14:00:06 +0000
Subject: [PATCH] Issue #3010558 by dww, huzooka, yash.rode, Swapnil_Kotwal,
 averagejoe3000, Waldoswndrwrld, Gauravvv, sagarchauhan, sahil.goyal,
 dksdev01, singhkiran, _utsavsharma, lauriii: Unnecessary <strong> element in
 Umami's form-element template may produce invalid markup

---
 .../demo_umami/themes/umami/css/classy/components/form.css    | 3 +++
 .../umami/templates/classy/form/datetime-wrapper.html.twig    | 4 ++--
 .../themes/umami/templates/classy/form/details.html.twig      | 4 ++--
 .../themes/umami/templates/classy/form/fieldset.html.twig     | 4 ++--
 .../themes/umami/templates/classy/form/form-element.html.twig | 4 ++--
 5 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/core/profiles/demo_umami/themes/umami/css/classy/components/form.css b/core/profiles/demo_umami/themes/umami/css/classy/components/form.css
index 61af1e1849de..7d8882bed201 100644
--- a/core/profiles/demo_umami/themes/umami/css/classy/components/form.css
+++ b/core/profiles/demo_umami/themes/umami/css/classy/components/form.css
@@ -93,6 +93,9 @@ abbr.ajax-changed {
 }
 
 /* Inline error messages. */
+.form-item-errors {
+  font-weight: bold;
+}
 .form-item--error-message:before {
   display: inline-block;
   width: 14px;
diff --git a/core/profiles/demo_umami/themes/umami/templates/classy/form/datetime-wrapper.html.twig b/core/profiles/demo_umami/themes/umami/templates/classy/form/datetime-wrapper.html.twig
index 5b52f2daa380..bdc2f386c2ea 100644
--- a/core/profiles/demo_umami/themes/umami/templates/classy/form/datetime-wrapper.html.twig
+++ b/core/profiles/demo_umami/themes/umami/templates/classy/form/datetime-wrapper.html.twig
@@ -25,8 +25,8 @@
 {% endif %}
 {{ content }}
 {% if errors %}
-  <div class="form-item--error-message">
-    <strong>{{ errors }}</strong>
+  <div class="form-item--error-message form-item-errors">
+    {{ errors }}
   </div>
 {% endif %}
 {% if description %}
diff --git a/core/profiles/demo_umami/themes/umami/templates/classy/form/details.html.twig b/core/profiles/demo_umami/themes/umami/templates/classy/form/details.html.twig
index c554096da9d7..3f6e8ddf05c9 100644
--- a/core/profiles/demo_umami/themes/umami/templates/classy/form/details.html.twig
+++ b/core/profiles/demo_umami/themes/umami/templates/classy/form/details.html.twig
@@ -27,8 +27,8 @@
   {%- endif -%}
   <div class="details-wrapper">
     {% if errors %}
-      <div class="form-item--error-message">
-        <strong>{{ errors }}</strong>
+      <div class="form-item--error-message form-item-errors">
+        {{ errors }}
       </div>
     {% endif %}
     {%- if description -%}
diff --git a/core/profiles/demo_umami/themes/umami/templates/classy/form/fieldset.html.twig b/core/profiles/demo_umami/themes/umami/templates/classy/form/fieldset.html.twig
index 93b5f54d8964..3744839b6b55 100644
--- a/core/profiles/demo_umami/themes/umami/templates/classy/form/fieldset.html.twig
+++ b/core/profiles/demo_umami/themes/umami/templates/classy/form/fieldset.html.twig
@@ -50,8 +50,8 @@
       <div{{ description.attributes.addClass('description') }}>{{ description.content }}</div>
     {% endif %}
     {% if errors %}
-      <div class="form-item--error-message">
-        <strong>{{ errors }}</strong>
+      <div class="form-item--error-message form-item-errors">
+        {{ errors }}
       </div>
     {% endif %}
     {% if prefix %}
diff --git a/core/profiles/demo_umami/themes/umami/templates/classy/form/form-element.html.twig b/core/profiles/demo_umami/themes/umami/templates/classy/form/form-element.html.twig
index 3bde4f711545..cb512f4582bc 100644
--- a/core/profiles/demo_umami/themes/umami/templates/classy/form/form-element.html.twig
+++ b/core/profiles/demo_umami/themes/umami/templates/classy/form/form-element.html.twig
@@ -83,8 +83,8 @@
     {{ label }}
   {% endif %}
   {% if errors %}
-    <div class="form-item--error-message">
-      <strong>{{ errors }}</strong>
+    <div class="form-item--error-message form-item-errors">
+      {{ errors }}
     </div>
   {% endif %}
   {% if description_display in ['after', 'invisible'] and description.content %}
-- 
GitLab