Use of [text] in <img> tag attributes

Discussion in 'HTML' started by Rowan Malin, May 23, 2004.

  1. Rowan Malin

    Rowan Malin Guest

    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
     
    Rowan Malin, May 23, 2004
    #1
    1. Advertising

  2. Rowan Malin

    brucie Guest

    in post: <news:>
    Rowan Malin <> 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
     
    brucie, May 23, 2004
    #2
    1. Advertising

  3. Rowan Malin

    Rowan Malin Guest

    "brucie" <> wrote in message
    news:...
    > in post: <news:>
    > Rowan Malin <> 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
     
    Rowan Malin, May 23, 2004
    #3
  4. Rowan Malin

    brucie Guest

    in post: <news:>
    Rowan Malin <> 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
     
    brucie, May 23, 2004
    #4
  5. Rowan Malin

    Rowan Malin Guest

    [thanks for snipping]

    "brucie" <> wrote in message
    news:...
    > in post: <news:>
    > Rowan Malin <> 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
     
    Rowan Malin, May 23, 2004
    #5
  6. Rowan Malin

    jake Guest

    In message <>, Rowan Malin
    <> 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
     
    jake, May 23, 2004
    #6
  7. "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,


    It was interesting to read, later in the thread, that you had seen such
    usage in an old (1998) 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
     
    Jukka K. Korpela, May 23, 2004
    #7
  8. Rowan Malin

    Rob McAninch Guest

    Jukka K. Korpela
    <news:Xns94F290D8A5FC2jkorpelacstutfi@193.229.0.31>:

    > "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,

    >
    > It was interesting to read, later in the thread, that you had
    > seen such usage in an old (1998) 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/
     
    Rob McAninch, May 23, 2004
    #8
  9. Rowan Malin

    Neal Guest

    On Sun, 23 May 2004 09:53:06 +0100, jake <> 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."
     
    Neal, May 23, 2004
    #9
  10. 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/
     
    Daniel R. Tobias, May 23, 2004
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. news.austin.rr.com

    how to download img from html img tag

    news.austin.rr.com, Apr 27, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    541
    Steve C. Orr [MVP, MCSD]
    Apr 27, 2005
  2. shruds
    Replies:
    1
    Views:
    946
    John C. Bollinger
    Jan 27, 2006
  3. Nonee
    Replies:
    7
    Views:
    691
    Nonee
    Oct 28, 2005
  4. Philipp Lenssen

    Problem: <img></img>

    Philipp Lenssen, Jun 27, 2005, in forum: XML
    Replies:
    15
    Views:
    805
    David Håsäther
    Jul 3, 2005
  5. Jopek
    Replies:
    7
    Views:
    428
    dorayme
    Apr 26, 2009
Loading...

Share This Page