Andrew Connell [MVP MOSS]
1543 Posts |  42 Articles |  4748 Comments
.NET  |  MCMS  |  SharePoint  |  Office System
SharePoint Quick Links
Article Categories
Archives
Post Categories


Add to Technorati Favorites

In SharePoint 2007 many customers provided lots of feedback to Microsoft… ok, they complained… that the markup generated by SharePoint 2007 (which also meant WSS 3.0 & ASP.NET 2.0) was not clean, concise or friendly to accessibility requirements.

What’s new in the SharePoint 2010 generated markup story…

Microsoft heard this loud and clear and committed to have SharePoint 2010 generate WCAG 2.0 AA complaint markup. However you may seen or heard in various places, even from a Microsoft person, in a blog or in some news report, that SharePoint is also generating XHTML 2.0 Strict markup… that is not true. The product team has not committed to that and in my opinion people seem to be getting a bit too carried away. This is usually the result of folks who seem to be inferring what WCAG 2.0 AA is (frankly… as we’ve all seen, there’s a lot of misunderstanding about what an accessible site really is). There are and will be a few extra attributes that Microsoft added to the markup which would not conform to the strict rules. Regardless, the most important thing here is WCAG 2.0 AA support which covers a very big spectrum of accessibility guidelines and requirements.

One of the most common complaints I saw was the the OOTB controls, like the ASP.NET menu control, generated HTML TABLE based markup. What people really wanted was a more CSS friendly rendering (as tables are supposed to used only when presenting data in a tabular form, not in controlling the presentation). One way around this was to use control adapters, something Randy Drisgill talked a good bit about. This was also the approach of the Accessibility Kit for SharePoint which basically swapped out the default rendering with CSS friendly renderings.

Let’s see the difference…

Thankfully Microsoft has changed the rendering of the controls in SharePoint 2010 right out-of-the-box (OOTB) so we don’t have extra work to do! Check out this sample rendering… I took an OOTB Publishing site from SharePoint 2007 and saved the rendered page as raw HTML. Then, I backed up the site, restored it in SharePoint 2010 and upgraded the visuals to the new 2010 UI. Then I saved the rendered results as a raw HTML file. One big thing to take note of: I didn’t do anything to the markup, I just upgraded the site and then told SharePoint to use the new 2010 rendering instead of the 2007 rendering. Taking these two HTML files, one with a 2007 rendering and one with a 2010 rendering, I looked for the global navigation. Check out what I found…

Here’s what the global navigation looks like in SharePoint 2007:

GlobalNav2007

That’s clearly table based rendering… the CSS & accessibility purists are saying “yuk… I’ve worked so hard in 2007 to mitigate that rendering, why show it again?!”

Now check out what it looks like in SharePoint 2010 after you tell the site collection to use the 2010 rendering (aka: upgrade the visuals):

GlobalNav2010

While there’s a bit more markup, there are no tables… all unordered lists which are much easier to deal with on accessible sites & with custom branded sites! Keep in mind the coolest part about this: I didn’t touch the markup at all in the page layout or master page… I just clicked the magic button that said “use the 2010 rendering & visuals, not the 2007 ones.” I love magic buttons…

One more thing…

In the previous post and in my SharePoint Conference session, I said the following (paraphrased): when you upgrade to 2010 & upgrade the visuals, your site will still just work. That’s not entirely true in all cases. As you can see from these rendering changes above, you could very easily have some rendering nuances as the underlying markup your branding was written to may have changed with this new markup rendering from some controls you were leveraging… so there may be a bit of extra cleanup.

posted on Wednesday, November 04, 2009 9:09 AM

Feedback

# re: SharePoint 2010 Changes in Rendering 11/4/2009 9:35 AM Marc D Anderson
Gravatar Andrew:

Nice explanation. I think it's safe to say that *most*, if not *all*, custom CSS will need to be retooled, as it hangs on the existing classes and table structures. That's not necessarily a bad thing, as the new rendering is what most folks wanted things to be. It just means that you need to build in a good chunk of time to re-imagine your branding.

This probably goes double for JavaScript/jQuery which is looking for markup on the page to do its thing, and DVWPs which are built to mimic the OOB control behavior or markup will need tuning as well.

M.

# re: SharePoint 2010 Changes in Rendering 11/4/2009 10:40 AM Peter Verster
Gravatar Hi Andrew,

Enjoyed your post conf deepdive session. Us against them went down well too with al the boos coming throught the wall. My question is how the html gets generated. You might have come across ARF and the xsl approach to rendering html. Very flexible and something I assumed would be part of the big box by now. Do you have any insight into this ?

# re: SharePoint 2010 Changes in Rendering 11/4/2009 11:02 AM AC [MVP MOSS]
Gravatar Peter-
I have played with Vincent's ARF... it's very slick. It is another rendering layer on top of SharePoint's existing model. With their control adapter model introduced in the ASP.NET 2.0 release, doesn't make sense to add an XSLT rendering layer IMHO.

# re: SharePoint 2010 Changes in Rendering 11/5/2009 5:21 AM Stefan
Gravatar Hi Andrew - I am one of those 'Yuk...' people. So I was hoping for this change to happen, and I agree with Marc that there is quite some impact out of that change on sites that have done any kind of CSS adjustments and added any kind of JavaScript for UI adjustments.

Anyway ... I just wanted to point out a little typo in the paragraph underneath the 2010 markup screenshot: you probably meant to say "Keep in min*d* the coolest part ..."

nice typo though ;-) ... no need to publish this, btw.



# re: SharePoint 2010 Changes in Rendering 11/5/2009 8:52 AM Shawn C
Gravatar Have they re-implmented AspMenu (the Microsoft.SharePoint.WebControls version) - breaking or reimplemention all the renders?

I haven't reflected through the yet...

# re: SharePoint 2010 Changes in Rendering 11/5/2009 11:35 PM Randy Drisgill
Gravatar Shawn C, from what i've seen there are two render modes for ASPmenu, the new way and the old way.

# re: SharePoint 2010 Changes in Rendering 11/9/2009 6:30 PM Andrew Jolly
Gravatar Andrew,

Nice post, I think its important for people not to get carried away with the accessibility possibilities with 2010, standards compliant code does not mean those using access technologies or alternative devices are going to have a good time, pretty soon I'll be taking a look a look at 2010 with JAWS and perform some simple traversing of pages which should give some idea as to this area, i'll try to remember to come back and post what I find.

Cheers

Post Feedback

Title:
Name:
Email:
(email will not be displayed)
Url:
Comments: 
Please add 8 and 4 and type the answer here:    
All Comments Are Filtered & Moderated
Unfortunately comment spammers are just too effecient and are constantly dirtying up blogs with irrelevant and unwanted comments trying to improve their standing on search engines. All comments on this blog are moderated. I do not censor comments, but I don't approve comments with vulger language or those soliciting products. Most of the time comments are approved within a few hours of being submitted with the only exception when I'm traveling.

Why are you asking for my email address?
The only reason I'm asking for your email address, which isn't required to submit a comment, is to provide a gravatar if you've created an account for yourself and associated your email address with a small image. If you have a gravatar created for the email address you submit, it will appear next to your comment. Otherwise nothing will appear.

What is a gravatar?
A gravatar is a "globally recognized avatar." You can get more information about gravatars, as well as create your own for free, at www.gravatar.com. You can also view my gravatar here.


Copyright © 2003 - 2010 Andrew Connell
Creative Commons License 
This work is licensed under a Creative Commons License
Site design by Heather Solomon.

 
 
MOSS WCM Training
Looking for MOSS 2007 WCM developer training? Look no further! I teach my 5-day hands-on and online WCM classes for developers I offer through my company: Critical Path Training.

Get more information on the WCM courses!