?
avatar richard67
richard67
26 Apr 2014

Steps to reproduce the issue

Validate a page of a single article view on a Joomla 3.3 beta1 or beta2 or rc site with the W3C validator or any other HTML validator.
The article has to include some block elements like e.g. div or p (paragraph) in its content.

Expected result

The validator should not list lots of HTML errors.

Actual result

The validator lists lots of errors related to elements being not allowed to appear within a span element, e.g. paragraphs, divs and so on.
The reason is the span element with itemprop="articleBody" which is wrapped around the output of the article content (/com_content/views/article/tmpl/default.php lines 200 .. 202) for microdata markup.
It should be a div element instead.

System information (as much as possible)

Joomla 3.3 beta 1, beta 2 and rc tested on a shared Linux host in a private environment.
Protostar template used, no extensions installed.
Further system info not relevant for this issue.

Additional comments

After I've created a template override for the article view of com_content with the necessary correction (changed span to div), HTML was validated succesfully with the W3C validator, and everything else works well and looks fine, too.
The author of the pull request with which this part of the microdata markup was implemented had written following (see somewhere in discussion on Github):
"However the div is a block element and would change the appearance in some cases. That's why I used the span so it sure doesn't break any layout."
From my point of view this is not OK not to mention HTML syntax just because of possible layout issues. Breaking of layout has to be avoided by using css classes for this div and having css styles in templates (border 0, margin 0 and so on).

Update 2014-05-24: This tracker item can be closed since the issue has meanwhile been handled with this PR: #3511

Votes

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

avatar richard67 richard67 - open - 26 Apr 2014
avatar richard67 richard67 - change - 26 Apr 2014
The description was changed
Description <h4>Steps to reproduce the issue</h4> <p>Validate a page of a single article view on a Joomla 3.3 beta1 or beta2 or rc site with the W3C validator or any other HTML validator.<br> The article has to include some block elements like e.g. div or p (paragraph) in its content.</p> <h4>Expected result</h4> <p>The validator should not list lots of HTML errors.</p> <h4>Actual result</h4> <p>The validator lists lots of errors related to elements being not allowed to appear within a span element, e.g. paragraphs, divs and so on.<br> The reason is the span element with itemprop="articleBody" which is wrapped around the output of the article content (/com_content/views/article/tmpl/default.php lines 200 .. 202) for microdata markup.<br> It should be a div element instead.</p> <h4>System information (as much as possible)</h4> <p>Joomla 3.3 beta 1, beta 2 and rc tested on a shared Linux host in a private environment.<br> Further system info not relevant for this issue.</p> <h4>Additional comments</h4> <p>After I've created a template override for the article view of com_content with the necessary correction (changed span to div), HTML was validated succesfully with the W3C validator, and everything else works well and looks fine, too.<br> The author of the pull request with which this part of the microdata markup was implemented had written following (see somewhere in discussion on <a href="https://github.com/joomla/joomla-cms/pull/3358" title="https://github.com/joomla/joomla-cms/pull/3358">Github</a>):<br> "However the div is a block element and would change the appearance in some cases. That's why I used the span so it sure doesn't break any layout."<br> From my point of view this is not OK not to mention HTML syntax just because of possible layout issues. Breaking of layout has to be avoided by using css classes for this div and having css styles in templates (border 0, margin 0 and so on).</p> <h4>Steps to reproduce the issue</h4> <p>Validate a page of a single article view on a Joomla 3.3 beta1 or beta2 or rc site with the W3C validator or any other HTML validator.<br> The article has to include some block elements like e.g. div or p (paragraph) in its content.</p> <h4>Expected result</h4> <p>The validator should not list lots of HTML errors.</p> <h4>Actual result</h4> <p>The validator lists lots of errors related to elements being not allowed to appear within a span element, e.g. paragraphs, divs and so on.<br> The reason is the span element with itemprop="articleBody" which is wrapped around the output of the article content (/com_content/views/article/tmpl/default.php lines 200 .. 202) for microdata markup.<br> It should be a div element instead.</p> <h4>System information (as much as possible)</h4> <p>Joomla 3.3 beta 1, beta 2 and rc tested on a shared Linux host in a private environment.<br> Protostar template used, no extensions installed.<br> Further system info not relevant for this issue.</p> <h4>Additional comments</h4> <p>After I've created a template override for the article view of com_content with the necessary correction (changed span to div), HTML was validated succesfully with the W3C validator, and everything else works well and looks fine, too.<br> The author of the pull request with which this part of the microdata markup was implemented had written following (see somewhere in discussion on <a href="https://github.com/joomla/joomla-cms/pull/3358" title="https://github.com/joomla/joomla-cms/pull/3358">Github</a>):<br> "However the div is a block element and would change the appearance in some cases. That's why I used the span so it sure doesn't break any layout."<br> From my point of view this is not OK not to mention HTML syntax just because of possible layout issues. Breaking of layout has to be avoided by using css classes for this div and having css styles in templates (border 0, margin 0 and so on).</p>
avatar richard67
richard67 - comment - 26 Apr 2014

