Skip to: content, navigation

by Ian Lloyd

longdesc (HTML attribute)

Browser support full matrix
IE7 FF2 Saf3 Op9.5
None None None None
Spec
Depr. Version
No HTML 4.01
longdesc="Long description of iframe content"

Example

The longdesc attribute refers to a text file "stocks.txt":

<iframe src="stock-prices.php" height="200" width="200"
frameborder="1" title="The latest stock prices, including Nikkei,
FTSE100" longdesc="stocks.txt">
</iframe>

Description

For non-visual browsers (for example, people accessing web content using screen reader software), it can be difficult to understand what the embedded iframe content is used for. The simplest way to identify an iframe’s content/purpose is with the title attribute (as shown in the example, it should only be a brief description - a helpful summary rather than an unnecessarily overcomplicated hurdle). In order to provide more information/orientation for non-visual browsers, you may use the longdesc attribute to point to a file that contains a complete description of the iframe’s purpose or content.

Value

URL for a file which contains the extra descriptive text, most likely a simple .txt file.

Compatibility

IE5.5None
6.0None
7.0None
Firefox1.0None
1.5None
2.0None
Safari1.3None
2.0None
3.0None
Opera9.2None
9.5None

The longdesc attribute has almost zero practical use, even with today’s good standards-aware browsers. Despite the best intentions, no browser on the support charts makes it clear to the user when there is extra information for the iframe in the form of a descriptive text file. But why would they need to, though? If you can see the content, the content effectively explains itself! This attribute really is not aimed at sighted users, hence the lack of support.

User-contributed notes

There are no comments yet.

Add a note

To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.

Related Products

The Principles of Beautiful Web Design

Best Seller!

You don’t need to go to Art School to design great looking web sites!

Book Cover: The Principles of Beautiful Web Design

Download the FREE sample chapters