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
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.
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:
<PageParserPath VirtualPath=”/*” CompilationMode=”Always” AllowServerSideScript=”true” IncludeSubFolders=”true” />
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
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
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.