Success

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
26 Apr 2014

Issue

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

Solution

Using <div> instead of the <span> like suggested by @betweenbrain in the original PR solves the issue.

Testing

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.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar Bakual Bakual - open - 26 Apr 2014
avatar Bakual Bakual - change - 26 Apr 2014
Title
Microdata in single article view causes invalid HTML
[#33662] Microdata in single article view causes invalid HTML
avatar Bakual Bakual - change - 28 Apr 2014
Title
Microdata in single article view causes invalid HTML
[#33662] Microdata in single article view causes invalid HTML
Labels Added: ? ?
avatar Bakual
Bakual - comment - 28 Apr 2014

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).

avatar jony223
jony223 - comment - 2 May 2014

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.

avatar Bakual Bakual - change - 5 May 2014
The description was changed
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>&lt;span&gt;</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&amp;tracker_item_id=33662">http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&amp;tracker_item_id=33662</a></p> <h3>Solution</h3> <p>Using <code>&lt;section&gt;</code> instead of the <code>&lt;span&gt;</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>&lt;span&gt;</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&amp;tracker_item_id=33662">http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&amp;tracker_item_id=33662</a></p> <h3>Solution</h3> <p>Using <code>&lt;div&gt;</code> instead of the <code>&lt;span&gt;</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
avatar Bakual Bakual - close - 5 May 2014
avatar Bakual Bakual - close - 5 May 2014
avatar Bakual Bakual - head_ref_deleted - 5 May 2014
avatar Bakual Bakual - reference | 942fcc7 - 12 May 14

Add a Comment

Login with GitHub to post a comment