You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation in theme.json utilizes the caption key in elements to target <figcaption> . However, in HTML, figcaption is specifically designed for captions of figures, while caption is designated for table captions.
I think it's beter to have both keys available in elements, but right now there's no place for a new "caption" element, since this key is used for "figcaption".
What is your proposed solution?
I proprose adding both elements: "caption" and "figcaption" to theme.json, or at least renaming "caption" to "figcaption" for now. This future-proofs the codebase to allow separately targeting the elements base styles, and it aligns with HTML semantics.
It would be best to include this in upcoming theme.json version 3 if possible.
The text was updated successfully, but these errors were encountered:
Indeed, while the table block currently uses <figcaption>, it should use<caption> instead. Also see: #47984 (comment)
The distinction between <caption> and <figcaption> is crucial, as they serve different purposes in HTML. This article on Medium lists the difference between the two tags.
Therfore, it seems logical to allow configuring different base styles for caption and figcaption in elements.
In my opinion element naming in theme.json should follow HTML standards if possible.
What problem does this address?
The current implementation in
theme.json
utilizes thecaption
key in elements to target<figcaption>
. However, in HTML, figcaption is specifically designed for captions of figures, while caption is designated for table captions.I think it's beter to have both keys available in elements, but right now there's no place for a new "caption" element, since this key is used for "figcaption".
What is your proposed solution?
I proprose adding both elements: "caption" and "figcaption" to
theme.json
, or at least renaming "caption" to "figcaption" for now. This future-proofs the codebase to allow separately targeting the elements base styles, and it aligns with HTML semantics.It would be best to include this in upcoming theme.jsonversion 3
if possible.The text was updated successfully, but these errors were encountered: