-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Regression: Post Title block doesn't support paragraph; level:"0" results in <h0> elements #53594
Comments
Hi, I personally wanted this to be supported, but it was downvoted in discussions, for accessibility reasons: |
I tested it with WordPress 6.2.2, and there are indeed no paragraph in the Post Title block dropdown, so I don't think it could be a paragraph block unless you intentionally set the Also, I think it was easy to notice that this was not the intent, because if In WordPress 6.3, it renders as Therefore, I think it would be a good idea to add a process to migrate blocks with |
Based on the discussion, the UI has never allowed the selection of level 0. So, I suppose it's not a migration that core needs to include for every site. It appears that websites depending on manually altering an attribute to level 0 in the code editor should implement this kind of migration that's specific to them. If that's the case, can we close the issue? |
It's been about ~9 months since the page in question was made, so I cannot fully remember either. If I did it manually, I'm almost positive that all I did was change I'm with @carolinan and others wishing this were supported, ironically for accessibility reasons so I can have a post template (on the home page) referencing the post title which is not the Note: The site title block still supports the I suppose we could close this as a duplicate of #30549. What gives me pause is that it just feels weird that this was explicitly supported in the code for multiple versions of WordPress. I understand there wasn't a UI for it, but does that mean that any undocumented attribute is considered experimental unless there's any explicit UI for it? Could the support for the Pardon me for all the thinking out loud here. I'll follow the consensus, but it would just be nice to understand the precedents. |
Help us move this issue forward. This issue is being marked stale since it has no activity after 15 days of requesting more information. Please add info requested so we can help move the issue forward. Note: The triage policy is to close stale issues that need more info and no response after 2 weeks. |
With no further discussion on this issue - and no additional reports, I will close it. If we receive more reports in the future we can open once again. |
@jordesign The other day I ran into a very real use-case for this feature. I'd love to hide the Latest Post block on my sites and instead use the Query Block as a replacement. However, since the Post Title must always be a heading, it's actually impossible to use it as a like-for-like replacement if I want to make a stripped down list of posts, e.g.: <ul>
<li><a href="">{Post Title}</a></li>
<li><a href="">{Post Title}</a></li>
<li><a href="">{Post Title}</a></li>
</ul> It's possible that a "Level 0" isn't exactly the right solution for this use-case, but it definitely once-again raises the need for an option to use the Post Title block without the heading markup. |
@jordesign Still hoping to get this re-opened. As another point in favor of supporting a non-heading markup option, @afercia just pointed out on #50402 that the Site Title block does still offer a Paragraph option in the heading selector. |
Description
Previously, the Post Title block offered the option to display the post title in a paragraph tag. It appears that this was removed in 6.3 (also here) as part of the work to pull the HeadingLevelDropdown into its own component. Given that the component supports a paragraph tag when
level: "0"
, I don't understand why this was removed.I have a site using a Post Title block with
level: "0"
. In 6.2, it outputs a paragraph. In 6.3, it creates anh0
element that results in some styling issues for us. Notably, the block doesn't appear to have any validation issues, I think because0
is expected as a supported value of thelevel
attribute (as it should be).Given that this was previously supported and produces an invalid HTML element, this feels like a fairly urgent issue worth addressing in a point release.
Tagging the three people who worked on the relevant commit in hopes of gaining some context: @carolinan, @geriux, @Mamaduka
Step-by-step reproduction instructions
<!-- wp:post-title {"level":0} /-->
into post editor<h0>
elements around the Post TitleScreenshots, screen recording, code snippet
No response
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
No
The text was updated successfully, but these errors were encountered: