WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: client using title instead of alt on image.

for

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

From: Despain, Dallas
Date: Thu, Apr 01 2010 9:48PM
Subject: client using title instead of alt on image.
No previous message | Next message →

A client has an image (with text) for a website banner and instead of putting alt text on the image, they have used the title attribute (title="text of image"). I know it's a bad idea, but how do I best explain it to the client? I tested in JAWS 10/11 with both Firefox 3.6 and IE 8. In all my tests the banner was announced correctly. Are there other reasons I can use to explain why this is a bad idea? Do older screen readers have problems with this?



Thanks,

Dallas

From: Dean Hamack
Date: Thu, Apr 01 2010 9:51PM
Subject: Re: client using title instead of alt on image.
← Previous message | Next message →

I could be wrong, but I don't think it's valid markup to use a title on an
image. Run it through a validating tool and see.


On 4/1/10 7:47 PM, "Despain, Dallas" < = EMAIL ADDRESS REMOVED = > wrote:

> A client has an image (with text) for a website banner and instead of putting
> alt text on the image, they have used the title attribute (title="text of
> image"). I know it's a bad idea, but how do I best explain it to the client? I
> tested in JAWS 10/11 with both Firefox 3.6 and IE 8. In all my tests the
> banner was announced correctly. Are there other reasons I can use to explain
> why this is a bad idea? Do older screen readers have problems with this?
>
>
>
> Thanks,
>
> Dallas
>

From: Jukka K. Korpela
Date: Thu, Apr 01 2010 11:27PM
Subject: Re: client using title instead of alt on image.
← Previous message | Next message →

Dean Hamack wrote:

> I could be wrong, but I don't think it's valid markup to use a title
> on an image. Run it through a validating tool and see.

Why didn't _you_ run it through a validator?

>> A client has an image (with text) for a website banner and instead
>> of putting alt text on the image, they have used the title attribute
>> (title="text of image"). I know it's a bad idea, but how do I best
>> explain it to the client?

It depends on the client. The use of an alt attribute is a very basic, very
primitive, very often misunderstood and misrepresented point in
accessibility. But it depends on the client what matters to him. You might
even be able to cite a requirements document that he must satisfy due to
something imposed on him.

Although the use of a title attribute surely does not make a document
invalid, the lack of an alt attribute surely does. But that, as such, is
just a formal point.

You might draw the client's attention to various reasons for using the alt
attribute, see
http://www.cs.tut.fi/~jkorpela/html/alt.html#reasons

(It's a very limited point of view to consider only what happens on
speech-based user agents that you know of. The alt attribute had a point
long before any such user agents existed.)

The odds are that if you need to specifically explain this point to a
client, you will have hard time with other, more difficult aspects of
accessibility. After all, it costs virtually nothing to add alt attributes
if you already have title attributes that work reasonably as textual
replacements for the images, i.e. in the role alt - you would just use the
same values then.

I guess the use of title attributes might reflect the trend among browsers
not to show the alt attribute value on mouseover (but show the title
attribute value). I recently noticed that IE 8 does not show the alt
attribute value even in the absence of a title attribute - in "standards"
mode (vs. "quirks" mode). Of course designers who have used the alt
attribute due to its mouseover effect may think they need to "switch" to the
title attribute. It's quite possible that the attribute value then in
unusuitable as a textual replacement, but this really depends.

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

From: Simius Puer
Date: Fri, Apr 02 2010 5:27AM
Subject: Re: client using title instead of alt on image.
← Previous message | Next message →

As Jukka quite rightly points out, use of "title" isn't invalid (most HTML
tags can accept a title attribute) at all, but *not* using an "alt"
attribute is!

If you need a solid argument for using the "alt" attribute there it is -
valid code and all the niceness that goes with it:

- Just mention improved SEO and most clients are sold but there are other
reasons too
- For accessibility you can't guarantee that all past, present and future
AT software will accept the "title" attribute in lieu of the "alt"
one...using tags and attributes for their intended purpose should be a
standard practice for any decent HTML coder
- More likely to be fully cross-browser compatible

...if they are still not sold on why valid code is important suggest they
read: http://validator.w3.org/docs/why.html

Incidentally if the client uses a null alt="" the page will run through a
validator without any problems so you can't simply rely on that, although it
is a good start.

*Background*

Early versions of IE incorrectly displayed the alt-text on mouseover. Other
browsers were not following a trend - they simply applied the correct
behavior of the "alt" attribute in the HTML spec (or it could be the User
Agent Accessibility Guidelines UAAG - I forget which).

As IE8 is now much more standards compliant than older versions it no longer
behaves the same way in "standards" mode.

From: Despain, Dallas
Date: Fri, Apr 02 2010 1:45PM
Subject: Re: client using title instead of alt on image.
← Previous message | Next message →

Jukka, Andrew, and Dean

Thank you very much for your well thought out responses. I think I'll just take the "not reliable for all assistive technology" approach.

I am continually amazed at the incredible wealth of information and depth of knowledge of users of this list. Thank you!

Sincerely,

Dallas

-----Original Message-----
From: = EMAIL ADDRESS REMOVED = [mailto: = EMAIL ADDRESS REMOVED = ] On Behalf Of Simius Puer
Sent: Friday, April 02, 2010 4:28 AM
To: WebAIM Discussion List
Subject: Re: [WebAIM] client using title instead of alt on image.

As Jukka quite rightly points out, use of "title" isn't invalid (most HTML
tags can accept a title attribute) at all, but *not* using an "alt"
attribute is!

If you need a solid argument for using the "alt" attribute there it is -
valid code and all the niceness that goes with it:

