Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
HTML element
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===<code>longdesc</code> attribute=== In [[HTML]], '''<code>longdesc</code>''' is an attribute used within the {{tag|img|s}}, {{tag|frame|s}}, or {{tag|iframe|o}} elements. It is supposed to be a [[URL]]{{refn|group=note|Strictly an [[Internationalized resource identifier|IRI]], not a URL; although URLs are a subset of IRIs.}} to a document that provides a '''long description''' for the image, frame, or iframe in question.<ref>{{cite web|url=http://www.w3.org/TR/REC-html40/struct/objects.html|title=Objects, Images, and Applets|publisher=W3C|access-date=2008-12-20}}</ref> This attribute should contain a URL, {{em|not}} β as is commonly mistaken β the text of the description itself. <code>longdesc</code> was designed to be used by [[screen reader]]s to display image information for computer users with [[accessibility]] issues, such as the blind or [[Visual_impairment |visually impaired]], and is widely implemented by both web browsers and screen readers.<ref>{{cite web|url=http://www.w3.org/html/wg/wiki/ChangeProposals/InstateLongdesc/Implementation|title=InState Longdesc|access-date=2011-09-05}}</ref> Some developers object that<ref>{{cite web|url=http://www.webaim.org/techniques/images/longdesc.php#longdesc|title=Creating Accessible Images|publisher=WebAim|access-date=2008-12-20}}</ref> it is actually seldom used for this purpose because there are relatively few authors who use the attribute and most of those authors use it incorrectly; thus, they recommend deprecating <code>longdesc</code>.<ref>{{citation|url=http://wiki.whatwg.org/wiki/Longdesc_usage |title=Longdesc usage - WHATWG Wiki |publisher=Wiki.whatwg.org |access-date=2012-03-26}}</ref> The publishing industry has responded, advocating the retention of <code>longdesc</code>.<ref>{{cite web|url=http://www.w3.org/Bugs/Public/show_bug.cgi?id=13461|title=Bug 13461 - Commentary on Issue #30 (longdesc) from the Association of American Publishers |access-date=2011-09-05}}</ref> ====Example==== <syntaxhighlight lang="html"> <img src="Hello.jpg" longdesc="description.html"> </syntaxhighlight> <br />Content of <code>description.html</code>: <syntaxhighlight lang="html"> <br /> <p>This is an image of a two-layered birthday cake.</p> ... </syntaxhighlight> ====Linking to the long description in the text==== Since very few graphical browsers support making the link available natively (Opera and iCab being the exceptions), it is useful to include a link to the description page near the {{tag|img|s}} element whenever possible, as this can also aid sighted users. =====Example===== <syntaxhighlight lang="html"> <img src="Hello.jpg" longdesc="description.html" /> [<a href= "description.html" title="long description of the image">D</a>] </syntaxhighlight>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)