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

TT1 Blocks: Main element is missing #180

Closed
carolinan opened this issue Jan 28, 2021 · 5 comments · Fixed by #190
Closed

TT1 Blocks: Main element is missing #180

carolinan opened this issue Jan 28, 2021 · 5 comments · Fixed by #190

Comments

@carolinan
Copy link
Collaborator

The header template part and footer template part correctly uses <header> and <footer> elements
But in our wishes to keep the theme simple, the <main> element was not used to wrap the main content.

This is an oversight that has negative impacts on accessibility and it needs to be resolved.
More info: https://dequeuniversity.com/rules/axe/4.1/landmark-one-main

@carolinan
Copy link
Collaborator Author

carolinan commented Jan 28, 2021

Since the query is not a wrapping element -it has no element,
the options are to wrap the query and content in a group block or use template parts.

Template parts are practical for repeated content, I suggest that the simplicity of this theme makes use of group blocks more appropriate.

@kjellr
Copy link
Collaborator

kjellr commented Jan 28, 2021

I suggest that the simplicity of this theme makes use of group blocks more appropriate.

I agree, that makes sense! I do wonder if maybe the Query block should have an option to accept a wrapper tag though — I imagine that lots of themes will run into this issue. I'll file and issue to discuss in the Gutenberg repo.

Edit: WordPress/gutenberg#28555

@carolinan
Copy link
Collaborator Author

I thought it had been discussed and decided against already.

@kjellr
Copy link
Collaborator

kjellr commented Jan 28, 2021

Ah perhaps — It's totally possible that I missed it. 😄

@mtias
Copy link
Member

mtias commented Jan 30, 2021

Template parts are practical for repeated content, I suggest that the simplicity of this theme makes use of group blocks more appropriate.

Agreed. We have discussed a main or content semantic template part, but it's a bit of overhead for something that seems simpler. Starting with group + tag seems great to me. It's always possible to convert to a template part later if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants