Change record status: 
Project: 
Introduced in branch: 
8.x
Description: 

In Drupal 7 and earlier, the only indication of comment parent/child relationships is the visual indentation (or "nesting") of child comments, and the information is not available to screen readers. For better accessibility, Drupal 8 introduces a $parent template variable that includes the title and poster of the parent comment on each comment, e.g.:

In reply to <a href="/comment/13#comment-13">Example Comment</a> by <a href="/user/5" title="View user profile.">Example user</a>

Themes that override the comment template should print this variable to ensure that comment nesting is accessible to screen readers. The text can either be displayed to all users (similarly to the "submitted by" information) or hidden with the element-invisible CSS class.

Example

To print the accessible link in your mytheme comment template, add the following to mytheme/templates/comment.tpl.php:

<?php
  // Indicate the semantic relationship between parent and child comments
  // for accessibility. The list is difficult to navigate in a screen
  // reader without this information.
  if ($parent):
?>
    <p class="comment-parent element-invisible">
      <?php print $parent; ?>
    </p>
  <?php endif; ?>
Impacts: 
Module developers
Themers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Not done