Commit b7bcc866 authored by webchick's avatar webchick

#49428 by levavie, mgifford, joachim, et al: Include node title in 'Read more'...

#49428 by levavie, mgifford, joachim, et al: Include node title in 'Read more' link for better accessibility and SEO
parent f9c40ea5
......@@ -1349,10 +1349,12 @@ function node_build_content($node, $view_mode = 'full', $langcode = NULL) {
'#attributes' => array('class' => array('links', 'inline')),
);
if ($view_mode == 'teaser') {
$node_title_stripped = strip_tags($node->title);
$links['node-readmore'] = array(
'title' => t('Read more'),
'title' => t('Read more<span class="element-invisible"> about @title</span>', array('@title' => $node_title_stripped)),
'href' => 'node/' . $node->nid,
'attributes' => array('rel' => 'tag', 'title' => strip_tags($node->title))
'html' => TRUE,
'attributes' => array('rel' => 'tag', 'title' => $node_title_stripped),
);
}
$node->content['links']['node'] = array(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment