# Using Captions for Images and Tables in XWiki.org Documentation

**URL:** <https://forum.xwiki.org/t/using-captions-for-images-and-tables-in-xwiki-org-documentation/17525>\
**Category:** Development\
**Tags:** brainstorming, documentation\
**Created:** [August 20, 2025, 9:16am UTC](https://forum.xwiki.org/t/using-captions-for-images-and-tables-in-xwiki-org-documentation/17525 "2025-08-20T09:16:24Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![elenicojocariu](https://forum.xwiki.org/letter_avatar_proxy/v4/letter/e/b9e5f3/32.png) [@elenicojocariu](https://forum.xwiki.org/u/elenicojocariu)\
**Post date:** [August 20, 2025, 9:16am UTC](https://forum.xwiki.org/t/using-captions-for-images-and-tables-in-xwiki-org-documentation/17525/1 "2025-08-20T09:16:24Z")

</div>

Hi everyone! 👋

This topic is about discussing whether to use or not captions for images and tables in documentation.

So far, in the new documentation at: [https://www.xwiki.org/xwiki/bin/view/Doc/](https://www.xwiki.org/xwiki/bin/view/Doc/) we haven’t used captions. They were also not generally applied before in the: [https://www.xwiki.org/xwiki/bin/view/Documentation/](https://www.xwiki.org/xwiki/bin/view/Documentation/).

Currently, in the [Documentation Guide](https://dev.xwiki.org/xwiki/bin/view/Community/DocGuide#HScreenshots2FImages), there is already a rule that hasn’t really been followed:

> _“You should add a piece of text in italics under images that describes what that image is about (by using the caption parameter of the image macro).”_

So, if we decide to enforce captions, the implementation could rely on the **caption parameter** of the image macro.

The pros of having them are:

- They improve SEO and accessibility.

The cons:

- They might make the documentation harder to write and contribute to.
- It’s possible that developers might avoid using images if there are too many rules, so globally it wouldn’t necessarily be an improvement for the documentation.

Having too many rules makes things harder to follow. Ideally, we should support them with automation checks and work on a “documentation guide” XWiki application for [xwiki.org](http://xwiki.org), to verify and enforce the maximum number of rules from the [documentation guide](https://dev.xwiki.org/xwiki/bin/view/Community/DocGuide) automatically.

WDYT?

---

<div class="post-metadata">

**Author:** ![vmassol](https://forum.xwiki.org/user_avatar/forum.xwiki.org/vmassol/32/6_2.png) [@vmassol](https://forum.xwiki.org/u/vmassol)\
**Post date:** [August 20, 2025, 9:44am UTC](https://forum.xwiki.org/t/using-captions-for-images-and-tables-in-xwiki-org-documentation/17525/2 "2025-08-20T09:44:19Z")

</div>

How do you propose to implement captions for Tables?

With the `{{figure}}` and `{{figureCaption}}` macros?

My POV is that it’s too much work to have them and they’re more suited for a book than a website. There’s already a lot to do on other topics and I fear that we’re going to make it hard or impossible for anyone to contribute. Now, we might be passed this point already as the doc guide is beefing up every day, so we could also go all-in. If we want to have captions, then I’d suggest to make the rendering fail if they’re not present or on page save.

Generally speaking, I believe we should have an Event Listener on page save that validate the doc guide as much as possible.

Note: That reminds me of the RedPen GSOC: [https://dev.xwiki.org/xwiki/bin/view/GoogleSummerOfCode/RedPenIntegration2017](https://dev.xwiki.org/xwiki/bin/view/GoogleSummerOfCode/RedPenIntegration2017) (See [https://www.redpen.cc/](https://www.redpen.cc/) too).

---

<div class="post-metadata">

**Author:** ![elenicojocariu](https://forum.xwiki.org/letter_avatar_proxy/v4/letter/e/b9e5f3/32.png) [@elenicojocariu](https://forum.xwiki.org/u/elenicojocariu)\
**Post date:** [August 20, 2025, 10:32am UTC](https://forum.xwiki.org/t/using-captions-for-images-and-tables-in-xwiki-org-documentation/17525/3 "2025-08-20T10:32:44Z")

</div>

> [@vmassol](#):
>
> How do you propose to implement captions for Tables?
> 
> With the `{{figure}}` and `{{figureCaption}}` macros?

It’s either with the [`{{figure}}` and `{{figureCaption}}` macros](https://extensions.xwiki.org/xwiki/bin/view/Extension/Figure/Figure%20Macro/) indeed, or by using a summary attribute `(% summary="" %)`. The difference between the two is that the `{{figure}}` macro displays the caption directly in the page content, so it’s accessible to screen readers and search engines, and visible to readers. The summary attribute is mostly for accessibility (and is a bit deprecated), but not visible to readers.

---

<div class="post-metadata">

**Author:** ![CharpentierLucas](https://forum.xwiki.org/user_avatar/forum.xwiki.org/charpentierlucas/32/4830_2.png) [@CharpentierLucas](https://forum.xwiki.org/u/CharpentierLucas)\
**Post date:** [August 21, 2025, 9:20am UTC](https://forum.xwiki.org/t/using-captions-for-images-and-tables-in-xwiki-org-documentation/17525/4 "2025-08-21T09:20:44Z")

</div>

> [@elenicojocariu](#):
>
> Currently, in the [Documentation Guide](https://dev.xwiki.org/xwiki/bin/view/Community/DocGuide#HScreenshots2FImages), there is already a rule that hasn’t really been followed:
> 
> > _“You should add a piece of text in italics under images that describes what that image is about (by using the caption parameter of the image macro).”_

This rule contains the verb `should` and not `must`, so as far as I understand it’s technically correct to not apply it.

I agree that enforcing captions everywhere will make it even harder to contribute to documentation. I like the way it is now, a recommendation but not an obligation, and I don’t think we need to change this rule strictness.

**I’m -0 on this, I personally wouldn’t mind enforcing it but I doubt it’d be a good compromise to make at the community level: potential doc contributions VS doc quality improvements.**

We should definitely improve how we handle `should` rules though.

Side reference: Here’s the [HTML and CSS guidelines](https://dev.xwiki.org/xwiki/bin/view/Community/CodeStyle/XhtmlCssCodeStyle/#HCSS), which has a similar `MUST`/`SHOULD` distinction. Because it’s a critical property of every rule and can change completely how people view/apply a rule, we (the guideline editors) organized the guidelines around the levels of priority.

* * *

> [@vmassol](#):
>
> Generally speaking, I believe we should have an Event Listener on page save that validate the doc guide as much as possible.

+1 from me on this idea

It could fail rendering of edits that don’t comply with our documentation rules (MUST), and send warnings for edits that don’t comply with our doc quality best practices (SHOULD). This way, if we handle these warnings properly, we can keep an updated list of quality fixes TODOs on a technical page of our doc wiki. This could make it easier to find concrete improvements to implement on DocFixingDays.

E.g. it’s DFD, I go on the document to check the warnings, filter the `imageMissingCaption` warning category and start adding caption to doc images where it’s missing.  
VS today, if I want to improve the quality of our doc, I start by picking a page to review and scan through its content to check that our rules are followed. In this, old and forgotten docs are never reviewed and brought up to our standard.

The main compromise I see here is:  
- time implementing and maintaining this doc validator  
+ improving doc consistency and quality

* * *

Thanks for starting this brainstorming!  
Looking forward to its results 🙂

Lucas

---

<div class="post-metadata">

**Author:** ![gabrielc](https://forum.xwiki.org/letter_avatar_proxy/v4/letter/g/d9b06d/32.png) [@gabrielc](https://forum.xwiki.org/u/gabrielc)\
**Post date:** [August 28, 2025, 1:46pm UTC](https://forum.xwiki.org/t/using-captions-for-images-and-tables-in-xwiki-org-documentation/17525/5 "2025-08-28T13:46:14Z")

</div>

I like the idea. However, it may indeed add too much beaurocracy to images.

My initial thought was to see if the value of the `alt` attribute could be somehow copied into the figure caption, as I’d imagine every image already has an `alt`. However, according to [this article](https://www.boia.org/blog/should-you-include-alt-text-for-pictures-with-captions) I’ve found, the `alt` attribute is not required as long as there’s a caption.

I’ve looked at the Documentation Guide and couldn’t see anything about usage of the `alt` attribute. What’s the policy around its usage?

If no `alt`s are used, I’m leaning towards adding captions to images. If `alt`s are used, then I think it’s not as much of an issue.

---

<div class="post-metadata">

**Author:** ![elenicojocariu](https://forum.xwiki.org/letter_avatar_proxy/v4/letter/e/b9e5f3/32.png) [@elenicojocariu](https://forum.xwiki.org/u/elenicojocariu)\
**Post date:** [September 3, 2025, 12:34pm UTC](https://forum.xwiki.org/t/using-captions-for-images-and-tables-in-xwiki-org-documentation/17525/6 "2025-09-03T12:34:55Z")

</div>

Hi!  
`alt` is a HTML attribute that can be used in [XWiki Syntax](https://www.xwiki.org/xwiki/bin/view/Documentation/UserGuide/Features/XWikiSyntax/?syntax=2.1&section=Images) and defines what text is displayed when the browser is not able to display the image. The difference from the `caption` parameter of the image macro is that the caption provides a visible text shown alongside the image.

BTW I really like @CharpentierLucas 's idea of having “musts” and “shoulds” in the doc. I think this is a case where we have a should.

Thanks!

---

<div class="post-metadata">

**Author:** ![CharpentierLucas](https://forum.xwiki.org/user_avatar/forum.xwiki.org/charpentierlucas/32/4830_2.png) [@CharpentierLucas](https://forum.xwiki.org/u/CharpentierLucas)\
**Post date:** [September 3, 2025, 12:53pm UTC](https://forum.xwiki.org/t/using-captions-for-images-and-tables-in-xwiki-org-documentation/17525/7 "2025-09-03T12:53:00Z")

</div>

> [@elenicojocariu](#):
>
> `alt` is a HTML attribute that can be used in [XWiki Syntax](https://www.xwiki.org/xwiki/bin/view/Documentation/UserGuide/Features/XWikiSyntax/?syntax=2.1&section=Images) and defines what text is displayed when the browser is not able to display the image.

It’s especially important for accessibility: people that cannot rely on vision will REALLY need this alt to understand what you’re showing. If you’re not adding an alt, you’re ‘hiding’ information from a lot of assistive technology users. Here’s a short example of how alt text will help 🙂

[![](https://forum.xwiki.org/uploads/default/original/2X/7/726ef623e208149140b598d815c7ce92c3e40c44.jpeg "How blind people view pictures online. #AltText #accessibility") ](https://www.youtube.com/watch?v=HBiTPoST2FM)

Adding captions on all pictures is not always possible because of design (e.g. the XWiki logo in the top left corner of this forum UI would look weird with a caption). An alt is completely invisible in most use cases but it’s a solid fallback in all situations where things don’t work out as expected.

For reference, here is a pretty well written page about image alts:

> **[Write helpful Alt Text to describe images | Digital Accessibility​](https://accessibility.huit.harvard.edu/describe-content-images)**
>
> Alternative (Alt) Text is an essential part of making content accessible. When adding images, charts, icons or other graphic elements, alt text should be added to ensure your content will be accessible to all users.

Thanks,  
Lucas C.

---

<div class="post-metadata">

**Author:** ![paulinebessoles](https://forum.xwiki.org/user_avatar/forum.xwiki.org/paulinebessoles/32/8369_2.png) [@paulinebessoles](https://forum.xwiki.org/u/paulinebessoles)\
**Post date:** [September 3, 2025, 12:54pm UTC](https://forum.xwiki.org/t/using-captions-for-images-and-tables-in-xwiki-org-documentation/17525/8 "2025-09-03T12:54:23Z")

</div>

> [@CharpentierLucas](#):
>
> **I’m -0 on this, I personally wouldn’t mind enforcing it but I doubt it’d be a good compromise to make at the community level: potential doc contributions VS doc quality improvements.**

-0 Same as Lucas, I think we should keep it as it is and only recommend it.

> [@vmassol](#):
>
> Generally speaking, I believe we should have an Event Listener on page save that validate the doc guide as much as possible.

+1 for the Event listener, I think it could also make the contributing guidelines slowly known by contributors, that might not read the guide at first, and progressively learn guidelines and best practices one contribution after the other.

---

<div class="post-metadata">

**Author:** ![elenicojocariu](https://forum.xwiki.org/letter_avatar_proxy/v4/letter/e/b9e5f3/32.png) [@elenicojocariu](https://forum.xwiki.org/u/elenicojocariu)\
**Post date:** [September 3, 2025, 1:49pm UTC](https://forum.xwiki.org/t/using-captions-for-images-and-tables-in-xwiki-org-documentation/17525/9 "2025-09-03T13:49:21Z")

</div>

Thanks a lot for clarifying this! I actually thought `alt` was mainly for cases where the image can’t be loaded (e.g., no internet), and that only `captions` could address WCAG requirements. Now I understand that `alt` is very important for accessibility and for people who use assistive tools. Thanks for sharing the interesting video and article!

---

<div class="post-metadata">

**Author:** ![surli](https://forum.xwiki.org/user_avatar/forum.xwiki.org/surli/32/2687_2.png) [@surli](https://forum.xwiki.org/u/surli)\
**Post date:** [September 3, 2025, 3:44pm UTC](https://forum.xwiki.org/t/using-captions-for-images-and-tables-in-xwiki-org-documentation/17525/10 "2025-09-03T15:44:53Z")

</div>

I’m +1 to try using more often caption, and at the same time I agree with Lucas on keeping current rule and not adding more enforcement on this.

---

<div class="post-metadata">

**Author:** ![elenicojocariu](https://forum.xwiki.org/letter_avatar_proxy/v4/letter/e/b9e5f3/32.png) [@elenicojocariu](https://forum.xwiki.org/u/elenicojocariu)\
**Post date:** [September 10, 2025, 1:19pm UTC](https://forum.xwiki.org/t/using-captions-for-images-and-tables-in-xwiki-org-documentation/17525/11 "2025-09-10T13:19:27Z")

</div>

Hello!

The results of the discussion on this brainstorming can be found on this thread: [Proposal 18: Captions for Attachments, Tables](https://forum.xwiki.org/t/xwiki-org-documentation-reorganization-batch-11/17629#p-56375-proposal-18-captions-for-attachments-tables-2).

Thanks for participating!