- Just mention improved SEO and most clients are sold but there are other
reasons too
- For accessibility you can't guarantee that all past, present and future
AT software will accept the "title" attribute in lieu of the "alt"
one...using tags and attributes for their intended purpose should be a
standard practice for any decent HTML coder
- More likely to be fully cross-browser compatible

...if they are still not sold on why valid code is important suggest they
read: http://validator.w3.org/docs/why.html

Incidentally if the client uses a null alt="" the page will run through a
validator without any problems so you can't simply rely on that, although it
is a good start.

*Background*

Early versions of IE incorrectly displayed the alt-text on mouseover. Other
browsers were not following a trend - they simply applied the correct
behavior of the "alt" attribute in the HTML spec (or it could be the User
Agent Accessibility Guidelines UAAG - I forget which).

As IE8 is now much more standards compliant than older versions it no longer
behaves the same way in "standards" mode.

From: Kevin Miller
Date: Mon, Apr 05 2010 5:12PM
Subject: Re: client using title instead of alt on image.
← Previous message | Next message →

Title does provide the sometimes useful 'hover' feature - but some browsers
treat that attribute differently - there's a great article about
it<http://www.456bereastreet.com/archive/200412/the_alt_and_title_attributes/>;at
456 Brea Street's website.

We tell our clients they must always have the alt attribute, the the title
attribute can also be used to supplement the content - often for links or
images within links to provide tips to sighted users. Some browsers only
hover tips with the mouse and not on a keyboard scoping - so use with
caution.

On Fri, Apr 2, 2010 at 11:44 AM, Despain, Dallas < = EMAIL ADDRESS REMOVED = >wrote:

> Jukka, Andrew, and Dean
>
> Thank you very much for your well thought out responses. I think I'll just
> take the "not reliable for all assistive technology" approach.
>
> I am continually amazed at the incredible wealth of information and depth
> of knowledge of users of this list. Thank you!
>
> Sincerely,
>
> Dallas
>
> -----Original Message-----
> From: = EMAIL ADDRESS REMOVED = [mailto:
> = EMAIL ADDRESS REMOVED = ] On Behalf Of Simius Puer
> Sent: Friday, April 02, 2010 4:28 AM
> To: WebAIM Discussion List
> Subject: Re: [WebAIM] client using title instead of alt on image.
>
> As Jukka quite rightly points out, use of "title" isn't invalid (most HTML
> tags can accept a title attribute) at all, but *not* using an "alt"
> attribute is!
>
> If you need a solid argument for using the "alt" attribute there it is -
> valid code and all the niceness that goes with it:
>
> - Just mention improved SEO and most clients are sold but there are other
> reasons too
> - For accessibility you can't guarantee that all past, present and future
> AT software will accept the "title" attribute in lieu of the "alt"
> one...using tags and attributes for their intended purpose should be a
> standard practice for any decent HTML coder
> - More likely to be fully cross-browser compatible
>
> ...if they are still not sold on why valid code is important suggest they
> read: http://validator.w3.org/docs/why.html
>
> Incidentally if the client uses a null alt="" the page will run through a
> validator without any problems so you can't simply rely on that, although
> it
> is a good start.
>
> *Background*
>
> Early versions of IE incorrectly displayed the alt-text on mouseover.
> Other
> browsers were not following a trend - they simply applied the correct
> behavior of the "alt" attribute in the HTML spec (or it could be the User
> Agent Accessibility Guidelines UAAG - I forget which).
>
> As IE8 is now much more standards compliant than older versions it no
> longer
> behaves the same way in "standards" mode.
>
>
>

From: Patrick H. Lauke
Date: Mon, Apr 05 2010 5:24PM
Subject: Re: client using title instead of alt on image.
← Previous message | Next message →

On 05/04/2010 23:12, Kevin Miller wrote:
> Title does provide the sometimes useful 'hover' feature

tooltips can, depending on length, cause some issues for sighted users
(with cognitive disabilities, or using screen magnifiers for instance)

> We tell our clients they must always have the alt attribute, the the title
> attribute can also be used to supplement the content - often for links or
> images within links to provide tips to sighted users. Some browsers only
> hover tips with the mouse and not on a keyboard scoping - so use with
> caution.

To my knowledge no browser brings up a tooltip on focusable elements
when they're accessed via keyboard - and of course, if the title is on a
non-focusable element, then keyboard users wouldn't even get a chance to
get there in the first place (but your example of links is fine, of
course). So it really narrows it down to "sighted mouse (or rather,
generic pointing device) users". Interesting to also note that there's
no real hover on mobile devices either (at least not in the traditional
sense, unless authors explicitly work with the new, non-standard touch
events to simulate them).

P
--
Patrick H. Lauke

From: Waltenberger, Lon (LNI)
Date: Mon, Apr 05 2010 6:15PM
Subject: Re: client using title instead of alt on image.
← Previous message | Next message →

The last time I checked screen readers either ignored titles altogether or by default. The version of JAWS I used would, with a non-default setting, read either the link text or the title text, not both. If it was set to read the title text and there was no title attribute then it'd read the link text.

And you can add to the list of sighted folks having problems with title text just about everybody with eyes more than 40 years old.

We gave up on the title attribute years ago.

From: Moore,Michael (DARS)
Date: Tue, Apr 06 2010 7:45AM
Subject: Re: client using title instead of alt on image.
← Previous message | No next message

Patrick wrote " tooltips can, depending on length, cause some issues for sighted users
(with cognitive disabilities, or using screen magnifiers for instance)"

There is a split in our agency among screen magnifier users and their opinion on tooltips - many prefer the tool tips while others find them distracting and difficult to deal with. We try to keep them short. Just another example of a continuum of experience and preference. In practice we do not add title attributes to link text, attempt to have all links as actual text, and rely on the alt attribute to supply the tool-tip (in IE) for image buttons.

Mike Moore
(512) 424-4159