8 replies [Last post]
Chilliwilli
Offline
newbie
Last seen: 17 years 39 weeks ago
Joined: 2004-04-25
Posts: 2
Points: 0

Hi all,

I have a site styled with CSS and have a couple of questions about increase accessibility. I've created a couple of divs as placeholders for images and in the div I put some text which sums up the image. When styled the etxt isn't shown and instead a picture is shown. The pictures aren't content as much just part of the style theme hence I'm not using img tags.

Is it good practice to tell someone they are missing an image or to just try and sum up what the image was trying to say.. I.e. should alt text be "image: a picture of a beautiful cup of coffee on some coffee beans." or "We serve only the best freshly ground coffee"?

I'm very new to CSS and don't really know any best practices so feel free to fill me in if I'm being dumb.

Cheers,

Tom.

Thanks in advance,

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 week 1 day ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5344
Points: 2965

Alt txt etiquette..

Hi Chilliwilli,
If the image has conveys no information and is just part of the theme then it would be better to have an empty alt attribute. alt=""

Hope that helps

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 3 years 11 weeks ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

Alt txt etiquette..

Hi

But don't be tempted not to have an alt at all.

Some browsers don't like that.

Trevor

co2
co2's picture
Offline
Leader
UK
Last seen: 13 years 40 weeks ago
UK
Joined: 2003-09-17
Posts: 721
Points: 0

Alt txt etiquette..

Here's the W3C quick tip on the alt declaration use: http://www.w3.org/QA/Tips/altAttribute

As the guys state above, if the graphic is a component of the design, then give it a blank alt. Try to make the alt text fit in structurally with the rest of the text. For example, a logo shouldn't really state: 'Acme Ltd logo', it should simply state 'Acme Ltd'.

The next sentence is true. The previous sentence is false. Discuss...

PezIbc
Offline
newbie
Last seen: 17 years 49 weeks ago
Timezone: GMT-4
Joined: 2004-02-16
Posts: 6
Points: 0

Alt txt etiquette..

If you want to increase your assessibility, then using the alt tag is essential. It is not optional.

Here is a validator. Do not rely upon it alone. User checks are important.http://bobby.watchfire.com/bobby/html/en/index.jsp

Guidelines and resources: http://www.w3.org/WAI/

alt="Acme Ltd logo." would be perfectly fine. The point is to convey information to the users who need it, to assist screen readers, etc.

A site crammed with spacer.gifs and whatnot can be a pain to fix up - but you have to decide what is important.

co2
co2's picture
Offline
Leader
UK
Last seen: 13 years 40 weeks ago
UK
Joined: 2003-09-17
Posts: 721
Points: 0

Alt txt etiquette..


...take the the Bobby site with a pinch of salt, they can't even validate their own site! (and give excuses). :roll:

Quote:

alt="Acme Ltd logo." would be perfectly fine. The point is to convey information to the users who need it, to assist screen readers, etc.

I would tend to disagree that Acme Ltd Logo would be fine. The image wouldn't state Acme Logo, and would be utilised as a statement of the company name/identity (the image wouldn't state Acme Logo within it, right?). This visual identity only has meaning when viewed. Thus, if not available, or viewed by a visually-impaired person, telling them it's a logo they cannot see, is a bit of a non-starter. Simply stating the logo's content has much more finesse.

Anyway, it's such a small point that I don't think it's going to destroy a site! Wink

The next sentence is true. The previous sentence is false. Discuss...

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 week 1 day ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5344
Points: 2965

Alt txt etiquette..

Spacer gifs are no longer needed in a web page as CSS can be used to space things apart.

But if you did use them or some other image that has no added benefit as far as content goes, then using alt="" would be the best thing to do.

Imagine someone using a screen reader hearing "spacer gif" repeatedly, it really doesn't add anything to the users experience and most likely would just tick them off.

Stu
Stu's picture
Offline
Enthusiast
Bristol uk
Last seen: 18 years 6 days ago
Bristol uk
Joined: 2004-01-20
Posts: 282
Points: 0

Alt txt etiquette..

What about title="" as well as alt=""?

It's not what you do it's the way that you do it.
So do it with STYLE
http://www.s7u.co.uk

Chilliwilli
Offline
newbie
Last seen: 17 years 39 weeks ago
Joined: 2004-04-25
Posts: 2
Points: 0

Alt txt etiquette..

Thanks all.