/
index.md
69 lines (50 loc) · 2.2 KB
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
title: "HTMLImageElement: longDesc property"
short-title: longDesc
slug: Web/API/HTMLImageElement/longDesc
page-type: web-api-instance-property
status:
- deprecated
browser-compat: api.HTMLImageElement.longDesc
---
{{APIRef("HTML DOM")}}{{deprecated_header}}
The _deprecated_ property **`longDesc`** on
the {{domxref("HTMLImageElement")}} interface specifies the URL of a text or HTML file
which contains a long-form description of the image. This can be used to
provide optional added details beyond the short description provided in the
[`title`](/en-US/docs/Web/HTML/Global_attributes#title) attribute.
## Value
A string which may be either an empty string (indicating that no long
description is available) or the URL of a file containing a long form description of the
image's contents.
For example, if the image is a [PNG](/en-US/docs/Web/Media/Formats/Image_types#png_portable_network_graphics) of a flowchart.
The `longDesc` property could be used to provide an explanation of the flow
of control represented by the chart, using only text. This can be used by readers both
as an explanation, but also as a substitute for visually-impaired users.
## Usage notes
This property is _deprecated_ and should no longer be used. Instead of
using `longDesc` to provide a link to a detailed description of an image,
encapsulate the image within a link using the {{HTMLElement("a")}} element.
Consider the following older HTML:
```html
<img
src="taco-tuesday.jpg"
alt="Taco Tuesday"
longdesc="image-descriptions/taco-tuesday.html" />
```
Here, the `longDesc` is used to indicate that the user should be able to
access a detailed description of the image `taco-tuesday.jpg` in the HTML
file `image-descriptions/taco-tuesday.html`.
This can be easily converted into modern HTML:
```html
<a href="image-descriptions/taco-tuesday.html">
<img src="taco-tuesday.jpg" alt="Taco Tuesday" />
</a>
```
With that, the image is a link to the HTML file describing the image in more detail.
## Specifications
This feature is not part of any current specification. It is no longer on track to become a standard.
## Browser compatibility
{{Compat}}
## See also
- [`aria-details`](/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-details)