• Hello,

    I’m currently trying to use the customization of the read more link, but when my link is displayed, there is no title attribute (for accessibility).

    The only way I have found to add it is to modify the get_the_content() in the post-template.php(line 228) like this :

    $output .= apply_filters( ‘the_content_more_link’, ‘ $more_link_text“, $more_link_text );

    [older version :

    $output .= apply_filters( ‘the_content_more_link’, ‘ $more_link_text“, $more_link_text );]

    It is a bug ? or by design ?

    And how can i add the title attribute to my links without modify the wordpress core ?

    another way i had found to modify mmy links is to put a blank line as more_text in the the_content() function and create a link by hand with the_permalink() function.
    But to my mind it’s a kind of hack !!

    Thanks for your help

Viewing 1 replies (of 1 total)
  • there is no title attribute (for accessibility)

    The title attribute generally offers absolutely no accessibility benefit whatsoever. Sighted keyboard navigators and switch users won’t ever see it (it’s mouse-only) whilst JAWS (the most popular screenreader) is configured to be ‘non-verbose’ by default (ie will ignore the title attribute). Experienced screen readers rarely configure their software to announce the attribute as it’s so commonly mis-used by site owners who mistake keyword stuffing for SEO – so just produces “unwanted noise” rather than “signal”.

    So, bottom line, you can’t use the title attribute to as some sort of “get out of accessible jail free” card because you also have 12 identical “read more” links on a page. Those 12 links will still fail the relevant WCAG guideline – even with unique title attributes. Far better to use something like:

    ?php the_content('Continue reading ' . the_title('', '', false)); ?>

Viewing 1 replies (of 1 total)
  • The topic ‘title attribute on read more link’ is closed to new replies.