This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 14150 - I am a photographer as well as a hand-coding web designer. One thing that frustrates me is the duplicity between alt="" and title="" for photographs and photographers. For instance: <img class="thumbnail" alt="David Kyles" title="David Kyles Shock and Awe
Summary: I am a photographer as well as a hand-coding web designer. One thing that fru...
Status: RESOLVED INVALID
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: Edward O'Connor
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords: a11y, a11y_text-alt
Depends on:
Blocks:
 
Reported: 2011-09-14 21:20 UTC by contributor
Modified: 2012-09-06 16:11 UTC (History)
11 users (show)

See Also:


Attachments

Description contributor 2011-09-14 21:20:48 UTC
Specification: http://dev.w3.org/html5/spec/Overview.html
Multipage: http://www.whatwg.org/C#top
Complete: http://www.whatwg.org/c#top

Comment:
I am a photographer as well as a hand-coding web designer. One thing that
frustrates me is the duplicity between alt="" and title="" for photographs and
photographers.

For instance:


<img class="thumbnail" alt="David Kyles" title="David Kyles Shock and Awe"
src="http://files.casuals.us/ybp/2011/1-29/Small/DSC_4320.JPG" />

I wish I didn't have to type David Kyles twice.

This is quick summary of the problem:

1. Search engines ignore the title. (I have verified this because title tags
for photos up for several years never show as results in Google images, but
keywords contained in alt tags have helped some images rise to the very top of
Google image results for many of my sports photos.)

2. Browsers ignore the alt tag (assuming the page is rendered rather than
read).

So any info that might be meaningful to search engines and viewers needs to be
repeated twice.

If I'm in a hurry, I would much rather provide info that viewers can see (in a
news release 30 minutes after a game) than search engines will see (days,
weeks, or months later).

However, after years of fighting this battle, I am CERTAIN that this dichotomy
of purposes should not exist.

Any image titable with a title tag automatically implies a photograph, work of
art, or other image with a meaning to it.

The title of the image being present is a contextual suggestion that indicates
the image is more than a graphic used to layout the web page, and aural
browsers would automatically understand the context of the title even BETTER
than providing simply an alt tag.

The presence of a title tag in an image is not equivalent to an alt tag.

However, the presence of a title tag WITHOUT an alt tag should be recognized
as an explicit indicator that the title tag provides the information needed
for the alt tag as well. This is exactly as it should be for photographs and
other material, not only to indicate the content of the photograph for those
not actually viewing the photograph, but also to indicate the context of an
alt tag as being TITLE in addition to merely specifying alternate info about
an unspecified kind of image.


Posted from: 70.166.227.119
User agent: Opera/9.80 (Windows NT 6.1; U; en) Presto/2.9.168 Version/11.51
Comment 1 Ian 'Hixie' Hickson 2011-09-14 23:42:16 UTC
> For instance:
> 
> <img class="thumbnail" alt="David Kyles" title="David Kyles Shock and Awe"
> src="http://files.casuals.us/ybp/2011/1-29/Small/DSC_4320.JPG" />
> 
> I wish I didn't have to type David Kyles twice.

You don't have to. In fact, you're required not to. That's horrible alternative text.

Assuming the photograph is a key part of the content, I encourage you to see:
   http://www.whatwg.org/C#a-key-part-of-the-content
Comment 2 html5bugs 2011-09-15 14:33:20 UTC
Ian, actually your link gives an even better example of the problem.

Read the alternate text that is shown in the example:


"The desktop is blue, with icons along the left hand side in
           two columns, reading System, Home, K-Mail, etc. A window is
           open showing that menus wrap to a second line if they
           cannot fit in the window. The window has a list of icons
           along the top, with an address bar below it, a list of
           icons for tabs along the left edge, a status bar on the
           bottom, and two panes in the middle. The desktop has a bar
           at the bottom of the screen with a few buttons, a pager, a
           list of open applications, and a clock."

Besides the fact that hard wrapping and indentation destroy future usability of the text, this alternative text is the horrible.

All of those things mentioned in the alternative text would be useful even for someone viewing the image--highlighting things like the menus wrapping to a second line--because no one except for the creator of KDE light would be paying special attention to this unless it was pointed out to them.

Since alt text is hidden from users viewing the image, a no-win situation is created. In order to show ordinary users the text, the text needs to be moved outside the alt tag. In order to place the text inside the alt tag as well and associate it with the "alternative text" of the image, then a web developer must commit the ultimate crime against semantic meaningfulness--copying and pasting identical information.

My position is that ANY information, whether suitable for alternative text or not, which has meaning for a user actually viewing the image, needs to be allowed to be associated with the image in such a way that it is clear how the role of the text correlates to the image, and that it also provides several BETTER ways of providing alternative text with MORE semantic meaning than copying and pasting data from outside the image (or inside the title attribute) to inside of the alt attribute.

