Re: unifying alternate content across embedded content element types

Hi Patrick,

On Jul 15, 2007, at 2:37 AM, Patrick Garies wrote:

> Robert Burns wrote:
>> It might be helpful if you too could provide some examples of what  
>> you're saying. For example, in Jon's Fluffy picture example, how  
>> would you populate the @alt attribute? I understand one needs  
>> context to be able to do this, but feel free to take liberties,  
>> make assumptions and fill in the gaps and then craft an example.   
>> It would just be helpful to see how one might attach proper @alt   
>> and @longdesc to an simple example like this.
>
> Context: document about Fluffy
> Code: <img alt="Fluffy likes playing with balls of yarn."  
> src="cat.png">
> Code: <img alt="My cat Fluffy likes playing with balls of yarn."  
> src="cat.png">
> Code: <img alt="I let my cat, Fluffy, played with a ball of yarn  
> when we were at my friend’s house a year ago. He seemed to enjoy  
> it." src="cat.png">
> Code: <img alt="I own a cat named Fluffy. He likes playing with  
> balls of yarn." src="cat.png">

Thanks, those are fine examples. However, I was interested in Jon's  
example as a starting point:. In particular this <img> alongside the  
paragraph. I'd also like to hear what Sander thinks since, I sense he  
may have his own opinions on this too.

Jon's example.
> <img src=cat.jpg alt="A photo of my cat, Fluffy, playing with a  
> ball of yarn">
> <p>A photo of my cat, Fluffy, playing with a ball of yarn</p>

To take out one of your examples:
> Code: <img alt="?" src="cat.png">
> Code <p>I let my cat, Fluffy, played with a ball of yarn when we  
> were at my friend’s house a year ago. He seemed to enjoy it.</p>

My contention (and this was a point I think Jon was making too), is  
that when a textual equivalent describing the image is already in the  
surrounding  prose, it shouldn't be repeated for the @alt attribute.  
My proposal was something shorter that let's the user know what  
meaning the image conveys in a way that matches it with the prose  
available to all users.

I suppose an alternative could be:
> Code: <img alt="Fluffy with the ball of yarn"  
> longdesc='#fluffyplays' src="cat.png">
> Code <p id='fluffyplays' >I let my cat, Fluffy, played with a ball  
> of yarn when we were at my friend’s house a year ago. He seemed to  
> enjoy it.</p>

An even richer alternative could be:
> Code: <img onclick='toggleLongDesc()' alt="Fluffy with the ball of  
> yarn" longdesc='#fluffyplays' src="cat.png">
> Code <p>I let my cat, Fluffy, played with a ball of yarn when we  
> were at my friend’s house a year ago. He seemed to enjoy it.</p>
> Code <p style='visibility: hidden;' id='fluffyplays' >Fluffy is a  
> tiny tabby cat with a partial mane that makes her look like a  
> little lion. She's fallen over with the ball on her belly and she's  
> staring right into the camera with the most beautiful eyes.</p>

I think  this  example  above is interesting because it has @lat, it  
has textual description for consumption by all users and it has  
equivalent/alternate/fallback description that may only be important  
for those with a visual impairment or who are using a text-only UA. A  
similar arrangement might make use of the figure and legend elements  
like:

> Code <figure>
> Code: <legend>I let my cat, Fluffy, played with a ball of yarn when  
> we were at my friend’s house a year ago. He seemed to enjoy it.</ 
> legend>
> Code <img onclick='toggleLongDesc()' alt="Fluffy with the ball of  
> yarn" longdesc='#fluffyplays' Code <p style='visibility: hidden;'  
> id='fluffyplays' >Fluffy is a tiny tabby cat with a partial mane  
> that makes her look like a little lion. She's fallen over with the  
> ball on her belly and she's staring right into the camera with the  
> most beautiful eyes.</p>
> src="cat.png">
> Code </figure>

The important thing I think is to not put these alternatives on too  
high of a pedestal, so that  nothing is adequate. Sander, seemed to  
suggest it would be better to leave alternatives off than to add  
something you think might be wrong. Perhaps I just don't understand  
what is needed to fulfill the @alt requirement, but it seems like  
we'd be better off encouraging some text alternative than nothing at  
all. For example, in this last case below, I think I would rather  
have the bad example, than nothing at all. At least I can read that  
an decipher that, though this is not a very good accessibility  
author, I can figure out that the house icon might mean "home icon"  
which they must have meant "go to the home page". Especially if I  
noticed that @alt repeated on page after page. Without it, I might be  
frustrated with every visit to this site thinking: "I wish they would  
just add a home button to their various web pages".

> Image: icon depicting a house
> Bad Example: <a href="/"><img alt="House Icon" src="home.png"></a>
> Good Example: <a href="/"><img alt="Go to the Home Page"  
> src="home.png"></a>

Take care,
Rob

Received on Sunday, 15 July 2007 08:07:08 UTC