Skip to content
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

Query Block: Consider allowing for an optional semantic wrapper tag #28555

Closed
kjellr opened this issue Jan 28, 2021 · 0 comments · Fixed by #31421
Closed

Query Block: Consider allowing for an optional semantic wrapper tag #28555

kjellr opened this issue Jan 28, 2021 · 0 comments · Fixed by #31421
Assignees
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.

Comments

@kjellr
Copy link
Contributor

kjellr commented Jan 28, 2021

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 a section tag. The only way to do this currently would be to wrap the query in of a Group block with tagName="main" or tagName="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.

@kjellr kjellr added [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Feature] Full Site Editing [Block] Query Loop Affects the Query Loop Block [Type] Discussion For issues that are high-level and not yet ready to implement. labels Jan 28, 2021
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants