You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Comments Title & Comments Form: HTML anchor is ignored because the block already outputs an id #86800
#74183 added anchor support to the Comments Title and Comments Form blocks, but both already output an id on the same element, so the anchor creates a duplicate id and browsers ignore it:
Comments Form gets id="respond" from comment_form(): <div id="respond" class="comment-respond wp-block-post-comments-form" id="my-anchor">ref
Letting the anchor replace these IDs perhaps won't be good: #comments is linked to by get_comments_link(), comments_popup_link() and the Comments Count Link block, and #respond is used by get_comments_link() and by comment-reply.js to move the form when replying.
Proposed fix: remove anchor support from both blocks. The anchor has never worked on them, and the parent Comments block's anchor can be used instead.
Step-by-step reproduction instructions
Open single posts template
Give anchors to Comments Title block & Comments Form block
To a test post, post a comment so the comment title is visible
Open the post page in chrome & press Cmd + Opt + U or the view source option in devtools to view the outputted HTML (parsed HTML in devtools gets rid of duplicate ID)
Check the id attribute showing up twice.
Screenshots, screen recording, code snippet
Environment info
Gutenberg trunk via wp-env
Using default Ipsum theme
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
Please confirm which theme type you used for testing.
changed the title [-]Comments Title and Comments Form: HTML anchor is ignored because the block already outputs an `id`[/-][+]Comments Title & Comments Form: HTML anchor is ignored because the block already outputs an `id`[/+]on Nov 13, 2026
Activity
[-]Comments Title and Comments Form: HTML anchor is ignored because the block already outputs an `id`[/-][+]Comments Title & Comments Form: HTML anchor is ignored because the block already outputs an `id`[/+]