Query Block: Consider allowing for an optional semantic wrapper tag #28555
Labels
[Block] Query Loop
Affects the Query Loop Block
[Feature] Themes
Questions or issues with incorporating or styling blocks in a theme.
[Status] In Progress
Tracking issues with work in progress
[Type] Discussion
For issues that are high-level and not yet ready to implement.
It's possible to use a
tagName
attribute to specify a wrapper tag for Template Part and Group blocks. This helps enable semantic tags for common use cases like a page<header>
or<footer>
. This option is not currently available for the Query block, though it might be useful there too.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. The only way to do this currently would be to wrap the query in of a Group block withtagName="main"
ortagName="section"
set.This solution is ok, but it might be simpler to allow the Query block to optionally render its own semantic wrapper tags using the same
tagName
attribute.The text was updated successfully, but these errors were encountered: