Here's a module that does the same thing:
http://drupal.org/project/image_caption_formatter

Comments

fietserwin’s picture

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?

claudiu.cristea’s picture

Status: Active » Closed (won't fix)

There are a lot of contrib modules doing that. Closing this.

fietserwin’s picture

Version: 8.x-dev » 9.x-dev
Status: Closed (won't fix) » Active

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.

Hoping that it can be added to D9.

claudiu.cristea’s picture

Version: 9.x-dev » 8.x-dev

Hm... The let's try to push it in 8.x :)

jhedstrom’s picture

Issue summary: View changes
Status: Active » Closed (duplicate)