diff --git a/core/modules/comment/src/Tests/CommentNonNodeTest.php b/core/modules/comment/src/Tests/CommentNonNodeTest.php
index 54c6630..68f32f1 100644
--- a/core/modules/comment/src/Tests/CommentNonNodeTest.php
+++ b/core/modules/comment/src/Tests/CommentNonNodeTest.php
@@ -188,7 +188,7 @@ function postComment(EntityInterface $entity, $comment, $subject = '', $contact
   function commentExists(CommentInterface $comment = NULL, $reply = FALSE) {
     if ($comment) {
       $regex = '/' . ($reply ? '<div class="indented">(.*?)' : '');
-      $regex .= '<a id="comment-' . $comment->id() . '"(.*?)';
+      $regex .= '<article(.*?)id="comment-' . $comment->id() . '"(.*?)';
       $regex .= $comment->getSubject() . '(.*?)';
       $regex .= $comment->comment_body->value . '(.*?)';
       $regex .= '/s';
diff --git a/core/modules/comment/src/Tests/CommentPagerTest.php b/core/modules/comment/src/Tests/CommentPagerTest.php
index bfda400..a03cfb4 100644
--- a/core/modules/comment/src/Tests/CommentPagerTest.php
+++ b/core/modules/comment/src/Tests/CommentPagerTest.php
@@ -186,7 +186,7 @@ function assertCommentOrder(array $comments, array $expected_order) {
       $expected_cids[] = $comments[$key]->id();
     }
 
-    $comment_anchors = $this->xpath('//a[starts-with(@id,"comment-")]');
+    $comment_anchors = $this->xpath('//article[starts-with(@id,"comment-")]');
     $result_order = array();
     foreach ($comment_anchors as $anchor) {
       $result_order[] = substr($anchor['id'], 8);
diff --git a/core/modules/comment/src/Tests/CommentTestBase.php b/core/modules/comment/src/Tests/CommentTestBase.php
index 17eccb9..dde193e 100644
--- a/core/modules/comment/src/Tests/CommentTestBase.php
+++ b/core/modules/comment/src/Tests/CommentTestBase.php
@@ -191,7 +191,7 @@ public function postComment($entity, $comment, $subject = '', $contact = NULL, $
    */
   function commentExists(CommentInterface $comment = NULL, $reply = FALSE) {
     if ($comment) {
-      $comment_element = $this->cssSelect('.comment-wrapper ' . ($reply ? '.indented ' : '') . '#comment-' . $comment->id() . ' ~ article');
+      $comment_element = $this->cssSelect('.comment-wrapper ' . ($reply ? '.indented ' : '') . 'article#comment-' . $comment->id());
       if (empty($comment_element)) {
         return FALSE;
       }
diff --git a/core/modules/comment/src/Tests/CommentThreadingTest.php b/core/modules/comment/src/Tests/CommentThreadingTest.php
index 14db3cc..9b7f702 100644
--- a/core/modules/comment/src/Tests/CommentThreadingTest.php
+++ b/core/modules/comment/src/Tests/CommentThreadingTest.php
@@ -140,7 +140,7 @@ protected function assertParentLink($cid, $pid) {
     //     <a href="...comment-1"></a>
     //   </p>
     //  </article>
-    $pattern = "//a[@id='comment-$cid']/following-sibling::article//p[contains(@class, 'parent')]//a[contains(@href, 'comment-$pid')]";
+    $pattern = "//article[@id='comment-$cid']//p[contains(@class, 'parent')]//a[contains(@href, 'comment-$pid')]";
 
     $this->assertFieldByXpath($pattern, NULL, format_string(
       'Comment %cid has a link to parent %pid.',
@@ -164,7 +164,7 @@ protected function assertNoParentLink($cid) {
     //   <p class="parent"></p>
     //  </article>
 
-    $pattern = "//a[@id='comment-$cid']/following-sibling::article//p[contains(@class, 'parent')]";
+    $pattern = "//article[@id='comment-$cid']//p[contains(@class, 'parent')]";
     $this->assertNoFieldByXpath($pattern, NULL, format_string(
       'Comment %cid does not have a link to a parent.',
       array(
diff --git a/core/modules/comment/src/Tests/CommentTitleTest.php b/core/modules/comment/src/Tests/CommentTitleTest.php
index dd1c97a..d0dd002 100644
--- a/core/modules/comment/src/Tests/CommentTitleTest.php
+++ b/core/modules/comment/src/Tests/CommentTitleTest.php
@@ -35,7 +35,7 @@ public function testCommentEmptyTitles() {
     $comment_text = $this->randomMachineName();
     $comment = $this->postComment($this->node, $comment_text, $subject_text, TRUE);
     // Confirm that the comment was created.
-    $regex = '/<a id="comment-' . $comment->id() . '"(.*?)';
+    $regex = '/<article(.*?)id="comment-' . $comment->id() . '"(.*?)';
     $regex .= $comment->comment_body->value . '(.*?)';
     $regex .= '/s';
     $this->assertPattern($regex, 'Comment is created successfully');
diff --git a/core/themes/classy/templates/content/comment.html.twig b/core/themes/classy/templates/content/comment.html.twig
index a4f7229..c0924b7 100644
--- a/core/themes/classy/templates/content/comment.html.twig
+++ b/core/themes/classy/templates/content/comment.html.twig
@@ -76,7 +76,7 @@
     author_id and author_id == commented_entity.getOwnerId() ? 'by-' ~ commented_entity.getEntityTypeId() ~ '-author',
   ]
 %}
-<article{{ attributes.addClass(classes) }}>
+<article{{ attributes.addClass(classes) }} id="comment-{{ comment_id }}">
   {#
     Hide the "new" indicator by default, let a piece of JavaScript ask the
     server which comments are new for the user. Rendering the final "new"
diff --git a/core/themes/stable/templates/content/comment.html.twig b/core/themes/stable/templates/content/comment.html.twig
index ffc1d9c..4d3258d 100644
--- a/core/themes/stable/templates/content/comment.html.twig
+++ b/core/themes/stable/templates/content/comment.html.twig
@@ -65,7 +65,7 @@
  */
 #}
 
-<article{{ attributes.addClass('js-comment') }}>
+<article{{ attributes.addClass('js-comment') }} id="comment-{{ comment_id }}">
   {#
     Hide the "new" indicator by default, let a piece of JavaScript ask the
     server which comments are new for the user. Rendering the final "new"
