-
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
[Block Library - Query]: Add semantic wrapper element #31421
Conversation
Seems like a good start, and something we can always expand upon if need be. Though I can't think of any to add, unless we go into some details/summary shenanigans. Header/footer don't seem appropriate, do they? |
Size Change: -70 B (0%) Total Size: 1.31 MB
ℹ️ View Unchanged
|
That's probably a good set? I'm sure someone's going to want to do something weird and have the Query be their footer, but they can file an issue if they find a good reason do do that. 😄 |
Description
Resolves: #28555
Sometimes, theme templates will consist of just a header template part, a footer template part, and a query loop in the middle. Semantically, that query should be wrapped in a
main
tag. In other cases, the query should be wrapped in asection
tag.This PR adds the option in
Query
block to change the wrapper element, underAdvanced
inspector controls.Testing instructions
Advanced
inspector controls in a Query block change the value ofHTML element
to a differenttag
, save and see that the selection is applied in both editor and front-end.Notes
I have added only
div, main, section and aside
as options. Should I add or remove something?--cc @kjellr @jasmussen @jameskoster