WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Use of title attribute in links

for

From: Holly Marie
Date: Jan 6, 2003 10:49AM



----- Original Message -----
From: "Jukka K. Korpela" < <EMAIL REMOVED> >

> 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.

Not meaning to further rain on any parade here... when using javascript to
pop up such pieces, it is also very important to include the device
independent event handlers[associated mouseless actions] ...
.onClick(onclick), for instance does not work for someone using a keyboard,
tabbing, pointing, or other device.... so this issue also needs to be
addressed.

=== How To make more accessible Event Handlers ==
Quoted information below is From:
12.4 Directly accessible scripts
<http://www.w3.org/TR/WCAG10-HTML-TECHS/#directly-accessible-scripts>;

An event handler is a script that is invoked when a certain event occurs
(e.g, the mouse moves, a key is pressed, the document is loaded, etc.). In
HTML 4.01, event handlers are attached to elements via ** event handler
attributes (the attributes beginning with "on", as in "onkeyup").
Some event handlers, when invoked, produce purely decorative effects such as
highlighting an image or changing the color of an element's text. Other
event handlers produce much more substantial effects, such as carrying out a
calculation, providing important information to the user, or submitting a
form. For event handlers that do more than just change the presentation of
an element, content developers should do the following:

(** Event handler attributes:
onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress,
onkeyup, onload, onload, onmousedown, onmousemove, onmouseout, onmouseover,
onmouseup, onreset, onselect, onsubmit, onunload )

1. Use application-level event triggers rather than user interaction-level
triggers. In HTML 4.01, application-level event attributes are "onfocus",
"onblur" (the opposite of "onfocus"), and "onselect". Note that these
attributes are designed to be device-independent, but are implemented as
keyboard specific events in current browsers.

2. Otherwise, if you must use device-dependent attributes, provide redundant
input mechanisms (i.e., specify two handlers for the same element):

[*] Use "onmousedown" with "onkeydown".
[*] Use "onmouseup" with "onkeyup"
[*] Use "onclick" with "onkeypress"
Note that there is no keyboard equivalent to double-clicking
("ondblclick") in HTML 4.01.

3. Do not write event handlers that rely on mouse coordinates since this
prevents device-independent input.

[end quoted]

Also see: 12 Scripts
<http://www.w3.org/TR/WCAG10-HTML-TECHS/#scripts>;
for more scripting information and accessibility.


holly


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