Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#33662] Microdata in single article view causes invalid HTML #3511

Closed
wants to merge 2 commits into from

Conversation

Bakual
Copy link
Contributor

@Bakual Bakual commented Apr 26, 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.

@Bakual Bakual changed the title Microdata in single article view causes invalid HTML [#33662] Microdata in single article view causes invalid HTML Apr 26, 2014
@Bakual
Copy link
Contributor Author

Bakual commented Apr 28, 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).

@jony223
Copy link

jony223 commented May 2, 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.

@Bakual Bakual mentioned this pull request May 4, 2014
@Bakual Bakual closed this in 382c2bf May 5, 2014
@Bakual Bakual deleted the ValidateArticleMicrodata branch May 5, 2014 14:17
Bakual pushed a commit to Bakual/joomla-cms that referenced this pull request May 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants