Hey,
PRO generates all pages (Post Type: ‘page’) –even using the Blank stack– with a semantic structure that is incorrect. It uses the <article>
HTML element while it should be using either the <main>
HTML element or a non-semantic HTML element like a <div>
. Whereas it is correct to use the <article>
HTML element for posts (Post Type: ‘post’)it is not for pages.
In addition to the aforementioned, when using any of the PRO builder structural elements (Section, Row, Column, Grid, Cell or Div), if for the option HTML Tag we choose the <main>
tag, then we get another issue as the <main>
HTML element must not have the <article>
element as its ancestor –its ancestors are limited to html, body, div and form (as per HTML Living Standard — Last Updated 5 November 2024)–.
Also, there is a closely related issue, the use of the attribute role="main"
–in the parent div of the <article>
element– as we should be using the <main>
HTML element over using ARIA in a non semantic HTML element like a div
.
If you reckon that fixing these issues would result in a breaking change, then please I would appreciate if you could provide me with instructions to customize the default HTML output by the theme. I guess, the best option is to use the child theme and customise the templates in pro-child/framework/views/custom/ .
I enclose 2 screenshots:
Thank you