diff --git a/composer.json b/composer.json
index 7958011700..d27049802a 100644
--- a/composer.json
+++ b/composer.json
@@ -403,7 +403,8 @@
"3241295 - CKEditor 5 isn't respecting field widgets row settings": "patches/3241295-ckeditor-5-not-respecting-field-widgets-row-settings.patch",
"3376267 - [upstream] Add style to anchor leads to unusable behavior": "patches/3376267-add-style-to-anchor-leads-to-unusable-behavior.patch",
"3285657 - The content has either been modified by another user, or you have already submitted modifications error": "patches/3285657-node-lock-translations.patch",
- "VACMS-19177 remove username form logging in user module": "patches/VACMS-19177-patch-for-user-module-to-log-uid.patch"
+ "VACMS-19177 remove username form logging in user module": "patches/VACMS-19177-patch-for-user-module-to-log-uid.patch",
+ "3082011 - Fix for orphaned label tags": "patches/3082011-19-do-not-use-label-HTML-tag-in-item-form-element.patch"
},
"drupal/danse": {
"3364925 - added explicit access check": "patches/3364925-added-explicit-access-check.patch"
diff --git a/composer.lock b/composer.lock
index dbfdf5f967..570a9143aa 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "968afd2e6b74d4dd070d3e1695fe3c31",
+ "content-hash": "ee62fce148618949bab1fc8e4a438044",
"packages": [
{
"name": "asm89/stack-cors",
diff --git a/docroot/themes/custom/vagovclaro/assets/scss/components/_layout.scss b/docroot/themes/custom/vagovclaro/assets/scss/components/_layout.scss
index d8971d9f39..19b0da44d0 100644
--- a/docroot/themes/custom/vagovclaro/assets/scss/components/_layout.scss
+++ b/docroot/themes/custom/vagovclaro/assets/scss/components/_layout.scss
@@ -124,3 +124,16 @@
grid-area: 2 / 1 / 2 / 2;
}
}
+
+// Fix to align elements in Editorial Workflow current state on all pages
+.js-form-item-moderation-state-0-current {
+ span {
+ display: inline;
+
+ &:first-child {
+ &::after {
+ content: ":";
+ }
+ }
+ }
+}
diff --git a/patches/3082011-19-do-not-use-label-HTML-tag-in-item-form-element.patch b/patches/3082011-19-do-not-use-label-HTML-tag-in-item-form-element.patch
new file mode 100644
index 0000000000..2227872d36
--- /dev/null
+++ b/patches/3082011-19-do-not-use-label-HTML-tag-in-item-form-element.patch
@@ -0,0 +1,90 @@
+diff --git a/core/includes/form.inc b/core/includes/form.inc
+index 4f353d0..950f185 100644
+--- a/core/includes/form.inc
++++ b/core/includes/form.inc
+@@ -497,6 +497,7 @@ function template_preprocess_form_element(&$variables) {
+ $variables['label'] = ['#theme' => 'form_element_label'];
+ $variables['label'] += array_intersect_key($element, array_flip(['#id', '#required', '#title', '#title_display']));
+ $variables['label']['#attributes'] = $element['#label_attributes'];
++ $variables['label']['#tag'] = $element['#title_tag'] ?? ($element['#type'] === 'item' ? 'span' : 'label');
+ if (!empty($element['#label_for'])) {
+ $variables['label']['#for'] = $element['#label_for'];
+ if (!empty($element['#id'])) {
+@@ -541,18 +542,22 @@ function template_preprocess_form_element_label(&$variables) {
+ // Pass elements title_display to template.
+ $variables['title_display'] = $element['#title_display'];
+
+- // A #for property of a dedicated #type 'label' element as precedence.
+- if (!empty($element['#for'])) {
+- $variables['attributes']['for'] = $element['#for'];
+- // A custom #id allows the referenced form input element to refer back to
+- // the label element; e.g., in the 'aria-labelledby' attribute.
+- if (!empty($element['#id'])) {
+- $variables['attributes']['id'] = $element['#id'];
++ $variables['tag'] = $element['#tag'];
++
++ if ($variables['tag'] === 'label') {
++ // A #for property of a dedicated #type 'label' element as precedence.
++ if (!empty($element['#for'])) {
++ $variables['attributes']['for'] = $element['#for'];
++ // A custom #id allows the referenced form input element to refer back to
++ // the label element; e.g., in the 'aria-labelledby' attribute.
++ if (!empty($element['#id'])) {
++ $variables['attributes']['id'] = $element['#id'];
++ }
++ }
++ // Otherwise, point to the #id of the form input element.
++ elseif (!empty($element['#id'])) {
++ $variables['attributes']['for'] = $element['#id'];
+ }
+- }
+- // Otherwise, point to the #id of the form input element.
+- elseif (!empty($element['#id'])) {
+- $variables['attributes']['for'] = $element['#id'];
+ }
+
+ // Pass elements required to template.
+diff --git a/core/modules/system/templates/form-element-label.html.twig b/core/modules/system/templates/form-element-label.html.twig
+index 7696609..90dd02b 100644
+--- a/core/modules/system/templates/form-element-label.html.twig
++++ b/core/modules/system/templates/form-element-label.html.twig
+@@ -23,5 +23,5 @@
+ ]
+ %}
+ {% if title is not empty or required -%}
+-
++ <{{ tag }}{{ attributes.addClass(classes) }}>{{ title }}{{ tag }}>
+ {%- endif %}
+diff --git a/core/themes/claro/templates/form-element-label.html.twig b/core/themes/claro/templates/form-element-label.html.twig
+index d0ec8a3..2424e5f 100644
+--- a/core/themes/claro/templates/form-element-label.html.twig
++++ b/core/themes/claro/templates/form-element-label.html.twig
+@@ -22,5 +22,5 @@
+ ]
+ %}
+ {% if title is not empty or required -%}
+-
++ <{{ tag }}{{ attributes.addClass(classes) }}>{{ title }}{{ tag }}>
+ {%- endif %}
+diff --git a/core/themes/stable9/templates/form/form-element-label.html.twig b/core/themes/stable9/templates/form/form-element-label.html.twig
+index 7c2f8f2..3d51b32 100644
+--- a/core/themes/stable9/templates/form/form-element-label.html.twig
++++ b/core/themes/stable9/templates/form/form-element-label.html.twig
+@@ -21,5 +21,5 @@
+ ]
+ %}
+ {% if title is not empty or required -%}
+-
++ <{{ tag }}{{ attributes.addClass(classes) }}>{{ title }}{{ tag }}>
+ {%- endif %}
+diff --git a/core/themes/starterkit_theme/templates/form/form-element-label.html.twig b/core/themes/starterkit_theme/templates/form/form-element-label.html.twig
+index 7c2f8f2..3d51b32 100644
+--- a/core/themes/starterkit_theme/templates/form/form-element-label.html.twig
++++ b/core/themes/starterkit_theme/templates/form/form-element-label.html.twig
+@@ -21,5 +21,5 @@
+ ]
+ %}
+ {% if title is not empty or required -%}
+-
++ <{{ tag }}{{ attributes.addClass(classes) }}>{{ title }}{{ tag }}>
+ {%- endif %}