So what I am saying is that there is WAY too much false information about the alt tag making it sound as though information literally needs to be copied and pasted.

The standards should encourage authors to provide information that is more meaningfully tagged and less conflicting that the alt tag. The inherent problem with the alt tag is that it tries to decide to hide or show the data it contains depending on whether the image is shown. Data which is available to the user regardless of whether the image is shown is infinitely better.
Comment 3 theimp 2011-09-17 05:12:04 UTC
Alt is for Alternative. By definition, it's intended for when the image is not used (e.g. not viewed by a user, or not analyzed by a search engine).

Alt is not for general-purpose metadata, such as search engine hooks or authorship information.

Text that is needed in the alt tag - text describing the image - is not needed by those who can see the image. Text that other users need, such as discussion of the image, or attributes of the image like the date it was created, and so on, should not be in the alt text.

In some very particular cases, you can have a little bit of overlap; but usually, the information is distinct.

> <img class="thumbnail" alt="David Kyles" title="David Kyles Shock and Awe"
src="http://files.casuals.us/ybp/2011/1-29/Small/DSC_4320.JPG" />

A better alternative for a gallery:

<img class="thumbnail" 
alt="David Kyles, Professional Basketballer for the Wichita State Shockers, taking a shot from three-point range during the 2011 final against the Alabama Crimson Tide"
title="Shock and Awe"
src="http://files.casuals.us/ybp/2011/1-29/Small/DSC_4320.JPG" />

This is better because it describes what is important about the image when it can't be seen. Presumably, anyone seeing the image will know what's important about it, because the author doesn't think that they need to be told.


However, if there was an associated paragraph afterwards (that is, if all users would benefit from the text), then what is a useful alternative would change; for example:

<h1>Shock and Awe</h1>

<figure>

<img class="thumbnail" 
alt="Profile color photo of David Kyles shooting a basketball"
title="Shock and Awe by $photographer"
src="http://files.casuals.us/ybp/2011/1-29/Small/DSC_4320.JPG" />

<figcaption>David Kyles, Professional Basketballer for the Wichita State Shockers, taking a shot from three-point range during the 2011 final against the Alabama Crimson Tide.</figcaption>
</figure>

Less detail about the relevance of the photo (i.e. why it is important to the context of the page), and more about the details of the style of the photo (i.e. what qualities make distinguish it from other similar images), are more appropriate now, because the alt attribute only needs to describe details that are alternative to the photo; other details are explained in the text, and therefore are not to be duplicated in the alt attribute because they are no longer alternative.

In some circumstances, a particularly detailed caption might render the image (particularly a data-heavy and stylistically-minimal image, such as a chart) merely decorative: and in this case, even a completely blank alt might be appropriate, though this would be a limited case.

Just like the image itself, what is an alternative depends on the context of the placement in, and other content of, the document.


If even more specificity is needed, then that really needs to be solved with microdata/metadata formats such as RDF.


The issue of how search engines uses the alt vs title attribute is a search engine issue, not an HTML issue.

Even though that may concern you, consider that, as the new markup (such as figure and figcaption) in HTML5 becomes better used by authors, it will be easier for search engines to consider them in their algorithms in the near future.
Comment 4 html5bugs 2011-09-22 15:26:31 UTC
Thanks. I didn't really anticipate much of a response. Your comprehensive responses are much appreciated.

I just felt so strongly that I needed to express my feelings.

Over 13 years of web developing, and especially now that HTML 5 is being finalized, it became clear to me how overwhelmingly important it is to at least *attempt* to correct the mistake of hiding valuable data inside the alt tag.

As long as this message gets through effectively, I am happy, and the future is brighter. You don't even need to read on in this message.

The interpretations and applications of it are manifold and cascading.

* Don't ever let valuable information be hidden in the alt tag (hidden means useful in SOME way to someone even who can see the image; info that is truly available by virtue of seeing the image would not be "hidden" by the alt tag)
* Don't ever duplicate data inside and outside the alt tag. HTML needs to be advanced to the point that data visible from outside the alt tag can be correlated with the image. title="..." seems like the perfect way to do that, and no change is necessary to HTML.
* Don't ever force people to say alt="" in order to prove that an image has no alternative representation (what's up with that? passing an HTML validation test by inserting dummy code is crazy and ideas like that do not belong in a language specification as it has been in past specifications--hopefully it won't be in HTML 5)

It's a lot more clear when doing hand-coding. With computer-aided HTML authoring it is easy, for instance, with perl: alt="$descrip" title="$descrip" (You probably wince almost as much as I do at that abominable mis-use of attributes.)

