Old 06-05-2008, 17:29   #1 (permalink)
ptannenbaum
Registered User
 
Join Date: May 2008
Posts: 1
<alt> tags...only for <img>?

Hi guys-

can you use the attribute <alt> to describe tags other than images. Such as AP Divs or flash content?
  Reply With Quote
Old 06-05-2008, 17:39   #2 (permalink)
bluesage
Senior Member
 
Join Date: Dec 2006
Location: Switzerland
Posts: 276
You can, but don't think your html will validate following W3C standards. Not that Firefox uses "Title" instead of "alt", so its wise to have both in as your image attributes.

There isn't really a use for an alt text in other tags as far as i'm concerned, as it is designed specifically as "alternate text" for objects that aren't text and which certain browsers / users can not comprehend without an explanation.

As for Flash, use SWFObject, it allows to have a div with textual explanation of the flash content for those without flash. And it seems to be ok with Google and SEO.

EDIT: I believe the alt attribute can also be used in the "a" tag when writing links. (at least I do sometimes)
__________________
www.benshu.ch // Evolving with Style


Last edited by bluesage : 07-05-2008 at 17:47.
  Reply With Quote
Old 06-05-2008, 17:48   #3 (permalink)
pgo
Moderator
 
pgo's Avatar
 
Join Date: Jan 2005
Location: Brooklyn, NYC
Posts: 11,869
There is no alt tag. There are alt attributes, which are attached to <img /> and <input type="image" />.
__________________
  Reply With Quote
Old 07-05-2008, 03:16   #4 (permalink)
Bill Posters
trouble free and loverlee
 
Join Date: Mar 2003
Location: YooKay
Posts: 2,854
Quote:
Originally Posted by bluesage
You can, but don't think your html will validate following W3C standards. Not that Firefox uses "Title" instead of "alt", so its wise to have both in as your image attributes.
I disagree, conditionally.

Firstly, you need to forget about the tooltip effect of the title attribute (or alt attribute in the case of IE). It's best to primarily think of the alt and title attributes and their content purely in terms of the information they convey to the user.

If the image content doesn't convey all that it should, then and only then, is is a fair idea to add a title attribute to expand upon the information conveyed in the image itself (or the alt attribute).
The correct attribute to use would be the longdesc, but in practise, coders and usability bods seem to have settled on the title attribute as sufficient.

For image links, the alt attribute should convey the same content of the image. If the link would benefit from additional info, then add a title attribute to the anchor, not the image.

The title attribute should never replicate the content of the alt attribute.
The alt attribute should replicate the information conveyed in the image itself (this covers both 'images on' and 'images off' users, sighted and unsighted users). By adding a title attribute which replicates that information again, you're simply adding bloat to the code without really benefiting the user.

In terms of how screenreaders and other AT software interpret the various configurations of anchor text, anchor titles, alt attributes and img title text, a search over at Accessify Forum would be a good idea. It's a topic which crops up from time to time.
  Reply With Quote
Old 07-05-2008, 12:51   #5 (permalink)
Vebut
Webdeveloper
 
Join Date: May 2008
Location: Sweden
Posts: 13
<a href="my-link.htm" title="This is my link description">Go here</a>
<acronym title="Serach Engine Optimization">SEO</acronym>
<img src="image.jpg" alt="This is my image" />

All is valid xHTML... Read at w3.org if you need to look it up.
  Reply With Quote
Old 07-05-2008, 13:03   #6 (permalink)
pgo
Moderator
 
pgo's Avatar
 
Join Date: Jan 2005
Location: Brooklyn, NYC
Posts: 11,869
Quote:
Originally Posted by Vebut
<a href="my-link.htm" title="This is my link description">Go here</a>
<acronym title="Serach Engine Optimization">SEO</acronym>
<img src="image.jpg" alt="This is my image" />

All is valid xHTML... Read at w3.org if you need to look it up.
Uh.......thanks?
__________________
  Reply With Quote
Old 07-05-2008, 15:23   #7 (permalink)
Vebut
Webdeveloper
 
Join Date: May 2008
Location: Sweden
Posts: 13
My bad
Edit: Rushed my reading as I was going way...

Last edited by Vebut : 07-05-2008 at 15:53.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8