Skip to content

Commit b5596a6

Browse files
Sukhendu2002Sukhendu2002t-hamanoMamaduka
authored
Fix: Improve warning message and add spacing in HTMLElementControl (#70002)
* Fix: Improve warning message and add bottom margin in HTMLElementControl * Simplify warning message Co-authored-by: Sukhendu2002 <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: Mamaduka <[email protected]>
1 parent 92860fa commit b5596a6

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

packages/block-editor/src/components/block-inspector/style.scss

+4-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
}
1212

1313
.components-base-control,
14-
.components-radio-control {
14+
.components-radio-control,
15+
.block-editor-html-element-control {
1516
&:where(:not(:last-child)) {
1617
margin-bottom: $grid-unit-20;
1718
}
@@ -20,7 +21,8 @@
2021
// Reset unwanted margin-bottom from being applied to BaseControls within certain components.
2122
.components-focal-point-picker-control,
2223
.components-query-controls,
23-
.components-range-control {
24+
.components-range-control,
25+
.block-editor-html-element-control {
2426
.components-base-control {
2527
margin-bottom: 0;
2628
}

packages/block-editor/src/components/html-element-control/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export default function HTMLElementControl( {
8686
} );
8787

8888
return (
89-
<VStack spacing={ 2 }>
89+
<VStack spacing={ 2 } className="block-editor-html-element-control">
9090
<SelectControl
9191
__nextHasNoMarginBottom
9292
__next40pxDefaultSize
@@ -100,7 +100,7 @@ export default function HTMLElementControl( {
100100
{ tagName === 'main' && hasMainElementElsewhere && (
101101
<Notice status="warning" isDismissible={ false }>
102102
{ __(
103-
'Multiple <main> elements detected. This is not valid HTML and may cause accessibility issues. Please change this HTML element.'
103+
'Multiple <main> elements detected. The duplicate may be in your content or template. This is not valid HTML and may cause accessibility issues. Please change this HTML element.'
104104
) }
105105
</Notice>
106106
) }

0 commit comments

Comments
 (0)