I've meanwhile added a tracker item #33662 at joomlcaode
You may blame the J!Tracker Application for transmitting this comment.

avatar Bakual
Bakual - comment - 26 Apr 2014

Since it was me who did that PR I can confirm and do acknowledge the problem.

From my point of view this is not OK not to mention HTML syntax just because of possible layout issues. Breaking of layout has to be avoided by using css classes for this div and having css styles in templates (border 0, margin 0 and so on).

The problem is breaking layouts is out of discussion, and we can't add CSS rules for that because it's the templates job. I guess we can use <section> instead then?

avatar richard67
richard67 - comment - 26 Apr 2014

Hmm, the section tag is not supported in IE8 or earlier, and IE8 is still a browser officially supported by Joomla 3.3. I had no problems or layout issues with the protostar template, so I did not have to add any CSS.

avatar richard67
richard67 - comment - 26 Apr 2014

but maybe section will work when IE8 and other pre-HTML5 browsers ignore it

avatar richard67
richard67 - comment - 26 Apr 2014

it would be valid HTML5 with section according to the dom ref, so section could be ok

avatar Bakual
Bakual - comment - 26 Apr 2014

Hmm, the section tag is not supported in IE8 or earlier, and IE8 is still a browser officially supported by Joomla 3.3

Tags which aren't supported by a browser are just ignored. Since the tag is only there for the itemprop property, nothing will be missing at all.

I had no problems or layout issues with the protostar template, so I did not have to add any CSS.

Yep, Protostar doesn't has issues. But other templates may have issues. Maybe only together with plugins like the pagebreak one. We just don't know and I'd like to avoid it if possible :smiley:

avatar Bakual
Bakual - comment - 26 Apr 2014

Do you want to do a PR for it?

avatar richard67
richard67 - comment - 26 Apr 2014

I never did a PR before, am new with GitHub

avatar Bakual
Bakual - comment - 26 Apr 2014

If you want to try: http://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests

Just make sure you select the 3.3-dev branch.
Otherwise I can do it.

avatar richard67
richard67 - comment - 26 Apr 2014

hi,

better you do it.

is faster maybe, because 3.3 fianl release might be coming soon.

Thanks

Richard

Am 26.04.2014 21:38, schrieb Thomas Hunziker:

If you want to try: http://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests

Just make sure you select the 3.3-dev branch.
Otherwise I can do it.


Reply to this email directly or view it on GitHub:
#3508 (comment)

avatar Bakual
Bakual - comment - 26 Apr 2014

See PR #3511

avatar richard67
richard67 - comment - 26 Apr 2014

Thanks. I have meanwhile tested with success that W3C validator validates Ok with section element.

avatar nternetinspired
nternetinspired - comment - 28 Apr 2014

Hey guys :)

I don't think section is the correct element to use here, div would be the best option IMO. Generally speaking, if it doesn't have a heading element within it then section should not be used.

More info here: http://html5doctor.com/the-section-element/

BTW, the included html5 shim ensure that the section element is recognised by IE8. Both section and div are block-level elements, so there will be no differences in styling on that account.

avatar Bakual
Bakual - comment - 28 Apr 2014

I wasn't aware that <section> is a block element as well. I've changed to <div> now.

avatar richard67
richard67 - comment - 28 Apr 2014

Well, with diff I am happy ;-)

avatar richard67
richard67 - comment - 28 Apr 2014

Well, with a div I am happy ;-)

avatar Bakual
Bakual - comment - 28 Apr 2014

PR is already changed ;)

