Help - Search - Members - Calendar
Full Version: problem with skip entry links (accessibility)
Movable Type Community Forum > Additional Resources > Tips and Tricks
cobra libre
On my front page after each entry I have a hidden comments form that can be toggled on with Javascript. This is nice for people with visual browsers, but it might be annoying for users with text-to-speech browsers or text-mode browsers, so I added a link after each entry that skips you to the next entry:

CODE
<MTEntryPrevious>
<p class="jump">
Skip to <a href="#entry-<$MTEntryID pad="1"$>">next entry</a>.
</p>
</MTEntryPrevious>


I generally keep three entries up at a time on the front page. The problem here is that the third entry will have a skip link that points to a nonexistent anchor! Can some kind person think of a way to make that final skip link not appear?

(To see what I'm talking about, you could view the source to my blog, or look at it using lynx...)

Thanks in advance for any help!
kadyellebee
Well, you could use the offset value in MTEntries container to control this - you'd change your lastn to "2" in your current MTEntries container and then duplicate another container below it with
CODE
<MTEntries lastn="1" offset="2">
and without the "skip" code.

I'm sure there are other ways to do it, but that's the first one that came to mind smile.gif

Kristine
staggernation
This is a little silly, but you could use
CODE
<MTEntriesFooter><!--</MTEntriesFooter>

before the jump link, and
CODE
<MTEntriesFooter>--></MTEntriesFooter>

after it. That way the link would be commented out for the last entry...
cobra libre
Sincere thanks to both of you for the clever solutions!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.