HTML and related technologies are like a "baby" to me. For 5-6 years I used to spend never less than 10 hours per day doing programming, often 16 hours/day--in the same path as Ian Hickson, David Hyatt, Christoph Pfisterer, Colin Percival and other contemporaries who are significantly responsible for the success of Amazon.com, Apple, etc. (Financial analysts and marketing gurus don't ever give enough credit to the brilliant programmers behind successful computer-based businesses.) Unlike them, I stopped before I made any influential contributions. About the same time that they achieved great success, I diverged from such intense participation in HTML, Mozilla, Camino, Firebird/Firefox, etc., and achieved my mathematics doctorate, and now try to teach others, by inspiration of those like Franz Liszt, Jesus Christ, and others. I feel like a failure after being back at the beginning of college algebra for the 20th time (just like I had failed math 19 times, so I have to start over). But it's all worth it to make a positive difference in others' lives. 

I don't have time anymore even to maintain my own websites or pages about programming. (And honestly, I haven't even checked back on this "bug" for nearly a week. I apologize.)

But when something seems to be going wrong in HTML, I just feel like I have a _duty_ to chime in.
Comment 5 html5bugs 2011-09-24 19:36:01 UTC
This is what the current "best practices" are, which shows in the "real world" what people are doing in order to deal with the problem of alt hiding information and being "all but mandatory" while the title attribute does not hide information, but is meaningless to data gathering tools.

This workaround is easy to do when generating code via program, but it is terrible.

Once again, the inherent problem
with the alt tag is that it tries to decide to hide or show the data it
contains depending on whether the image is shown. There are very few, if any cases, where it can be proven that information given in an alt tag is absolutely meaningless to someone who can view the image (even a single, seemingly redundant, bit of text, can greatly clarify the contents of an image).

As mentioned before, data which is available to
the user regardless of whether the image is shown is infinitely better.

<img src="http://l.yimg.com/bt/api/res/1.2/iZ5_LEa2m34dWe1zMfjvZA--/YXBwaWQ9eW5ld3M7Y2g9MzU0MDtjcj0xO2N3PTQ4MDA7ZHg9MDtkeT0wO2ZpPXVsY3JvcDtoPTE0MTtxPTg1O3c9MTkw/http://media.zenfs.com/en_us/News/ap_webfeeds/a8bdbdba7fc5b115f90e6a7067005814.jpg" width="190" height="141" alt="In this July 15, 2011 photo, atop roughly two miles of ice, technician Marie McLane launches a data-transmitting weather balloon at Summit Station, a remote research site operated by the U.S. National Science Foundation (NSF), and situated 10,500 feet above sea level, on top of the Greenland ice sheet. Climate scientists overwhelmingly agree that manmade greenhouse gases are warming the planet, accelerating the melt of Greenland&#39;s ice, and yet resistance to the idea appears to have hardened among many Americans. Why? &quot;The desire to disbelieve deepens as the scale of the threat grows,&quot; concludes one scholar who has studied the phenomenon. Analysts now see climate as another battleground in America&#39;s left-right &quot;culture wars.&quot; (AP Photo/Brennan Linsley)" title="In this July 15, 2011 photo, atop roughly two miles of ice, technician Marie McLane launches a data-transmitting weather balloon at Summit Station, a remote research site operated by the U.S. National Science Foundation (NSF), and situated 10,500 feet above sea level, on top of the Greenland ice sheet. Climate scientists overwhelmingly agree that manmade greenhouse gases are warming the planet, accelerating the melt of Greenland&#39;s ice, and yet resistance to the idea appears to have hardened among many Americans. Why? &quot;The desire to disbelieve deepens as the scale of the threat grows,&quot; concludes one scholar who has studied the phenomenon. Analysts now see climate as another battleground in America&#39;s left-right &quot;culture wars.&quot; (AP Photo/Brennan Linsley)">

Source:

http://news.yahoo.com/american-allergy-global-warming-why-171043981.html
Comment 6 Silvia Pfeiffer 2011-09-24 22:09:47 UTC
I don't follow you: if the author finds that the text description is relevant to all viewers, they will put it on the page itself and use aria-describedby to link to it rather than alt. By design @alt is only used to help users of screen-readers.

BTW: some platforms also allow you to right-click and find out information about the image with the text in @alt included.

It seems that all you are asking for is already possible.
Comment 7 Edward O'Connor 2012-09-06 16:10:28 UTC
See Ian and Silvia's comments above.
Comment 8 Edward O'Connor 2012-09-06 16:11:38 UTC
Sorry, I forgot to include the editor boilerplate.

EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are
satisfied with this response, please change the state of this bug to CLOSED. If
you have additional information and would like the Editor to reconsider, please
reopen this bug. If you would like to escalate the issue to the full HTML
Working Group, please add the TrackerRequest keyword to this bug, and suggest
title and text for the Tracker Issue; or you may create a Tracker Issue
yourself, if you are able to do so. For more details, see this document:

   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: No change.
Rationale: See Ian and Silvia's comments above.