User tests: Successful: Unsuccessful:
With #3358 I implemented hardcoded Microdata into the layouts. However I used a <span>
to assign the articleBody
item property. Since spans aren't allowed to contain block elements, this causes now a validation error when checking with the W3C validator.
See Issue #3508 and Tracker http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33662
Using <div>
instead of the <span>
like suggested by @betweenbrain in the original PR solves the issue.
Validate the single article view with Joomla 3.3 RC and verify the error. Apply this PR and check again. It should verify and the template should not change in any way.
Title |
|
Title |
|
||||||
Labels |
Added:
?
?
|
Hi, thanks to Bakual i fixed this problem for my customized template by making an override of com_content/article/default.php.
As suggested, i simply replaced the span with a div and my template is now valid HTML.
Description | <h3>Issue</h3> <p>With <a href="https://github.com/joomla/joomla-cms/pull/3358" class="issue-link" title="Hardcoded Microdata for com_content">#3358</a> I implemented hardcoded Microdata into the layouts. However I used a <code><span></code> to assign the <code>articleBody</code> item property. Since spans aren't allowed to contain block elements, this causes now a validation error when checking with the W3C validator.<br> See Issue <a href="https://github.com/joomla/joomla-cms/issues/3508" class="issue-link" title="Joomla CMS 3.3 rc: Microdata in single article view causes invalid HTML">#3508</a> and Tracker <a href="http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33662">http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33662</a></p> <h3>Solution</h3> <p>Using <code><section></code> instead of the <code><span></code> like suggested by <a href="https://github.com/betweenbrain" class="user-mention">@betweenbrain</a> in the original PR solves the issue.</p> <h3>Testing</h3> <p>Validate the single article view with Joomla 3.3 RC and verify the error. Apply this PR and check again. It should verify and the template should not change in any way.</p> | ⇒ | <h3>Issue</h3> <p>With <a href="https://github.com/joomla/joomla-cms/pull/3358" class="issue-link" title="Hardcoded Microdata for com_content">#3358</a> I implemented hardcoded Microdata into the layouts. However I used a <code><span></code> to assign the <code>articleBody</code> item property. Since spans aren't allowed to contain block elements, this causes now a validation error when checking with the W3C validator.<br> See Issue <a href="https://github.com/joomla/joomla-cms/issues/3508" class="issue-link" title="Joomla CMS 3.3 rc: Microdata in single article view causes invalid HTML">#3508</a> and Tracker <a href="http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33662">http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33662</a></p> <h3>Solution</h3> <p>Using <code><div></code> instead of the <code><span></code> like suggested by <a href="https://github.com/betweenbrain" class="user-mention">@betweenbrain</a> in the original PR solves the issue.</p> <h3>Testing</h3> <p>Validate the single article view with Joomla 3.3 RC and verify the error. Apply this PR and check again. It should verify and the template should not change in any way.</p> |
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-05-05 14:17:19 |
Changed to
<div>
. @nternetinspired correctly said that the usage of<section>
is not according to the specs and it's a block element as well anyway. So using<div>
indeed is correct and doesn't seem to break anything (tested also with pagebreaks).