Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
HTML5 introduces the <figure> and <figcaption> tags. These should be used for this. IE <= 8 can be made to "work" with this (i.e. allow it to be styled) using html5shiv.
Another question would be: do we introduce a 3rd textfield for the image field alongside alt and title, or do we combine tile and caption as does the mentioned project?
Now that captions are recognized by html5 as being valid structural/semantic markup (which it IMO indeed is) I would expect Drupal 8 to support it out of the box. But I guess it is to late now, as it still should be considered a feature, not a bug.
Comments
Comment #1
fietserwinHTML5 introduces the <figure> and <figcaption> tags. These should be used for this. IE <= 8 can be made to "work" with this (i.e. allow it to be styled) using html5shiv.
Another question would be: do we introduce a 3rd textfield for the image field alongside alt and title, or do we combine tile and caption as does the mentioned project?
Comment #2
claudiu.cristeaThere are a lot of contrib modules doing that. Closing this.
Comment #3
fietserwinNow that captions are recognized by html5 as being valid structural/semantic markup (which it IMO indeed is) I would expect Drupal 8 to support it out of the box. But I guess it is to late now, as it still should be considered a feature, not a bug.
Hoping that it can be added to D9.
Comment #4
claudiu.cristeaHm... The let's try to push it in 8.x :)
Comment #5
jhedstromThis went in with #2014895: Image captions & alignment (for inline images).