W3C Markup Validation

Permalink 2 users found helpful
I wonder if anyone hast tried to validate her/his site at
http://validator.w3.org/

I did it for both of my c5 sites and I got 3 errors on one site, and 7 errors and 1 warning for the other.

Errors are about missing attributes and misplaced elements
warning was about Mismatch between Public and System identifiers in the DOCTYPE declaration

I was wondering, if I should do something about it and if so, what and where to find the code

What bad things can happen if I just leave it at that

rritz
 
adamjohnson replied on at Permalink Reply
adamjohnson
Nothing bad will happen if your site doesn't validate. You shouldn't worry about it too much unless you want to brag about validation.
jordanlev replied on at Permalink Reply
jordanlev
I agree that nothing bad will happen. The thing that matters the most is that your site renders properly in all of the browsers that you are targeting. (And to a lesser extent that it is accessible to screenreaders and such, depending on your target audience).

But just as an FYI it appears that a lot of these validation errors will be cleaned up in the next release of Concrete5 (I have no idea when that will be, though).
senshidigital replied on at Permalink Reply
senshidigital
I find that C5 itself is not a problem when validating but some add-ons make the validation fail.

I am constantly having to alter add-ons code to make them validate, which is important for Search Engine Optimisation by the way!!

Sometime you just can't get a page to validate because the code just does not allow it. For example, Mail Chimps sign up API code never validates but I use it on certain sites as the client has requested it.

We always try and get a site to validate, as in the UK it is actually illegal not to have an accessible site. See here:http://www.webcredible.co.uk/user-friendly-resources/web-accessibil...

As you will read The Royal Institute of the Blind have approached companies and if they did not comply to changing there websites, could sue under the DDA act so making your site validate is an important part to make a site accessible, and for SEO.

But as I say, its not always possible, but if you can its best. Validation and accessibility go hand in hand.
shadowcomputers replied on at Permalink Reply
shadowcomputers
One of the things that I have found that causes pages/sites to not validate is the fact that code from add-ons are placed in the body and not the head.

Really need a way to add things to the head.

You can do this in the controller, but by the time you get to the themes and addons, that is nolonger available.

I have been wondering if there is a way to maybe place in the database what code needs to be placed before the close of head tag for themes and add-ons to use, but I have not had time to investigate how this would work yet.
andrew replied on at Permalink Reply
andrew
Themes actually can inject into the header. They just need to call addheaderitem prior to including the header_required element.

I don't think there is anything technically in concrete5 that stands in the way of it being w3c compliant anymore. We just need to do the work required to ensure that stuff goes in the header rather than in the page, or has a proper content type.

If I'm wrong please let me know. We probably could do a better job at this.
senshidigital replied on at Permalink Reply
senshidigital
When we are creating an add on could you have a folder called 'header' or something like that (similar what you do with js folder) so any javascripts in that folder will be placed in the head?

Just a thought and that would make it super easy.
jordanlev replied on at Permalink Reply
jordanlev
Addons (as opposed to themes) already have this -- just make a folder called "js" and every .js file in it will be loaded (same goes for "css"). Note that this only works for files directly in that folder -- not sub-folders inside there.
senshidigital replied on at Permalink Reply
senshidigital
Yeah sorry what I ment was, for example...

If I placed a file in a header folder that when the user adds a block, the options that user selects updated the file in the header folder and is then added to the head of the page.

It might already be do-able, i'm just not sure.
andrew replied on at Permalink Reply
andrew
I should probably clarify: blocks have this, but add-ons don't. However add-ons can generally use page-based MVC with controller methods to add items to the header.
shadowcomputers replied on at Permalink Reply
shadowcomputers
I did try that once before but I could not get it would not work.

I cannot remember what the error was, but I shall try it again.
rritz replied on at Permalink Reply
rritz
Thanks for all your replies!
Steevb replied on at Permalink Reply
Steevb
Hi rritz,

I'm always tweeking, used to do it for Bill, but now for Bill and C5!

I think it will always be like that.......
1stWebDesigns replied on at Permalink Reply
1stWebDesigns
I've just completed a site which validates perfectly as HTML5 (could have just as easily been Strict XHTML).

I don't think C5 is to blame for validation errors, just certain blocks, add-ons and themes.
shadowcomputers replied on at Permalink Reply
shadowcomputers
Maybe add-ons could be given a HTML and CSS ratings for W3C compliance?

Then developers would know if things are valid HTML4/5, CSS2/3, Strict etc.

Could also be attributes for themes as well.

Not sure what Franz thinks about possibly adding functionality like this to the marketplace.
frz replied on at Permalink Reply
frz
Seems reasonable if the PRB wants to validate those settings
I'm pretty sure Andy won't want to.

best wishes

Franz Maruna
CEO - concrete5.org
http://about.me/frz
Mnkras replied on at Permalink Reply
Mnkras
I do cursory checks on the addons and themes, i guess i can go more in depth.