Skip to main content
Participating Frequently
June 13, 2018
Answered

<Caption> and <Table> tag

  • June 13, 2018
  • 2 replies
  • 5226 views

Good morning,

What is considered a Best Practice regarding Caption  and Tables tag?

  1. To have the <Caption> tag nested Inside the <Table> tag, and then all the <TR>. See Table 1 screenshot below.
  2. Or is it better to have it just above it, as a sibling of the <Table> tag? See Table 2 screenshot below.


I tested both examples with the PAC and with CommonLook and they are both OK, but I would like to know what is considered best practice.

Thanks, Rosana

PS: Also, Sometimes, depending on the context, also a heading level can be used instead of using the <caption>.

This topic has been closed for replies.
Correct answer vivek1389

Hi Rosana

As Olaf already mentioned, per the PDF specifications - "A structural element is understood to be "captioned" when a Caption structure element exists as an immediate child of that structure element. The Caption shall be the first or the last structure element inside its parent structure element."

So, it should be an immediate child of the table (or figure/ other applicable constructs)

[Moderator: Response edited]

Thanks

Vivek

2 replies

vivek1389
Adobe Employee
vivek1389Correct answer
Adobe Employee
June 27, 2018

Hi Rosana

As Olaf already mentioned, per the PDF specifications - "A structural element is understood to be "captioned" when a Caption structure element exists as an immediate child of that structure element. The Caption shall be the first or the last structure element inside its parent structure element."

So, it should be an immediate child of the table (or figure/ other applicable constructs)

[Moderator: Response edited]

Thanks

Vivek

Inspiring
June 13, 2018

According to the PDF standard, if you have a Caption inside a Table it must be the first or last child in inside the Table tag.

The PDF standard though does not mandate that you have to have the Caption for Table inside the Table, thus it may be OK to also have the Caption right before or right after the Table.

I have neither data nor own experience to estimate what might work best for certain types of assistive technologies (e.g. screen readers)  or repurposing tools (e.g. for reflow) or certain groups of users.

Olaf