Bug #28752

css_styled_content: longdesc attribute is obsolete in HTML5

Added by Patrick Broens about 10 years ago. Updated almost 6 years ago.

Must have
Start date:
Due date:
% Done:


Estimated time:


css_styled_content is adding a longdesc attribute to the img tag when the value has been filled by an editor. The longdesc attribute on images is obsolete in HTML5.

This is what the W3C validator says:

The longdesc attribute on the img element is obsolete. Use a regular a element to link to the description.

Solution: Add an anchor tag around the image, if the image is not linked yet. Otherwise, don't do anything with the longdesc url.

Related issues

Related to Accessibility Project - Bug #28881: css_styled_content: aria-describedby attribute shows up although there is no caption linkResolvedPatrick Broens2011-08-10


Updated by Thomas Deinhamer about 10 years ago

There's also another solution
which I'm using in hype_html5:

  <a href="#enlarged-version">
    <img />
    <a href="#longdesc-url">

Advantage: There can be an image
link or a lightbox/enlarged version
additionally to a linked caption.

Another solution would be to
a.) link the longdesc-url on
the image itself only if
there's no link yet, otherwise
b.) link the caption, if available.

But I think that's to confusing.


Updated by Thomas Deinhamer about 10 years ago

One argument for the mentioned solution
would be that linking the caption to a
"longer" description makes good sense
in terms of semantic, I guess.


Updated by Patrick Broens about 10 years ago

Hi Thomas,

I'm moving your comments to the content rendering mailing list. I would like to discuss this there. Otherwise we have two platforms where we are discussing issues.


Updated by Patrick Broens about 10 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset commit:ae83873186531d17fcde4d0df0068b6e78678a5b.


Updated by Wolfgang Hamster almost 6 years ago


my Typo3 7.5 textpic output looks like: <img width="300" height="452" longdesc="" alt="" src="fileadmin/xx/foo.jpg">

How can I remove the longdesc-tag?

Also available in: Atom PDF