Allow selecting HTML element for the template-part wrapper #27092
Labels
[Block] Template Part
Affects the Template Parts Block
[Status] In Progress
Tracking issues with work in progress
Pages need elements like
<header>
,<main>
,<footer>
etc. Right now that's not possible from the UI, so the result is HTML that is not semantic and in some cases that can also be an a11y issue.Describe the solution you'd like
Users should be able to select the "type" of their template-parts. The available options should be:
<header>
<main>
<section>
<article>
<aside>
<footer>
It could be done on group elements etc, but that would be a lot more confusing for the end user. Having that option in the template-part block would allow some degree of freedom without overcomplicating things. It will also promote some good practices, since it will enforce using template-parts for separate sections.
Without that option, the generated HTML is a collection of
<div>
elements which is bad both for accessibility and SEO.The text was updated successfully, but these errors were encountered: