Post Comments Form: Make heading customizable #43681
Labels
[Block] Post Comments Form
Affects the Comments Form Block
Needs Design Feedback
Needs general design feedback.
[Status] In Progress
Tracking issues with work in progress
[Type] Enhancement
A suggestion for improvement.
What problem does this address?
Required to fix #43203. Quoting the most relevant part:
While TT2 uses the (legacy) Post Comments block, a similar issue applies to block themes that use the (newer) Comments block, which in turn uses the Comments Title and Post Comments Form block: While the Comments Title block ("One response to...") allows customization of the heading level (and defaults to H2), the Post Comments Form block is a thin wrapper around the
comment_form()
function (docs). While that function supports customization of the heading, it is not currently exposed via block controls, and defaults to H3. This means that there still is an a11y issue for posts that don't have any comments posted (yet):H1 Sample Page
H3 Leave a reply
What is your proposed solution?
As discussed in WordPress/wordpress-develop#3136 (comment): Make the Post Comments Form block heading level customizable.
The required code change for the frontend is pretty simple:
Note that in the long run, we plan to turn the "monolithic" Post Comments Form block into a "composable" block with child blocks such as Comment Author Field, Comment Content field, etc (#38107) -- much like we've already done when introducing the Comments block as a replacement for the Post Comments one. However, there's no ETA for this, and we might want to offer this basic customization of the heading level already.
IMO, the big question is if it's weird to have "only" one (somewhat random?) customization option on the Post Comments Form block -- and if it's weird to have a heading level control on a block that's more than just a heading. Curious to hear our designers' thoughts 😄
The text was updated successfully, but these errors were encountered: