Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Use of [text] in <img> tag attributes

Reply
Thread Tools

Use of [text] in <img> tag attributes

 
 
Rowan Malin
Guest
Posts: n/a
 
      05-23-2004
I have seen the use of square brackets in the text of the alt attribute of
<img> tags in a number of places, and would like to ask the group for their
opinions. For example,
<img src="foo.gif" alt="[Picture of a foo]">. I'm especially interested in
the opinions of those who read web pages with non-visual browsers, or those
who read with images turned off. For example, do the brackets indicate (via
some informal "standard") that we're talking about an image, or is there
some other way in which this information is conveyed?

Also, in the case where the image is a picture of something deserving a
description, should the alt attribute include the words "Picture of" (or
similar) or would it be better just to use "A foo"?

Finally, do any modern browsers support the longdesc attribute in a sensible
way?

Thanks in advance for any help. If I'm posting to the wrong group, please
redirect me.

Cheers,
Rowan


 
Reply With Quote
 
 
 
 
brucie
Guest
Posts: n/a
 
      05-23-2004
in post: <news:(E-Mail Removed)>
Rowan Malin <(E-Mail Removed)> said:

> I'm especially interested in the opinions of those who read web pages
> with non-visual browsers,


alt.disability.issues
alt.comp.blind-users
alt.disability.blind.social

> or those who read with images turned off.


me!

> <img src="foo.gif" alt="[Picture of a foo]">
> do the brackets indicate (via some informal "standard") that we're
> talking about an image,


no. i think its one of those things that people don't know why people do
it but they do it too anyway. its kewl.

> or is there some other way in which this information is conveyed?


it depends on the UA. it may say "image" before reading the alt text and
indicating if any longdesc is available or for graphical browsers you
may get a 3d hole in the page displaying some or all of the alt text.

> Also, in the case where the image is a picture of something deserving a
> description, should the alt attribute include the words "Picture of" (or
> similar) or would it be better just to use "A foo"?


you can swing both ways. its very image dependent but it is supposed to
be an ALTernative to the image, not a description of it.

Use of ALT texts in IMGs
http://ppewww.ph.gla.ac.uk/~flavell/alt/alt-text.html

> Finally, do any modern browsers support the longdesc attribute in a sensible
> way?


not visual browsers but it doesn't matter. if a user likes the longdesc
attribute they should use a UA that supports it, not expect authors to
jump through hoops to supply some alternative of longdesc that will work
with their gowd knows what user agent.

--
b r u c i e


 
Reply With Quote
 
 
 
 
Rowan Malin
Guest
Posts: n/a
 
      05-23-2004

"brucie" <****@bruciesusenetshit.info> wrote in message
news:(E-Mail Removed)...
> in post: <news:(E-Mail Removed)>
> Rowan Malin <(E-Mail Removed)> said:
>
> > I'm especially interested in the opinions of those who read web pages
> > with non-visual browsers,

>
> alt.disability.issues
> alt.comp.blind-users
> alt.disability.blind.social
>
> > or those who read with images turned off.

>
> me!
>
> > <img src="foo.gif" alt="[Picture of a foo]">
> > do the brackets indicate (via some informal "standard") that we're
> > talking about an image,

>
> no. i think its one of those things that people don't know why people do
> it but they do it too anyway. its kewl.
>
> > or is there some other way in which this information is conveyed?

>
> it depends on the UA. it may say "image" before reading the alt text and
> indicating if any longdesc is available or for graphical browsers you
> may get a 3d hole in the page displaying some or all of the alt text.
>
> > Also, in the case where the image is a picture of something deserving a
> > description, should the alt attribute include the words "Picture of" (or
> > similar) or would it be better just to use "A foo"?

>
> you can swing both ways. its very image dependent but it is supposed to
> be an ALTernative to the image, not a description of it.
>
> Use of ALT texts in IMGs
> http://ppewww.ph.gla.ac.uk/~flavell/alt/alt-text.html
>
> > Finally, do any modern browsers support the longdesc attribute in a

sensible
> > way?

>
> not visual browsers but it doesn't matter. if a user likes the longdesc
> attribute they should use a UA that supports it, not expect authors to
> jump through hoops to supply some alternative of longdesc that will work
> with their gowd knows what user agent.
>
> --
> b r u c i e
>
>


Thanks for the information on the non-visual newsgroups, and the detailed
and interesting article to which you linked. Do you have any advice on which
newsgroup would be most appropriate for my particular question? I will, of
course, lurk for a while before posting. I was surprised that there doesn't
seem to be (currently) an HTML/CSS-oriented newsgroup dedicated to
non-visual browsers (UAs and people).

Incidentally, my query was originally prompted by the examples in a 1998
edition of the O'Reilly book "HTML: The Definitive Guide".

Thanks again for your useful comments.

Cheers,
Rowan


 
Reply With Quote
 
brucie
Guest
Posts: n/a
 
      05-23-2004
in post: <news:(E-Mail Removed)>
Rowan Malin <(E-Mail Removed)> said:

> [alt texts/browser]
> Do you have any advice on which newsgroup would be most appropriate
> for my particular question?


there is alt.html.web-accessibility but its dead and you'll find the
same people in it as most of the other html type NGs anyway. for really
anal html try comp.infosystems.www.authoring.html

> I will, of course, lurk for a while before posting.


<gasp/>

> I was surprised that there doesn't seem to be (currently) an
> HTML/CSS-oriented newsgroup dedicated to non-visual browsers (UAs and
> people).


very few worry about accessibility issues (if they're even aware of
their existence).

--
b r u c i e


 
Reply With Quote
 
Rowan Malin
Guest
Posts: n/a
 
      05-23-2004
[thanks for snipping]

"brucie" <****@bruciesusenetshit.info> wrote in message
news:(E-Mail Removed)...
> in post: <news:(E-Mail Removed)>
> Rowan Malin <(E-Mail Removed)> said:
>
> > [alt texts/browser]
> > Do you have any advice on which newsgroup would be most appropriate
> > for my particular question?

>
> there is alt.html.web-accessibility but its dead and you'll find the
> same people in it as most of the other html type NGs anyway. for really
> anal html try comp.infosystems.www.authoring.html
>

Yes, I saw the (sad) state of a.h.w-a. Maybe alt.html.* got a bit out of
hand? I am currently lurking in various c.i.w.a.* groups.

> > I will, of course, lurk for a while before posting.

>
> <gasp/>
>

I know, shocking, isn't it! There are still a few of us old farts out here
who try to respect etiquette, though.

> > I was surprised that there doesn't seem to be (currently) an
> > HTML/CSS-oriented newsgroup dedicated to non-visual browsers (UAs and
> > people).

>
> very few worry about accessibility issues (if they're even aware of
> their existence).
>

And that's just a crying shame.

Cheers,
Rowan


 
Reply With Quote
 
jake
Guest
Posts: n/a
 
      05-23-2004
In message <(E-Mail Removed)>, Rowan Malin
<(E-Mail Removed)> writes
>I have seen the use of square brackets in the text of the alt attribute of
><img> tags in a number of places, and would like to ask the group for their
>opinions.



>For example,
><img src="foo.gif" alt="[Picture of a foo]">. I'm especially interested in
>the opinions of those who read web pages with non-visual browsers, or those
>who read with images turned off. For example, do the brackets indicate (via
>some informal "standard") that we're talking about an image, or is there
>some other way in which this information is conveyed?


There's no harm in putting them in -- but not much point either; the []
are not spoken (-- at least, not by my UA).

>
>Also, in the case where the image is a picture of something deserving a
>description, should the alt attribute include the words "Picture of" (or
>similar) or would it be better just to use "A foo"?


Personally, I prefer to use alt="PHOTO: .... " or alt="IMAGE: ...." or
alt="GRAPHIC: ..." or whatever it is.

Some UAs may prefix the alternative text with some suitable word, or the
alternative text may be spoken with an 'images' voice -- but mine does
not. So suddenly hearing "PHOTO: The entrance to the building" when
someone has embedded an image amongst the text seems to be better than
just "The entrance to the building".

>
>Finally, do any modern browsers support the longdesc attribute in a sensible
>way?


Yes. HPR/IE does support the 'longdesc' -- but I usually add a 'd-link'
for those UAs that don't.

What you will hear is:
<the image's alternative text>
'Image Description'
'Dee'

(both in a 'links' voice.)

Other UAs that don't support longdesc will just hear the alternative
text, and then 'Dee' as a link.
>
>Thanks in advance for any help. If I'm posting to the wrong group, please
>redirect me.


There are other disability groups, but they're not very active.
alt.disability.blind.social occasionally has threads relating to various
UAs, but the others are pretty quiet.
>
>Cheers,
>Rowan
>
>


--
Jake
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      05-23-2004
"Rowan Malin" <(E-Mail Removed)> wrote:

> I have seen the use of square brackets in the text of the alt
> attribute of <img> tags in a number of places,


It was interesting to read, later in the thread, that you had seen such
usage in an old (199 book. I have used and suggested the use of
brackets but I don't know where I originally learned the idea; it's not
very common, but I've seen it used.

> For example,
> <img src="foo.gif" alt="[Picture of a foo]">.


In my opinion, this is adequate for an image that has content of its own,
content that cannot reasonably be expressed using a text equivalent. For
example, a painting or photograph in a gallery (as opposite to use as
decoration on a page with textual content), or a graph describing a
complex system. For a purely decorative image, the alt attribute would be
foolish, but so would it be without the brackets, too, or without the
words "Picture of". The same applies to an arrow symbol, of course;
alt="[Picture of an arrow]" would be absurd.

> For
> example, do the brackets indicate (via some informal "standard") that
> we're talking about an image,


That's the general idea. Using alt="foo" says that the string foo is an
adequate replacement for the image, so that when the image is not shown,
the page should be presented as if the string "foo" appeared in place of
the <img> tag. Using alt="[foo]" or alt="[picture of foo]" is a way of
trying to say that there is an image of foo present on the page and it
has some content and purpose that cannot be (reasonably) described
verbally. A person who has just turned off image loading may decide to
load this particular image since he is interested in foos; a blind person
knows he is missing something (though he migh ask a friend to describe
the image or, maybe some day, use special software and a haptic mouse to
get in touch with the image). When alt="foo" is used, neither type of
user needs to know that "foo" is actually a textual replacement for an
image. That's the big picture (no pun intended). In reality, there are
borderline cases. For my treatise on some details, see
http://www.cs.tut.fi/~jkorpela/html/alt.html

> Also, in the case where the image is a picture of something deserving
> a description, should the alt attribute include the words "Picture
> of" (or similar) or would it be better just to use "A foo"?


It depends. If the image deserves a description, it normally deserves a
caption as text that is present on the page, typically below the image.
In that case I think we should use an alt text that makes it clear that
the alt text is not a textual replacement but just kind of an identifier,
or reference; alt="[foo]", alt="picture of foo", or alt="a foo" (or a
combination of the techniques) might do that reasonably.

> Finally, do any modern browsers support the longdesc attribute in a
> sensible way?


Not much. Mozilla lets the user right-click on an image and select
"Properties" to get an "Image Properties" popup with information like
Location (URL), width, height, file size, alternate text (alt attribute
value), and "Description", which contains the longdesc value. I haven't
found a direct way to use that value - it's not clickable - but at least
it can be cut & pasted and used that way. So there's support, but not
very elegant, and I'm afraid few users know even of this lame
functionality.

If an adequate textual replacement for an image is long, and one that
should not be present when the image is shown, then the only really
accessible method is to include a normal link near the image. A
simplistic formulation would be "There is a <a href="desc.html">textual
description of the system</a> available, too."

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
Rob McAninch
Guest
Posts: n/a
 
      05-23-2004
Jukka K. Korpela
<news:Xns94F290D8A5FC2jkorpelacstutfi@193.229.0.31 >:

> "Rowan Malin" <(E-Mail Removed)> wrote:
>
>> I have seen the use of square brackets in the text of the alt
>> attribute of <img> tags in a number of places,

>
> It was interesting to read, later in the thread, that you had
> seen such usage in an old (199 book. I have used and
> suggested the use of brackets but I don't know where I
> originally learned the idea; it's not very common, but I've
> seen it used.
>
>> For example,
>> <img src="foo.gif" alt="[Picture of a foo]">.


I typically use the square brackets in a case where I might have
a paragraph or two describing a bicycle trail, additionally I
have a couple photgraphs of the trail inserted within the
paragraphs. Without the brackets the alt text would just be
inserted inline and may not make sense. The brackets set off the
alt text as being separate from the main text.

--
Rob - http://rock13.com/
Web Stuff: http://rock13.com/webhelp/
 
Reply With Quote
 
Neal
Guest
Posts: n/a
 
      05-23-2004
On Sun, 23 May 2004 09:53:06 +0100, jake <(E-Mail Removed)> wrote:

> Some UAs may prefix the alternative text with some suitable word, or the
> alternative text may be spoken with an 'images' voice -- but mine does
> not. So suddenly hearing "PHOTO: The entrance to the building" when
> someone has embedded an image amongst the text seems to be better than
> just "The entrance to the building".


Perhaps better yet, alt="The entrance to the beautiful Foo building
features classic brownstone architecture and full wheelchair
accessibility."
 
Reply With Quote
 
Daniel R. Tobias
Guest
Posts: n/a
 
      05-23-2004
Rowan Malin wrote:

> I have seen the use of square brackets in the text of the alt attribute of
> <img> tags in a number of places, and would like to ask the group for their
> opinions. For example,
> <img src="foo.gif" alt="[Picture of a foo]">. I'm especially interested in
> the opinions of those who read web pages with non-visual browsers, or those
> who read with images turned off. For example, do the brackets indicate (via
> some informal "standard") that we're talking about an image, or is there
> some other way in which this information is conveyed?


It all depends on what the purpose of the image is, and how whatever
alternate text you're using would "flow" in the context of the document
as a whole, when the image is replaced with it. In some non-graphical
browsers (Lynx, for instance), ALT text is inserted where the image is
found within the flow of the site content, without anything
automatically added to indicate that it represents an image, so if it's
important in this particular context to set the ALT text off from the
surrounding normal text, brackets can be useful; in some cases an
unbracketed ALT would be awkward in its context, as in some "ALT
howlers" that have been quoted on newsgroups and Web pages where very
odd sentences get created through the juxtaposition of snippets of text
in various ALTs and surrounding text. In other cases, such as images
being used as section headers, no brackets are needed or desirable, so
long as the entire image is surrounded with appropriate markup (e.g.,
<H2>). And, for purely decorative images, often an empty ALT="" is the
most sensible thing to use.

http://webtips.dan.info/images.html

--
== Dan ==
Dan's Mail Format Site: http://mailformat.dan.info/
Dan's Web Tips: http://webtips.dan.info/
Dan's Domain Site: http://domains.dan.info/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
why use fwd slash before closing of tag? " <tag /> " Aniais HTML 5 12-17-2006 01:40 AM
Parse reserved attributes as normal attributes Max XML 1 09-22-2006 12:04 PM
how do u invoke Tag b's Tag Handler from within Tag a's tag Handler? shruds Java 1 01-27-2006 03:00 AM
Re: How to get Visual Studio to use quotes for html tag attributes Max ASP .Net 1 04-01-2004 05:11 PM
How to use non-standard attributes in a tag? F. Da Costa HTML 2 01-21-2004 06:03 PM



Advertisments