-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename "caption" element to "figcaption" #61261
Comments
Indeed, while the table block currently uses The distinction between 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. |
Caption vs. figcaption is important semantically. But in a visual editor, those semantics should be automatically handled for you, you shouldn't be able to create incorrect HTML. To that end, I don't see why the "caption" term should be renamed in the UI, as it's a much clearer term for someone using the visual editor to understand, compared to the figcaption portmanteau. If I'm missing any nuance, let me know! |
I agree that the post editor UI should use "caption" in both cases for clarity. However, I propose the possibility to set
What are your thoughts on balancing user simplicity with theme developer flexibility this way? |
No strong opinions on the theme.json structure, happy to defer to developers in this area, I'm mainly thinking UI, iconography, verbiage, etc. That said, it's still not clear to me what the benefit would be, of differentiating the property in theme.json only. |
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: