- From: Philip Taylor <pjt47@cam.ac.uk>
- Date: Mon, 05 May 2008 11:16:59 +0100
- To: Ian Hickson <ian@hixie.ch>
- CC: Henri Sivonen <hsivonen@iki.fi>, "public-html@w3.org" <public-html@w3.org>
Ian Hickson wrote: > On Sun, 4 May 2008, Philip Taylor wrote: >>> Actually it doesn't, really. The intent of the alt="" attribute is to >>> provide text that can be used to completely replace the image, and >>> thus there isn't necessarily a way to distinguish this: >>> >>> <p><img src="x.png" alt="External image"></p> >>> >>> ...from this: >>> >>> <p>External image</p> >>> >>> ...in user agents that don't support images. In particular, a user >>> agent like Lynx wouldn't distinguish the two cases above, but would >>> show the image in the following case in a distinct UA-styled manner: >>> >>> <p><img src="x.png"></p> >> >> That behaviour is not the most useful for the user: even if the alt text >> truly is an equivalent of the image and can completely replace it in the >> page, the user may want to save the image to disk so they can look at it >> later or upload it to their own site, or copy the URI to a friend who >> has a graphical UA, or activate their UA's advanced image analysis >> feature to get a detailed description (e.g. to find out the colours in a >> company's logo via an <img src="logo.png" alt="Megacorp Inc">). > > Sure, I didn't mean to imply that the image wasn't selectable. I'm just > saying that the default representation would just show images the same as > text (and different from, say, links) but that images without alternative > text would be shown in a distinct way. Okay - I was understanding "a user agent like Lynx wouldn't distinguish the two cases above" to mean it actually wouldn't distinguish the two cases, and so they would look and act exactly the same, and so you couldn't do anything to the image (e.g. select it and open it in an external program) that you couldn't equally do to text (since if you could, that would distinguish the cases). > An alternative would be to require alt="" to be specified on these images > (e.g. with your suggestion "External Image", or "Photo", or whatever -- a > caption, in this case, not an alternative) and then add a new attribute > which means "This image is intended to be used as an image and cannot be > considered equivalent to any text": > > <figure> > <img src="1100670787_6a7c664aef.jpg" alt="Photo" > importantimage="importantimage"/> > <legend>Bubbles traveled everywhere with us.</legend> > </figure> > > Then, the alternative text (which would be required to be a short label > for the kind of image being discussed, not its caption, not a description, > and obviously not any kind of alternative or replacement) would be taken > and made available to the user in a UI like this: > > [Image: Photo] > > ...in a manner clearly distinguishable from <span>Photo</span> and <img > src="..." alt="Photo"> (and maybe more similar to <a href="">Photo</a>). Most important images won't have the 'importantimage' attribute (because of existing content, existing authoring tools, and lack of incentive in the future). When a UA has some useful features for interacting with important images, it will have to provide those features on non-importantimage images too, else it will have a serious usability bug that prevents those features being used on a vast majority of pages. That means the UA will already have some unobtrusive way of distinguishing plain text from normal image alt text (e.g. Lynx and ELinks use a different colour font; Links just puts the image in the selection cycle and says "Image http://..." at the bottom when it's selected; Safari+VO says "image" in its 'Type' voice after reading the alt text), and that mechanism would be equally sufficient for distinguishing importantimage alt text from plain text. Users can then distinguish important images from unimportant images based on the alt text value and the context, e.g. an image called "Main photo" in the middle of a Flickr page is probably worth their attention. That seems likely to be more reliable than author-supplied metadata about the strength of the alt text. Then the importantimage attribute has no remaining effect, so it can be dropped. That just leaves the spec requiring alt to be a textual equivalent of the image in the cases where that's possible, and a short informative label where that is not possible. -- Philip Taylor pjt47@cam.ac.uk
Received on Monday, 5 May 2008 10:17:44 UTC