Opened 9 days ago
Last modified 4 days ago
#61956 assigned defect (bug)
Convert div to main tag for web accessibility
Reported by: | upendmca | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Themes | Keywords: | has-patch reporter-feedback close |
Focuses: | accessibility | Cc: |
Description (last modified by )
How to convert <div class="wp-site-blocks">Content</div>
to <main class="wp-site-blocks">Content</main>
in gutenberg block template.
This is coming from wp-includes
folder block-template.php
.
Change History (7)
#1
@
9 days ago
- Component changed from General to Themes
- Description modified (diff)
- Focuses accessibility added
This ticket was mentioned in PR #7274 on WordPress/wordpress-develop by @narenin.
8 days ago
#2
- Keywords has-patch added
Trac ticket: https://core.trac.wordpress.org/ticket/61956
#3
@
8 days ago
- Keywords has-testing-info added
Hi @narenin
I have tested the patch and it is working fine.
Test Report
Environment:
OS: Windows
PHP: 8.2.12
WordPress: 6.6.1
Browser: Chrome
Theme: Twenty Twenty-One (Version: 2.3)
Plugins: None activated
Actual Results:
✅ Patch working well as desired solution.
#4
@
8 days ago
- Keywords reporter-feedback added; has-testing-info removed
Hi and welcome to WordPress Core Trac!
Could you explain how you want to use the wp-site-blocks
wrapper?
Twenty Twenty-One:
- is not a block-based theme, so it does not output a
wp-site-blocks
wrapper - already has a <main> element
A document must only have one main
element (unless additional main
elements are hidden). MDN docs
Related: GB35354
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
4 days ago
#7
@
4 days ago
- Keywords close added
At this time, this change seems unnecessary. I think that the use case would be if you were attempting to child theme a parent that did not use the main
element in its templates. In that case, you could use this filter to change the outer wrapper instead of editing the templates in your child theme.
However, block themes in the theme repository are expected to include a main
element; the main
element is available on relevant blocks as a selectable HTML element in the advanced block settings; and you can change them in child themes (even if it's kind of a pain.)
I think this is probably a wontfix
issue; but I'm open to arguments, if there's a case I haven't thought of.
Discussed in the accessibility bug scrub, and agreed.
Original support forum topic:
https://wordpress.org/support/topic/web-accessibility-4/