diff --git a/app/design/adminhtml/Magento/backend/web/css/source/forms/_extends.less b/app/design/adminhtml/Magento/backend/web/css/source/forms/_extends.less
index 01b5ae080130f..24779dc8baa30 100644
--- a/app/design/adminhtml/Magento/backend/web/css/source/forms/_extends.less
+++ b/app/design/adminhtml/Magento/backend/web/css/source/forms/_extends.less
@@ -54,6 +54,8 @@
&._required {
> .admin__field-label {
span {
+ padding-left: 1.5rem;
+
&:after {
left: 0;
margin-left: @temp_gutter;
diff --git a/app/design/adminhtml/Magento/backend/web/css/source/forms/_fields.less b/app/design/adminhtml/Magento/backend/web/css/source/forms/_fields.less
index 8107c81030590..f195a28908abe 100644
--- a/app/design/adminhtml/Magento/backend/web/css/source/forms/_fields.less
+++ b/app/design/adminhtml/Magento/backend/web/css/source/forms/_fields.less
@@ -221,7 +221,7 @@
overflow: hidden;
}
- label {
+ span {
display: inline-block;
line-height: @field-label__line-height;
vertical-align: middle;
@@ -239,7 +239,7 @@
.required > &, // ToDo UI: change classes 'required' to '_required'.
._required > & {
- > label {
+ span {
&:after {
color: @validation__color;
content: '*';
@@ -526,7 +526,7 @@
position: absolute;
top: 0;
- label {
+ span {
&:before {
display: block;
}
@@ -541,7 +541,7 @@
}
& > .admin__field-label {
- label {
+ span {
&:before {
display: none;
}
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Section/ProductDetails/NewCategoryIds.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Section/ProductDetails/NewCategoryIds.xml
index f318287720c38..87618777d7907 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Section/ProductDetails/NewCategoryIds.xml
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Section/ProductDetails/NewCategoryIds.xml
@@ -11,7 +11,7 @@
[name="name"]
- div[data-index="parent"]>div
+ div[data-index="parent"]>div[class="admin__field-control"]
Magento\Catalog\Test\Block\Adminhtml\Product\Edit\Section\ProductDetails\CategoryIds
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/ProductForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/ProductForm.php
index 61142adc8f9b3..fa2b66d3e9698 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/ProductForm.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/ProductForm.php
@@ -28,7 +28,7 @@ class ProductForm extends FormSections
*
* @var string
*/
- protected $attribute = './/*[contains(@class,"label")]/label[text()="%s"]';
+ protected $attribute = './/*[contains(@class,"label")]//span[text()="%s"]';
/**
* Product new from date field on the product form