Problem/Motivation
Since Drupal 7, the "Read more" links added by the core on the nodes teasers have been made accessible by appending them a visually-hidden indication of the node title to read more about. The same thing should be done on the "Add new comment" and "@count comments" links provided by the comment module.
This is important because screen readers users sometime navigate by jumping from link to link. If the links titles are such generic, they have no clue about where they are going to land.
Steps to reproduce
- Install Drupal standard
- Create an article, published ans promoted to front page, with title "Blah"
- Go to your article and add a comment
- Have a look at your front page source code
Expected result: <a href="/node/1#comments" title="Jump to the first comment." hreflang="en">1 comment<span class="visually-hidden"> on Blah</span></a>
and <a href="/node/1#comment-form" title="Share your thoughts and opinions." hreflang="en">Add new comment<span class="visually-hidden"> about Blah</span></a>
Current result: <a href="/node/1#comments" title="Jump to the first comment." hreflang="en">1 comment</a>
and <a href="/node/1#comment-form" title="Share your thoughts and opinions." hreflang="en">Add new comment</a>
Proposed resolution
Use the same trick than "Read more" links.
Remaining tasks
Task | Novice task? | Contributor instructions | Complete? |
---|---|---|---|
Create a patch | Instructions | Done | |
Add automated tests | Instructions | ||
Manually test the patch | Novice | Instructions | |
Add steps to reproduce the issue | Novice | Instructions | Done |
Embed before and after screenshots in the issue summary | Novice | Instructions | |
Review patch to ensure that it fixes the issue, stays within scope, is properly documented, and follows coding standards | Instructions |
User interface changes
Nothing visual. Screen readers are going to find more context on "Add new comment" and "@count comments" links.
API changes
None.
Data model changes
None.