Hi,
I already proposed the same for the Headline PRO element last June and it was implemented by Themeco’s developers in PRO version 2.1.6. I hope this request is listened to the same way.
Now what I propose is to apply this improvement to all the PRO elements for which the builder automatically generates nested spans, changing them into divs.
For instance, using the button element, if I wanted to place a heading as the “Primary Text” (like an h4) and a paragraph as the “Secondary Text” I would end up with:
<a class="e18690-5 x-anchor x-anchor-button" tabindex="0" href="http://www.mysite.com/page-1/"> <span class="x-anchor-content"> <span class="x-anchor-text"><span class="x-anchor-text-primary"><h4>My heading</h4></span><span class="x-anchor-text-secondary"><p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p><span class="dcr_read_more">See more»</span></span> </span> <span class="x-particle x-anchor-particle-primary" data-x-particle="scale-y inside-c_l" aria-hidden="true"> <span></span> </span> </span> </a>
The result does not comply with the HTML current standards because the <span> HTML element can only have content –children elements– that belong to the phrasing content category, <h4> and <p> elements do not –they belong to the flow content category– so we end up with no valid HTML.
Somebody could argue that the normal use of the PRO button element is placing plain text in the “Primary Text” and “Secondary Text” fields but my view is that, since the beginning of HTML5 –not before– we’ve had the possibility to nest headings, paragraphs and the rest of the flow content elements within an <a> element –which is the root HTML element in the PRO button element–. Provably not everybody takes advantage of this possibility but I believe that the ones we want to do so must be backed up by code –generated by the builder– that allows more creative ways of using a PRO element, complying at the same time with the current HTML standards.
The button element is one example but I am pretty sure that other PRO elements deserve the same improvement.
References:
<span> - HTML: HyperText Markup Language | MDN
Content categories » Phrasing content - Developer guides | MDN
Content categories » Flow content - Developer guides | MDN
HTML Living Standard The definition of '<span>' in that specification.
HTML5 The definition of '<span>' in that specification.