avatar richard67
richard67 - comment - 28 Apr 2014

One gerneral thing not related to this issue I do not understand yet: when to work with GitHub and when on joomlacode.org. Looks like 2 different worlds for me, and so seems to be complicated. Is the first for new and the second for old Joomla releases? Maybe you can give me a brief hint, in 1 sentence, so I might contribute a bit in future.

avatar Bakual
Bakual - comment - 28 Apr 2014

Good question :)

  • JC is the old and current tracker. All patches however are expected to be done as PRs on GitHub.
  • GitHub/JIssues (issues.joomla.org) is the new tracker. It's in beta phase.

So currently we are in a "between" phase where both are used. The goal is to get away from the JC tracker as soon as possible.

avatar richard67
richard67 - comment - 28 Apr 2014

Ah, I see. Now it is clear to me. Thanks for your explanation. I'll make myself familiar with PRs sooner or later ;-)

avatar richard67 richard67 - change - 28 Apr 2014
The description was changed
Description <h4>Steps to reproduce the issue</h4> <p>Validate a page of a single article view on a Joomla 3.3 beta1 or beta2 or rc site with the W3C validator or any other HTML validator.<br> The article has to include some block elements like e.g. div or p (paragraph) in its content.</p> <h4>Expected result</h4> <p>The validator should not list lots of HTML errors.</p> <h4>Actual result</h4> <p>The validator lists lots of errors related to elements being not allowed to appear within a span element, e.g. paragraphs, divs and so on.<br> The reason is the span element with itemprop="articleBody" which is wrapped around the output of the article content (/com_content/views/article/tmpl/default.php lines 200 .. 202) for microdata markup.<br> It should be a div element instead.</p> <h4>System information (as much as possible)</h4> <p>Joomla 3.3 beta 1, beta 2 and rc tested on a shared Linux host in a private environment.<br> Protostar template used, no extensions installed.<br> Further system info not relevant for this issue.</p> <h4>Additional comments</h4> <p>After I've created a template override for the article view of com_content with the necessary correction (changed span to div), HTML was validated succesfully with the W3C validator, and everything else works well and looks fine, too.<br> The author of the pull request with which this part of the microdata markup was implemented had written following (see somewhere in discussion on <a href="https://github.com/joomla/joomla-cms/pull/3358" title="https://github.com/joomla/joomla-cms/pull/3358">Github</a>):<br> "However the div is a block element and would change the appearance in some cases. That's why I used the span so it sure doesn't break any layout."<br> From my point of view this is not OK not to mention HTML syntax just because of possible layout issues. Breaking of layout has to be avoided by using css classes for this div and having css styles in templates (border 0, margin 0 and so on).</p> <h4>Steps to reproduce the issue</h4> <p>Validate a page of a single article view on a Joomla 3.3 beta1 or beta2 or rc site with the W3C validator or any other HTML validator.<br> The article has to include some block elements like e.g. div or p (paragraph) in its content.</p> <h4>Expected result</h4> <p>The validator should not list lots of HTML errors.</p> <h4>Actual result</h4> <p>The validator lists lots of errors related to elements being not allowed to appear within a span element, e.g. paragraphs, divs and so on.<br> The reason is the span element with itemprop="articleBody" which is wrapped around the output of the article content (/com_content/views/article/tmpl/default.php lines 200 .. 202) for microdata markup.<br> It should be a div element instead.</p> <h4>System information (as much as possible)</h4> <p>Joomla 3.3 beta 1, beta 2 and rc tested on a shared Linux host in a private environment.<br> Protostar template used, no extensions installed.<br> Further system info not relevant for this issue.</p> <h4>Additional comments</h4> <p>After I've created a template override for the article view of com_content with the necessary correction (changed span to div), HTML was validated succesfully with the W3C validator, and everything else works well and looks fine, too.<br> The author of the pull request with which this part of the microdata markup was implemented had written following (see somewhere in discussion on <a href="https://github.com/joomla/joomla-cms/pull/3358" title="https://github.com/joomla/joomla-cms/pull/3358">Github</a>):<br> "However the div is a block element and would change the appearance in some cases. That's why I used the span so it sure doesn't break any layout."<br> From my point of view this is not OK not to mention HTML syntax just because of possible layout issues. Breaking of layout has to be avoided by using css classes for this div and having css styles in templates (border 0, margin 0 and so on).</p> <p>Update 2014-05-24: This tracker itam can be closed since the issue has meanwhile been handled with this PR: <a href="http://http://issues.joomla.org/tracker/joomla-cms/3511" title="3511">#3511</a></p>
avatar richard67 richard67 - change - 28 Apr 2014
The description was changed
Description <h4>Steps to reproduce the issue</h4> <p>Validate a page of a single article view on a Joomla 3.3 beta1 or beta2 or rc site with the W3C validator or any other HTML validator.<br> The article has to include some block elements like e.g. div or p (paragraph) in its content.</p> <h4>Expected result</h4> <p>The validator should not list lots of HTML errors.</p> <h4>Actual result</h4> <p>The validator lists lots of errors related to elements being not allowed to appear within a span element, e.g. paragraphs, divs and so on.<br> The reason is the span element with itemprop="articleBody" which is wrapped around the output of the article content (/com_content/views/article/tmpl/default.php lines 200 .. 202) for microdata markup.<br> It should be a div element instead.</p> <h4>System information (as much as possible)</h4> <p>Joomla 3.3 beta 1, beta 2 and rc tested on a shared Linux host in a private environment.<br> Protostar template used, no extensions installed.<br> Further system info not relevant for this issue.</p> <h4>Additional comments</h4> <p>After I've created a template override for the article view of com_content with the necessary correction (changed span to div), HTML was validated succesfully with the W3C validator, and everything else works well and looks fine, too.<br> The author of the pull request with which this part of the microdata markup was implemented had written following (see somewhere in discussion on <a href="https://github.com/joomla/joomla-cms/pull/3358" title="https://github.com/joomla/joomla-cms/pull/3358">Github</a>):<br> "However the div is a block element and would change the appearance in some cases. That's why I used the span so it sure doesn't break any layout."<br> From my point of view this is not OK not to mention HTML syntax just because of possible layout issues. Breaking of layout has to be avoided by using css classes for this div and having css styles in templates (border 0, margin 0 and so on).</p> <p>Update 2014-05-24: This tracker itam can be closed since the issue has meanwhile been handled with this PR: <a href="http://http://issues.joomla.org/tracker/joomla-cms/3511" title="3511">#3511</a></p> <h4>Steps to reproduce the issue</h4> <p>Validate a page of a single article view on a Joomla 3.3 beta1 or beta2 or rc site with the W3C validator or any other HTML validator.<br> The article has to include some block elements like e.g. div or p (paragraph) in its content.</p> <h4>Expected result</h4> <p>The validator should not list lots of HTML errors.</p> <h4>Actual result</h4> <p>The validator lists lots of errors related to elements being not allowed to appear within a span element, e.g. paragraphs, divs and so on.<br> The reason is the span element with itemprop="articleBody" which is wrapped around the output of the article content (/com_content/views/article/tmpl/default.php lines 200 .. 202) for microdata markup.<br> It should be a div element instead.</p> <h4>System information (as much as possible)</h4> <p>Joomla 3.3 beta 1, beta 2 and rc tested on a shared Linux host in a private environment.<br> Protostar template used, no extensions installed.<br> Further system info not relevant for this issue.</p> <h4>Additional comments</h4> <p>After I've created a template override for the article view of com_content with the necessary correction (changed span to div), HTML was validated succesfully with the W3C validator, and everything else works well and looks fine, too.<br> The author of the pull request with which this part of the microdata markup was implemented had written following (see somewhere in discussion on <a href="https://github.com/joomla/joomla-cms/pull/3358" title="https://github.com/joomla/joomla-cms/pull/3358">Github</a>):<br> "However the div is a block element and would change the appearance in some cases. That's why I used the span so it sure doesn't break any layout."<br> From my point of view this is not OK not to mention HTML syntax just because of possible layout issues. Breaking of layout has to be avoided by using css classes for this div and having css styles in templates (border 0, margin 0 and so on).</p> <p>Update 2014-05-24: This tracker itam can be closed since the issue has meanwhile been handled with this PR: <a href="http://issues.joomla.org/tracker/joomla-cms/3511" title="3511">#3511</a></p>
avatar richard67 richard67 - change - 28 Apr 2014
The description was changed
Description <h4>Steps to reproduce the issue</h4> <p>Validate a page of a single article view on a Joomla 3.3 beta1 or beta2 or rc site with the W3C validator or any other HTML validator.<br> The article has to include some block elements like e.g. div or p (paragraph) in its content.</p> <h4>Expected result</h4> <p>The validator should not list lots of HTML errors.</p> <h4>Actual result</h4> <p>The validator lists lots of errors related to elements being not allowed to appear within a span element, e.g. paragraphs, divs and so on.<br> The reason is the span element with itemprop="articleBody" which is wrapped around the output of the article content (/com_content/views/article/tmpl/default.php lines 200 .. 202) for microdata markup.<br> It should be a div element instead.</p> <h4>System information (as much as possible)</h4> <p>Joomla 3.3 beta 1, beta 2 and rc tested on a shared Linux host in a private environment.<br> Protostar template used, no extensions installed.<br> Further system info not relevant for this issue.</p> <h4>Additional comments</h4> <p>After I've created a template override for the article view of com_content with the necessary correction (changed span to div), HTML was validated succesfully with the W3C validator, and everything else works well and looks fine, too.<br> The author of the pull request with which this part of the microdata markup was implemented had written following (see somewhere in discussion on <a href="https://github.com/joomla/joomla-cms/pull/3358" title="https://github.com/joomla/joomla-cms/pull/3358">Github</a>):<br> "However the div is a block element and would change the appearance in some cases. That's why I used the span so it sure doesn't break any layout."<br> From my point of view this is not OK not to mention HTML syntax just because of possible layout issues. Breaking of layout has to be avoided by using css classes for this div and having css styles in templates (border 0, margin 0 and so on).</p> <p>Update 2014-05-24: This tracker itam can be closed since the issue has meanwhile been handled with this PR: <a href="http://issues.joomla.org/tracker/joomla-cms/3511" title="3511">#3511</a></p> <h4>Steps to reproduce the issue</h4> <p>Validate a page of a single article view on a Joomla 3.3 beta1 or beta2 or rc site with the W3C validator or any other HTML validator.<br> The article has to include some block elements like e.g. div or p (paragraph) in its content.</p> <h4>Expected result</h4> <p>The validator should not list lots of HTML errors.</p> <h4>Actual result</h4> <p>The validator lists lots of errors related to elements being not allowed to appear within a span element, e.g. paragraphs, divs and so on.<br> The reason is the span element with itemprop="articleBody" which is wrapped around the output of the article content (/com_content/views/article/tmpl/default.php lines 200 .. 202) for microdata markup.<br> It should be a div element instead.</p> <h4>System information (as much as possible)</h4> <p>Joomla 3.3 beta 1, beta 2 and rc tested on a shared Linux host in a private environment.<br> Protostar template used, no extensions installed.<br> Further system info not relevant for this issue.</p> <h4>Additional comments</h4> <p>After I've created a template override for the article view of com_content with the necessary correction (changed span to div), HTML was validated succesfully with the W3C validator, and everything else works well and looks fine, too.<br> The author of the pull request with which this part of the microdata markup was implemented had written following (see somewhere in discussion on <a href="https://github.com/joomla/joomla-cms/pull/3358" title="https://github.com/joomla/joomla-cms/pull/3358">Github</a>):<br> "However the div is a block element and would change the appearance in some cases. That's why I used the span so it sure doesn't break any layout."<br> From my point of view this is not OK not to mention HTML syntax just because of possible layout issues. Breaking of layout has to be avoided by using css classes for this div and having css styles in templates (border 0, margin 0 and so on).</p> <p>Update 2014-05-24: This tracker item can be closed since the issue has meanwhile been handled with this PR: <a href="http://issues.joomla.org/tracker/joomla-cms/3511" title="3511">#3511</a></p>
avatar richard67
richard67 - comment - 24 May 2014

This tracker itam can be closed since the issue has meanwhile been handled with this PR: #3511
You may blame the J!Tracker Application for transmitting this comment.

avatar zero-24 zero-24 - close - 24 May 2014
avatar Bakual Bakual - change - 24 May 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-05-24 12:19:12
avatar Bakual Bakual - close - 24 May 2014
avatar zero-24 zero-24 - change - 7 Jul 2015
Labels Added: ?

Add a Comment

Login with GitHub to post a comment