[wp-trac] [WordPress Trac] #47066: The main element must not appear as a descendant of the section element.
WordPress Trac
noreply at wordpress.org
Tue Apr 30 15:19:42 UTC 2019
#47066: The main element must not appear as a descendant of the section element.
---------------------------+--------------------------------------
Reporter: albertomake | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.2.1
Component: Bundled Theme | Version: 5.1
Severity: normal | Resolution:
Keywords: has-patch | Focuses: accessibility, template
---------------------------+--------------------------------------
Changes (by ryelle):
* keywords: needs-patch => has-patch
Comment:
Here's the relevant part of the spec:
> A hierarchically correct main element is one whose ancestor elements are
limited to html, body, div, form without an accessible name, and
autonomous custom elements.
[https://html.spec.whatwg.org/multipage/grouping-content.html
#hierarchically-correct-main-element source: HTML Living Standard]
The applicable part is that `main` has a special requirement about all its
parent elements, and `section` is not allowed. So yes, the fix is to
revert https://github.com/WordPress/twentynineteen/pull/190, and replace
those `section`s with `div`s. I don't see any styles relying on the
element `section`, just replacing it will work– and
[attachment:47066.diff] does that :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47066#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list