in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

Tech MOSS Team

October 2007 - Posts

  • Accessible SharePoint 2007: It's now officially 100% Webrichtlijnen(NL)/WCAG compliant

    Yesterday I have found out that the bug we have found while testing our compliancy toolkit, is fixed. What you see now is the nice green 100%.

     

    After I have published the first post about our SharePoint Compliancy toolkit I have realised that I haven't mentioned what the Webrichtlijnen actually is. As it's a Dutch product it doesn't have to be necessarily obvious to everybody what it contains.

    Webrichtlijnen is a set of accessibility guidelines created on behalf of the Dutch government. In 2006 the Dutch government has noticed the increase of digital information systems hosted by Dutch government organisations. What's more they have notice the lack of accessibility implemented in these applications and websites. As they are supposed to improve the access to information and the involved business processes accessibility has become all of a sudden a must-have.

    After a research the Dutch government has found out that there only a few companies capable of designing and developing accessible websites and that implementing it isn't that obvious, they have decided to define the guidelines for accessible websites. In their work they have used the WCAG 1.0 guidelines as a primary input. Unfortunately they have chosen for their own set of guidelines which is WCAG 1.0 Priority 2+ (1, 2 plus some guidelines from 3). And I mean unfortunately because there is no way at this moment to check whether your site is Webrichtlijnen compliant other than using the on-line scan tool they have developed.

    Anyway after a research we have succeeded in making SharePoint 2007 based Web Content Management solutions Webrichtlijnen compliant. It also means our toolkit is capable of making SharePoint solutions WCAG compliant!

    In the nearest future we are going to test our toolkit more in different situations and environments and we are going to extend it with extra features. I hope I will be able to share some more technical details with you really soon and in the meanwhile I await some interesting questions.

  • Accessible Web Content Management Solutions based on Microsoft Office SharePoint Server 2007

    Microsoft Office SharePoint Server 2007 is a new web development platform of Microsoft. Its rich framework supports both collaboration features and designing, creating and delivering Web Content Management solutions. Many of these are targeted to become Internet-facing portals and websites. With this shift some new challenges appeared among which the accessibility and compliance with web standards of Internet facing WCM solutions based on SharePoint 2007.

    Web Content in Microsoft Office SharePoint Server 2007

    SharePoint 2007 embraces the ASP.NET 2.0 page rendering concept: it uses Master Pages and replaces pages with Page Layouts: containers responsible for displaying content and Web Parts. Unfortunately ASP.NET 2.0 and thus SharePoint 2007 render code that is not compliant with the WGAC guidelines. These guidelines describe not only how to make the information more accessible but also how to optimally incorporate the newest technologies and keep the web site manageable. As the Dutch government has defined in 2006 very strict rules extending the WGAC 1.0 guidelines some say that SharePoint 2007 cannot be used as a platform for Web Content Management solutions for organizations which require high accessibility standards among which the Dutch government.

    Accessible SharePoint 2007

    As a Microsoft Gold Certified Partner with broad Web Content Management experience we have decided to face the challenge and make SharePoint 2007 suit our customers’ needs. We have started by defining the key problem areas within the pages rendered by the SharePoint 2007 engine. We have divided the rendering process into custom and embedded.

    Because the developers can manage the custom parts using various tools (like SharePoint Designer and Visual Studio) we have focused the embedded part which is made of the SharePoint 2007 engine responsible for rendering the page of content, Master Page, Page Layout and Web Parts. We have started by defining the key problem areas within the page rendering process used by SharePoint 2007. We have setup a research using an empty Publishing Page (DTD HTML 4.01 Strict, no Web Parts). We have determined the following problem areas:

    • Invalid arguments in various HTML elements
    • Invalid CSS
    • Invalid JavaScript code
    After adding some custom Web Parts we have noticed some more invalid HTML code incorporated into the rendered page. Using our knowledge of controlling the rendering of ASP.NET pages acquired during the Rock My Website competition we have also found out that by optimizing our Master Pages, Page Layouts and Web Parts we could reach 90% on the Dutch government accessibility check (against 76% for a Publishing Page using the out of the box available Blue Band Master Page and the Welcome page with summary links Page Layout including Web Parts).

    To score the additional 10% we have improved the page rendering process.

    SharePoint 2007 Publishing Pages consist of a content (stored in the content database) rendered within a Page Layout. Each Page Layout requires a Master Page which determines the global chrome of the website. In our solution we have focused on the Page Layout as it’s the last part of the page rendering process. Out of the box each Page Layout derives from the PublishingLayoutPage class in the Microsoft.SharePoint.Publishing namespace. This class extends the functionality of a basic ASP.NET 2.0 Page with among others Web Parts and Cache support. To gain the required level of control we have extended the PublishingLayoutPage class with extra functionality which guarantees compliancy of the rendered HTML code.

    Using our approach we have succeeded in scoring 100% in the on-line scan.

    During the research we have discovered two bugs in the on-line scan tool. The support desk maintaining the tool has confirmed these bugs and has assured us that removing these bugs will result in scoring 100% with our test page. As both bugs are still present at this moment validating our page results in showing only 98% compliancy.

    Imtech.SharePoint.Compliancy Toolkit

    Imtech SharePoint 2007 Compliancy Toolkit is a way of designing and delivering accessible Web Content Management solutions based on Microsoft Office SharePoint Server 2007. Using compliant code we support the page rendering process in SharePoint 2007 and deliver our customers accessible WCM solutions based on SharePoint 2007 development platform. The compliancy concept and experience in WCM solutions allow our engineers to design and develop accessible Master Pages, Page Layouts and Web Parts. Our consultants use the same knowledge to educate the editors how they should approach the web content management process. The technical part of the toolkit provides us the required control of the page rendering process. As the toolkit is generic and flexible we can incorporate it easily in any of our WCM solutions based on SharePoint 2007.

    Roadmap

    Imtech SharePoint 2007 Compliancy Toolkit has proven the great flexibility of SharePoint 2007 as a development platform and made developing compliant web sites possible. Now we are able to guarantee our customers compliancy to web standards we want to continue our research and focus on rendering performance. Depending on the market we could extend the scope of the toolkit and incorporate more out of the box SharePoint 2007 functionality into it. Further we could also focus on different areas of the SharePoint 2007 development platform like for example collaboration.

    As a chief developer on Imtech.SharePoint.Compliancy Toolkit project I hope to be able to share with you some more technical details about our solution really soon. At this point of time I will try to answer all of your questions within the blog.

  • Displaying Features' version in the Site (Collection) Features Overview

    For each solution we develop for our customers we reuse a set of internal components we have developed – a kind of baseline library. As we use it we fix some errors and add some new functionality. To distinguish the different releases we modify the version of the assembly containing all the logic and the feature version as well. While working on several projects at the same with different project teams we found it quite difficult to check the assembly version each time you want to be sure you are using the latest version. That’s when I have decided to modify the page displaying Site and Site Collection feature and extend it with displaying the version of each feature stored within the feature.xml file.

    First of all I have found out that one and the same page is being used for both Site and Site Collection Features. After a little research on the ManageFeatures.aspx page I have found that the task of displaying the list of features is contained within a separate control: FeatureActivator.ascx residing in 12\CONTROLTEMPLATES.

    To obtain the version for each feature I have created the following method:

    public static string GetFeatureVersionById(string featureId, string scope)
    {
           Guid id = new Guid(featureId);
           SPFeatureDefinition fd;
     
           if (!String.IsNullOrEmpty(scope) && scope.ToLower() == "site")
           {
                  foreach (SPFeature f in SPContext.Current.Site.Features)
                  {
                         fd = f.Definition;
                         if (fd.Id.Equals(id))
                               return fd.Version.ToString();
                  }
           }
           else
           {
                  foreach (SPFeature f in SPContext.Current.Web.Features)
                  {
                         fd = f.Definition;
                         if (fd.Id.Equals(id))
                               return fd.Version.ToString();
                  }
           }
     
           return null;
    }

    To be able to use this method within the control I have added a reference to my assembly at the top of the control:

    <%@ Assembly Name="Imtech.SharePoint.WSSGUI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=token" %>

    Finally I have added a reference to my method at the end of the row displaying the Feature title:

    <%# Imtech.SharePoint.WSSGUI.Common.GetFeatureVersionById(DataBinder.Eval(Container.DataItem, "FeatureId", ""), Page.Request.QueryString["Scope"])%>

    Because there are two item templates you need to add the line above in the AlternatingItemTemplate section as well.

    As I have just modified modify an out-of-the-box SharePoint control I have decided to incorporate my changes in a copy of it instead replacing the existing one. It’s not such a good idea to modify SharePoint files: they might be replaced by SharePoint hotfixes, updates, service packs or any other features. Therefore it is recommended to use your own copies of the files you edit.

    To make use of my copied and extended control I had to copy the ManageFeatures.aspx page as well and replace the reference to the control with the one I’ve just modified:

    <%@ Register TagPrefix="wssuc" TagName="FeatureActivator" src="~/_controltemplates/ImtechFeatureActivator.ascx" %>

    Then I have spotted another challenge: I had to replace the links to the Site Features and Site Collection Features on the Site Settings page with a reference to the ImtechManageFeatures.aspx:

     

    The menus on the Site Settings page are created, just like the Site Action menu using the CustomAction element in an Element Manifest. These menus are created using the SiteSettings feature. In the SiteSettings.xml you can find all of the items showed on the Site Settings page. These two actions are ManageSiteFeatures and ManageSiteCollectionFeatures. To replace the Urls of these links, I had to hide them and create my own copies with the correct link. You hide the items as follows:

    <HideCustomAction HideActionId="ManageSiteFeatures"
                                 Id="HideManageSiteFeatures"
                                 GroupId="SiteAdministration"
                                 Location="Microsoft.SharePoint.SiteSettings" />
    <HideCustomAction HideActionId="ManageSiteCollectionFeatures"
                                 Id="HideManageSiteCollectionFeatures"
                                 GroupId="SiteCollectionAdmin"
                                 Location="Microsoft.SharePoint.SiteSettings" />

    And then add your copy:

    <CustomAction
        Id="ImtechManageSiteFeatures"
        GroupId="SiteAdministration"
        Location="Microsoft.SharePoint.SiteSettings"
        Rights="ManageWeb"
        Sequence="80"
        Title="$Resources:SiteSettings_ManageSiteFeatures_Title;">
           <UrlAction
            Url="_layouts/ImtechManageFeatures.aspx" />
    </CustomAction>
    <CustomAction
        Id="ImtechManageSiteCollectionFeatures"
        GroupId="SiteCollectionAdmin"
        Location="Microsoft.SharePoint.SiteSettings"
        RequireSiteAdministrator="TRUE"
        Sequence="45"
        Title="$Resources:SiteSettings_ManageSiteCollectionFeatures_Title;">
           <UrlAction

            Url="_layouts/ImtechManageFeatures.aspx?Scope=Site" />

    </CustomAction>

    To make it all work you have to first modify the id’s (they have to be unique) and make the links point to the modified version of the ManageFeatures.aspx application page. To wrap it all up you could put it all in a Solution which deploys this Feature. Upon activating it the links will be altered and you will be able to use the extended functionality.

    Having access to the features’ version works pretty well for me – especially in dynamic environments with new releases on regular basis. You could take this concept even further and extend it with your own properties that your development team uses. While using my customized Site (Collection) Features page I have discovered that there are a few more pages (like DeactivateFeature.aspx) which link the original ManagaFeatures.aspx. To make the user experience complete you could research these pages and make them reference your extended copy. Let me know if you would like to get this extension as a Solution (.wsp).

  • First publication in dutch Microsoft .NET Magazine #18

    We are very proud of our first publication in the dutch Microsoft .NET Magazine #18. It is an article (in dutch ofcourse) about creating accessible and W3C compliant websites with a good design. Earlier this year we have won the Rock My Website competition and in this article we explain how we did it.

    The good news is that we have used our knowlegde to build a component for making MOSS 2007 compliant. Our approach is a little bit different than HiSoftware. In fact we are tweaking the HTML output a little bit just like we did that with the ASP.NET 2.0 CSS Friendly Control Adapters. But be patient to read more about that later...

    Posted Oct 09 2007, 01:17 PM by john.bruin with 3 comment(s)
    Filed under:

Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts