WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Use of title attribute in links

for

From: Jukka K. Korpela
Date: Jan 5, 2003 12:52PM


On Sun, 5 Jan 2003, Ruth Stillman wrote:

> I am in the process of retro-fitting an application for a client so that
> it meets P1 and P2 accessibility. One of the biggest issues I have found
> is that the application uses a lot of javascript pop-ups for help text,
> glossary, etc.

The best approach is to replace them by normal links. But if such
accessibility is unacceptable, for some reason, then you could turn the
JavaScript surrogates for links to real links with optional JavaScript
handlers. Schematically, instead of
<a href="javascript:foo()">
you would have
<a href="useful.html" onclick="foo();return false">

This would address the issue of being useable at all when client side
scripting is not supported, or has been disabled.

The popup would still be a problem. See the note about the best approach
above.

Technically, Guideline 10.1 is ambiguous (rather paradoxically):
"Until user agents allow users to turn off spawned windows, do not cause
pop-ups or other windows to appear and do not change the current window
without informing the user."
Does "without informing the user" apply to all the preceding rules, or
just the last one (about changing current window)?

> Is it possible to use the title attribute to alert users
> to the fact that the link will open in a new window?

In a sense it is, but
a) that's not what title means, really - it should be an advisory
title for an element or a resource, not a warning about some
events; and, more seriously,
b) there is no requirement that the title attribute value be presented
to the user, or even used in any wat; and not all browsers support
it at all, and those that do, do it rather poorly - in particular,
they show the text for a short time only, creating one of the
problems we're trying to avoid.

If you read Guideline 10.1, questionably, as prohibiting popups only if
the user is not informed, then the reasonable approach is to include the
information into the page as its normal content. Such as
<noscript>
On JavaScript-enabled browsers, links on this page will open in a new
window.
</noscript>
at the _beginning_ of the page (before the first link).


--
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/


----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/