tablemaker icon indicating copy to clipboard operation
tablemaker copied to clipboard

Add caption to tablemaker field type

Open jamesmacwhite opened this issue 4 months ago • 4 comments

What are you trying to do?

It would be nice if the table field provided a native caption field which can be optional, if you wanted to the <caption> tag to label tables where needed.

What's your proposed solution?

Adding a caption field into the table field, so it is available directly on the field type.

Temporarily if using something like matrix a general plain text field can be used as a workaround.

Additional context

No response

jamesmacwhite avatar Aug 18 '25 07:08 jamesmacwhite

I don't suppose you have a mockup of how that might look/work?

engram-design avatar Aug 20 '25 04:08 engram-design

It would be an additional field on the field type, that would be optional, which you can use for the <table> <caption> tag e.g. https://www.w3schools.com/tags/tag_caption.asp

In some cases you may wish to add a caption to a table, for clarity or accessibility of what data is representing.

While you can easily use a plain text field outside of the tablemaker field itself, it would be nice to offer it as a built-in field, given it is part of the <table> spec.

Hope that helps.

jamesmacwhite avatar Aug 20 '25 08:08 jamesmacwhite

Ah right, I see what you mean. I was wondering whether it wouldjust be easier to use the Instructions setting for the field, but this could add another extra layer of description.

engram-design avatar Aug 20 '25 22:08 engram-design

I would say the field instructions and table caption are two different things. It is easy enough to use a standard plain text field, and with Craft 5.7+ you can use a content block to contain both the tablemaker field with other fields together in a more managed way if not using matrix, but I figured it could be a useful addition to the field type.

jamesmacwhite avatar Aug 21 '25 05:08 jamesmacwhite