-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Search block: Add space between attributes when using "Button only" option #61399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Related: #58943 |
|
Hi |
|
Thanks for adding the labels. Steps:
|
|
refreshed after #62160 |
|
Hi, I followed the test instructions but I am not able to reproduce the missing space in the markup, using Gutenberg trunk. |
|
I don't have trunk, but it still happens for me in Gutenberg 18.6.1 and the trunk file has not changed since then. To reduce confusion in the instructions, I emphasized "view source" because the similar "inspect element" browser tool would add the spaces. |
|
The I tried setting the block to "Button only" in Twenty Twenty-Five's search template, and this is the markup with an empty search query: Firefox can show warnings about the lack of space when viewing the page source. For the screenshot below, I switched to the Light theme and turned off Syntax Highlighting, but I highlighted the |
|
I am not able to re-run the tests. 🤔 |
Add space between attributes in the markup of the search block, to ensure that the HTML is valid.
Add space between attributes in the markup of the search block, to ensure that the HTML is valid.

What?
Attributes in the expandable Search block start tag need to be separated.
Why?
Without spaces, the HTML does not pass validation.
How?
In addition to spaces, this includes line breaks around
$form_contextso the attributes are indented the same.Screenshots or screencast
Invalid output in WordPress 6.5 (no plugins):
