Building accessible Sharepoint sites – Part 2


Part 1 – Building accessible Sharepoint sites – Part 1

Web Design

After the choice of the Template you have to work on the website design, demand that the Web Designer provides accessible design, this is very important because it will prevent, later in the project, some headaches in development and validation. There are a number of .NET Controls that are simply not accessible, and therefore they should be avoided , you can check a list of the ASP.NET controls and the Accessibility: http://msdn.microsoft.com/en-us/library/ms227996(VS.80).aspx.

Components to use or development

User Controls

The User Controls will be the most fast and controllable way to provide your client with what he wants, well it seems pretty stupid not to use the webparts of MOSS, but the problem with them is the way the HTML will be rendered, therefore if you cannot control it don’t use it.

To use User Controls in a MOSS site, you will have to be declare in the Web.Config as well as in the Masterpage.

Publishing Placeholders

These are an inheritance from the “old” CMS, fortunately the publishing placeholders are accessible and therefore can be used.

InLine Code the Holy Grail

Well we do know that the way MOSS renders the webparts and the web pages breaks accessibility, therefore if we had something that help us to override this render it would be perfect, because therefore we could mend the problems . . . guess what? it exists! we can use Inline code in MOSS and by doing so why not use it to control the way the HTML is rendered.

Some references of inline code:

To use Inline code you have to fist include in your web.config. in the PageParserPaths tag:

<PageParserPaths>
<PageParserPath VirtualPath=”/*” CompilationMode=”Always” AllowServerSideScript=”true” IncludeSubFolders=”true” />
</PageParserPaths>

In your ASPX page or Master page you then can use C# code in a script tag (<SCRIPT>) or Server side (<% %>). For example we want to replace a specific html tag that is not accessible and we cannot control:

<script type=”text/c#” runat=”server”>
protected override void Render(HtmlTextWriter writer)
{
// Getting all the html
System.IO.StringWriter str = new System.IO.StringWriter();
HtmlTextWriter htw = new HtmlTextWriter(str);
// rendering the html
base.Render(htw); //Getting the current page html
wrt.Close();
string html = str.ToString();
html = html.Replace(“SCRIPT”, “script”); //XHTML compliance will not accept upper-case
// write the ‘clean’ html to the page
writer.Write(html); //Writes the correct HTML
}
</script>

By using this method you can “clean” any problem that is presented by the rendering of HTML that you simply cannot control by any other means.

This article is intended to help you start on developing your accessible sites using MOSS, there seems to be a concern by Microsoft to include in the next versions more accessible solutions, to prevent all these “solutions” we have to build.

Part 1 – Building accessible Sharepoint sites – Part 1

Computer developer/consultant from Portugal. You can find me at ricardo.magalhaes@gmail.com

Tagged with: , , , ,
Posted in Sharepoint
6 comments on “Building accessible Sharepoint sites – Part 2
  1. [...] The rest of the article continues in”Building accessible Sharepoint sites – Part 2“. [...]

  2. [...] Building Accessible SharePoint Sites – Part 2 (Tech Talk PT)After the choice of the Template you have to work on the website design, demand that the Web Designer provides accessible design, this is very important because it will prevent, later in the project, some headaches in development and validation. There are a number of .NET Controls that are simply not accessible, and therefore they should be avoided , you can check a list of the ASP.NET controls and the Accessibility: http://msdn.microsoft.com/en-us/library/ms227996(VS.80).aspx. [...]

  3. AlexM says:

    I found your site on technorati and read a few of your other posts. Keep up the good work. I just added your RSS feed to my Google News Reader. Looking forward to reading more from you down the road!

  4. Alexwebmaster says:

    Hello webmaster
    I would like to share with you a link to your site
    write me here preonrelt@mail.ru

  5. I’m still curious, is it really possible to develop a MOSS based website and make it W3C Accessible?
    So far I find it almost impossible to achieve.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: