This Page Is Valid XHTML 1.1!

I did a little more tweaking and now This Page Is Valid XHTML 1.1!

Again you have to try it with the source from a browser like Firefox, if you just point the validator at this page it renders down level which is not compliant.



I should note that the FCKeditor is only XHTML 1.0 compliant so any page with an editor will not validate against XHTML 1.1 until that support is in place. In any case since browsers seem to be forgiving I think I can still go forward with the XHTML 1.1 DOCTYPE

Also I had to fix even more content in the db where I have historically had the bad habit of using target=_blank on links to external sites. target is no longer valid in XHTML 1.1

This site is also currently using much more CSS layout and most of the table layout has been removed. I'm still working on a few areas of this and still need to update more of the built in skins to work with the new model but I figured it was good to go ahead and do the skin for this site first so I can test it in the real world.

Thanks go out to Alexander Orlov for help and good advice in working toward XHTML compliance.

This Page Is Valid XHTML 1.0 Transitional!

After a good bit of work, according to the Wc3 validator page, this page is Valid XHTML 1.0 Transitional!

Now if you want to confirm this yourself I will say you can't just enter the url www.mojoportal.com and have it come up valid becuase when the validator pages makes a request it is rendered differently than when using a browser. In other words the .NET Server controls do their down level rendering when it can't detect the browser and apparently the downlevel rendering is not valid.

If you view this page with Firefox and then right click and view the page source then save this file as www.mojoportal.htm and upload it to the validator it gives it the nice approval.

Ultimately I would like to get to Strict compliance instead of Transitional but this is a step in the right direction.

Another factor that comes into play in a CMS like mojoPortal is whether the existing markup in the database that has been entered using the CMS features conforms. I think in general FCKeditor does produce valid markup, but I have found places where I edited stuff directly as source and I didn't do it with XHTML validation in mind at the time so I am cleaning things up in the content as well as in mojoportal code. For example using a valign attribute on a td is not valid for Transitional and moving forward toward Strict, links with a target attribute are not allowed so I am cleaning up things like that too.

I doubt if all the pages in this site are currently valid but I am making progress and eventually we will be able to proudly display the icon

2.1 branch svn heads up

I just committed some major changes in svn on the 2.1 branch. You may want to hold off for a couple of days on getting latest. It will build but if you use any skin other than theblues1 it will be broken at run time.

I've been going through all the modules and pages and changing to CSS layout and now I need to go back through the other skins to fix them like I did with theblues1 skin. I should have things in better shape over the next few nights. I was going to wait until it was all working before checking it in but then again I hate to keep this much work checked out and another developer who is doing similar work in the 1.x branch needs to see my work.

Update 2/13/2006: I just commited at least enough fixes that you don't get runtime errors with any of the built in skins. Still the only usable one is theblues1 as the others all need some css work to fix the layout and style. I'll be working on those. If you have your own custom skin, you will need to get the 3 new Panels named divLeft, divCenter, and divRight and add them to your skin and then you will probably have to fix some style to get the layout right. There are some new classes for css, right now theblues1 css has all the right classes, you will need to get the missing ones and add them to your css and probably tweak them to fit your needs.

XHTML and CSS

One of the  great things in 2.0 .NET is that it supports XHTML compliance. For those who don't know XHTML is a newer w3c standard meant to replace HTML and, in a nutshell, is just a stricter version of HTML.

XHTML compliance is really just the first step towards compliance with the w3c Web Content Accessibility Guidelines (WCAG) and the US Government Section 508 guidelines. The big picture goal is to make the web site content accessible to the widest audience of people including those with handicaps that make web browsing difficult by supporting the widest variety of browsers and devices including everything from screen readers to electronic braille pads. The new standards and guidelines are desinged to do just that and I definitely want mojoPortal to comply with these guidelines wherever possible.

The biggest things to be aware of when trying to convert HTML to XHTML are that everything is lower case and eveything must comply with standard xml rules. Some of the HTML tags that did not require formal closing tags now do require them. <BR> for example must be <br /> so that it has and end tag.

The change in 2.0 ASP.NET is that the server controls like TextBox, Calendar, DataGrid, etc render XHTML compliant markup. You still have to make your own markup that wraps these controls compliant.

In mojoPortal I have had the forsight in most places to use <br /> and other XHTML compliant forms even before 2.0 .NET just to be prepared but there are some places where I had non-compliant markup. I am going through all the pages and controls now in the 2.1 branch and fixing these things, its really not that big a job. What is a big job is changing from html table driven layout to using div and span elements with css. This is fairly tedious work for me to go through the whole project and do this and these changes will likely require some effort to convert existing custom skins for those upgrading when I make the next release. if it seems like a lot of work to you just remember I did it for the included skins . When I'm done you should be able to tell what you need to do to upgrade your custom skin by looking at the included layout.Master files and style.css files

At first I thought I would wait and convert to web parts before making this change but I decided to do this first so that I will have cleaner markup when I get to that step. Best to get the skinning and layout really nailed down first. This will be a solid foundation for meeting our compliance goals.