WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: title attributes on <a> and <img> elements

for

Number of posts in this thread: 3 (In chronological order)

From: Leo Smith
Date: Fri, Nov 01 2002 8:34AM
Subject: title attributes on <a> and <img> elements
No previous message | Next message →

I have been experimenting with adding title attributes to <a> and
<img> elements to provide more information to the user.

Such information appears as a tooltip in browsers that support the
title attribute for <img> and <a>.

The concern I have about using title is what will the screen reader
announce? I did some testing with JAWS 4.

It is possible to adjust the software's settings so that it will
announce title attributes on an <a> element: "Speak ALT tag or
title" for text links Verbosity.

However, JAWS will only read the title attribute but *not* the link
text contained in the <a> element, in this case.

In the case of <img> elements, JAWS will speak title attribute
information rather than alt attribute information when both are
included.

For <input> elements, JAWS will announce the ALT text
infomation and not any title attribute information when both are
included in the tag.

Therefore, using title attributes may cause those using JAWS to
miss essential information. In the case of using title attributes for
textual links, I suppose as long as the title information includes
and expands upon the link text, no information is lost, but in the
case of <img> elements, not hearing the ALT text in preference to
the title information may be a real problem.

Have others noticed this behavior, and does anybody have any
suggestions/comments?

Leo.

Leo Smith
Web Designer/Developer
USM Office of Publications and Marketing
University of Southern Maine
207-780-4774


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


From: John Foliot - bytown internet
Date: Fri, Nov 01 2002 9:01AM
Subject: RE: title attributes on <a> and <img> elements
← Previous message | Next message →

Leo,

AFAIK this is in fact "proper" behaviour. As an added note, the gecko
family of browsers (Mozilla, Netscape 6.x +, etc.) will not provide the
"tool tip" behaviour on an ALT attribute... you MUST use the Title attribute
if you wish to "see" this behaviour.

>
> Therefore, using title attributes may cause those using JAWS to
> miss essential information. In the case of using title attributes for
> textual links, I suppose as long as the title information includes
> and expands upon the link text, no information is lost,

Correct, in fact with the trend towards one word hyperlinks on web pages,
the proper use of of Title Attributes on these links will provide more
contextual information to users who may be previewing a page by a list of
links only ( a common and useful feature avialable in JAWs for example).
Also, if someone "hovers" over the link, it will provide that tooltip...
again, more contextual information about the link - arguably a benefit for
users with cognative disabilities. See: http://www.zaphodbeeblebrox.com/
From the home page there are a number of links to expand upon various Press
Releases. The client wanted to simply indicate "[More...]" to read more
about the article. However, with multple links to "More" they would not
make sense contextually, nor would they pass "Bobby" (not a favorite of
mine, but hey...). The solution I came up with takes advantage of the
"problem" you note.
(NOTE: no bricks on the current "issues" with this site... I am aware of
them but I could only win so many battles...)


> but in the
> case of <img> elements, not hearing the ALT text in preference to
> the title information may be a real problem.
>

Why? Proper and thoughtful development can avoid any problems here... at
the least repeat the ALT text as the Title text.

> For <input> elements, JAWS will announce the ALT text
> infomation and not any title attribute information when both are
> included in the tag.

Huh? Use the Label and ID elements/attributes for form inputs, not title.

JF


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


From: Leo Smith
Date: Mon, Nov 04 2002 12:04PM
Subject: RE: title attributes on <a> and <img> elements
← Previous message | No next message

<snip1> but in the
case of <img> elements, not hearing the ALT text in preference to
the title information may be a real problem.</snip1>

<snip2>Why? Proper and thoughtful development can avoid any
problems here...
at the least repeat the ALT text as the Title text.</snip2>

Taking the example of text as images, this could result in some
fairly long (and somewhat redundant) tooltip text, if both the alt text
and the extra information is provided in the title attribute. However,
there doesn't seem to be any other way around it: it is imperative
that the screen reader announce the alt text, so if this means
duplicating the alt text in the title attribute when a developer is
wanting to provide extra information to the user through title, I
guess so be it.


<snip3> For <input> elements, JAWS will announce the ALT text
> infomation and not any title attribute information when both are
> included in the tag.</snip3>
<snip4>Huh? Use the Label and ID elements/attributes for form
inputs, not title.</snip4>

the title attribute is actually a very clean and efficient way of
labeling form elements of the type <input>: HPR, JAWS and
Windows-Eyes will read it.

In the case above that I was describing, I should have been more
specific, however. I was testing using a title attribute on an <input
type="image"> as a way of providing extra info about the button: if
a submit button image is "Go" and so too is the ALT text, then
adding title="click the GO button to sumbit your entry/go directly to
that page/search on the terms you have provided" might be useful
to some users. In this case JAWS only speaks the ALT text, and
not the title attribute's information. The tooltip does display the title
information though, and so visual users will get the extra cue.

Leo.





Leo Smith
Web Designer/Developer
USM Office of Publications and Marketing
University of Southern Maine
207-780-4774


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