An Unfinished Symphony

It's about the internet and stuff.

More accessible 'more' links

Visit most blogs, including those of accessibility minded web designers, and at some point you'll stumble upon a "more" link. These are links to the full version of excerpted posts which allow bloggers to reduce the volume of text on their home pages. In theory they're a great idea, in practice though they're poorly implemented from an accessibility standpoint. The WAI's guidelines state that link text should be meaningful enough to make sense when read out of context, clearly something that "more" fails to do. Also, as is mentioned in the WCAG recommended techniques for writing link text, if more than one link on a page shares the same link text, all those links should point to the same resource – once again, something that "more" generally fails to do.

The problem is, though, that these links and their associated link text are added by the blog software rather than the blogger, and the code running behind the scenes that makes this happen is very often a mystery to the average blogger. Considering the current trend for focusing on accessibility it may be worthwhile for blog software developers to modify this feature. In the case of wordpress, the software used on this site, it was quite easy to adapt the feature to use more appropriate link text than its version of "more" – thanks to a helping hand from Sarah who analysed the template functions files and found a way to achieve what I wanted – which was to have the "more" link include the article's title in the link text.

If this is something that you'd like to implement on your own wordpress blog you need to edit the template-functions-post.php file located in the wp-includes directory. To do so you need to locate line 86 and replace the existing code found there with the following:

  1. $output.='<a href="'. get_permalink().
  2. "#more-$id\">$more_link_text". get_the_title()."</a>";
Up arrow

Comments on 'More accessible 'more' links'

RSS feed for comments on this post.

gravatar
Toxie says:

Or you can change the_content tag in the index

post_title &raquo;'); ?&gt;

gravatar
Toxie says:

Of course that should be

&lt;?php the_content('Read the rest of $post-&gt;post_title &raquo;'); ?&gt;

gravatar
Toxie says:

Ah fuck it, it works OK on mine 😛

gravatar

Will that still post any of the content or just the post title?

gravatar
Kev says:

Finally! A Hurricane blog ;o)

Its about bloody time. Do I get a prize for the first off-topic comment?

gravatar

[…] To put it plainly and with all false modesty aside, ol' H is smarter than a bag of spanners at the technical side of things like accessibility, standards and CSS. In fact he cares so much he's fully prepared to (sort of) launch his new blog in an unfinished state presumably so he can further the concept of a live re-design to a live start up . […]

gravatar
Sarah says:

< ?php the_content('Read the rest of this entry: '.get_the_title().' &raquo;'); ?>

will work. I don't believe post_title() is a defined function.

gravatar
Toxie says:

the_content(\"Read more on...$post-&gt;post_title &#187;\");

gravatar

Well all that code nonsense aside, the message is the same 🙂

Sorry, the comment form is closed at this time.