Skip to content

Commit b27dfca

Browse files
gmjuhaszmatticbot
authored andcommitted
Merge branch 'trunk' into prerelease
Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/20297418310 Upstream-Ref: Automattic/jetpack@5c12862
1 parent 7421162 commit b27dfca

File tree

7 files changed

+18
-5
lines changed

7 files changed

+18
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ This is an alpha version! The changes listed here are not final.
1515
### Removed
1616
- Forms: remove admin class files
1717

18+
### Fixed
19+
- Fixed textarea placeholders to match input placeholder styling
20+
- Forms: strip HTML from styled labels in error summary
21+
1822
## [7.0.0] - 2025-12-15
1923
### Added
2024
- Add Jetpack Form custom post type for reusable forms with REST API support and feature flag integration. [#46202]

dist/contact-form/css/grunion-rtl.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/contact-form/css/grunion.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/modules/form/view.asset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('@wordpress/interactivity', 'wp-polyfill'), 'version' => 'b9cbd8502afc51c79dcd', 'type' => 'module');
1+
<?php return array('dependencies' => array('@wordpress/interactivity', 'wp-polyfill'), 'version' => 'e5cee83aeee3e05978bd', 'type' => 'module');

dist/modules/form/view.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/contact-form/css/grunion.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,18 @@
1818
clear: both;
1919
}
2020

21+
.contact-form textarea::placeholder,
2122
.contact-form input::placeholder {
23+
color: inherit;
2224
transition: opacity 0.3s ease-out;
2325
}
2426

27+
.contact-form textarea:hover::placeholder,
2528
.contact-form input:hover::placeholder {
2629
opacity: 0.5;
2730
}
2831

32+
.contact-form textarea:focus::placeholder,
2933
.contact-form input:focus::placeholder {
3034
opacity: 0.3;
3135
}

src/modules/form/view.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,11 @@ const toggleImageOptionInput = ( input, optionElement ) => {
170170
}
171171
};
172172

173+
const stripHtml = html => {
174+
const doc = new DOMParser().parseFromString( html, 'text/html' );
175+
return doc.body.textContent || '';
176+
};
177+
173178
const { state, actions } = store( NAMESPACE, {
174179
state: {
175180
validators: {},
@@ -301,7 +306,7 @@ const { state, actions } = store( NAMESPACE, {
301306
if ( field.error && field.error !== 'yes' ) {
302307
errors.push( {
303308
anchor: '#' + field.id,
304-
label: field.label + ' : ' + getError( field ),
309+
label: stripHtml( field.label ) + ': ' + getError( field ),
305310
id: field.id,
306311
} );
307312
}

0 commit comments

Comments
 (0)