WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: How Do I Display The Word Visited On A Link

for

From: Christian Heilmann
Date: Apr 12, 2006 2:30AM


> Alternately, something like this:
> >
> > <a href="url">link text<span class="vnote">visited</span></a>
> >
> > And these CSS rules:
> >
> > a:link .vnote { display: none; }
> > a:visited .vnote { display: inline; }
> >
> > This should work with most assistive technologies and all modern
> > browsers that support CSS. It won't work for lynx, though.
>
> D'oh! Why didn't I think of that...? That's a nice bit of lateral
> thinking, Kynn. Sometime's one can get too bogged down in the specs to
> see the more-widely-supported solution...

I don't know. The CSS solution only _generates_ the text when the link
_really_ is visited, this version applies it to any link and then
relies on the screen reader not to read out elements with
display:none. While the CSS version is not supported by older browsers
it _is_ the more appropriate solution, and the other one is a hack
mixing structure and content with presentation. Furthermore, the
latter version requires maintenance both in every page and in the CSS,
the former only means you need the style sheet.

--
Chris Heilmann
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/
Binaries: http://www.onlinetools.org/