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

Allow selecting HTML element for the template-part wrapper #27092

Closed
aristath opened this issue Nov 19, 2020 · 2 comments · Fixed by #27101
Closed

Allow selecting HTML element for the template-part wrapper #27092

aristath opened this issue Nov 19, 2020 · 2 comments · Fixed by #27101
Assignees
Labels
[Block] Template Part Affects the Template Parts Block [Status] In Progress Tracking issues with work in progress

Comments

@aristath
Copy link
Member

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.

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Nov 19, 2020
@aristath
Copy link
Member Author

See PR on #27101

@mtias
Copy link
Member

mtias commented Nov 19, 2020

This was raised originally here #20997

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Template Part Affects the Template Parts Block [Status] In Progress Tracking issues with work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants