Support » Developing with WordPress » Cancel comment reply link in comments form

  • Resolved Guido

    (@guido07111975)


    Hi,

    About the comments form.. In most themes there’s no space anymore between “A WordPress Commenter” and the label of the Cancel comment reply link:
    “Reply to A WordPress CommenterCancel reply”.

    Some themes such as TwentyTwenty have added some margin-left, but most themes have not. So guess something has changed in core? Is this something new or just a bug that will be fixed in upcoming release of WP? Any ideas?

    Guido

Viewing 7 replies - 1 through 7 (of 7 total)
  • Joy

    (@joyously)

    I didn’t notice this until now.
    When I look at my test site that is on WP 5.2.7, it looks fine, and the markup has aria-label="Reply to A WordPress Commenter" and some other data- attributes.
    But on WP 5.5.1, the same aria-label is there next to an additional data-replyto="Reply to A WordPress Commenter" so there must have been a change, and that change leaves out the space.
    I think it’s a good case for a ticket, which you can write at https://core.trac.wordpress.org/
    You might want to search for the ticket where the change was introduced, to reference it.

    Guido

    (@guido07111975)

    Hi Joy,

    No aria label here, when I look in TwentyTwenty this is the code:

    
    <h3 id="reply-title" class="comment-reply-title">Reply to A WordPress Commenter<small><a rel="nofollow" id="cancel-comment-reply-link" href="/hello-world/#respond" style="">Cancel reply</a></small></h3>
    

    It’s generated in file comment-template so will take a look at the current one and one from previous WP versions.. There must be something changed.

    Guido

    Joy

    (@joyously)

    Apparently, you are looking at the code that the script generates, whereas I’m looking at it before that.
    It’s still different than it used to be, so the change has a problem to be fixed.

    Guido

    (@guido07111975)

    Hi Joy,

    I now see what you mean. But I think it’s caused by something else. Besides that no related changes in that file.

    I have checked WP 5.1.6 till current version and there’s something I don’t understand. In all versions of file comment-template there’s a whitespace before the Cancel reply label 'cancel_reply_before' => ' <small>', but somehow this is being ignored.

    Guido

    Joy

    (@joyously)

    Changes could be in filters (which are in different files), or in the Javascript (which is likely because of the new data- attribute).
    I think they changed the script, and the space went missing (either due to a trim function or translation change or ?).

    Guido

    (@guido07111975)

    Hi Joy,

    Have created a ticket.

    Guido

    Joy

    (@joyously)

    I saw that ticket in Slack, and came here to make sure it was noted.
    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.