Samples

 

XHTML, Section 508 and WAI Validation

HTML Validation

Section 508

Web Accessibility

Remarks

We placed a priority on Accessiblity and Validation when building Basic Date Picker. Our goal was to validate "Out-of-the-Box", although in our research we found that it is impossible to create a valid Web Form out-of-the-box, with or without Basic Date Picker.

The good news is, with a little work it is possible create a WebForm that will validate.

A blank Web Form (ASP.NET 1.1) will not validate. The best technique we found to correcting the HTML requires developers to "adjust" the HTML before the server sends to the browser (User-Agent).

The problems with ASP.NET Web Accessiblity and HTML validation are well documented by Millan Negovan at ASPnetResources.com.

We use Millan's IHttpModule Page Filter approach to intercept the HTML prerender and correct any issues. See Producing XHTML Compliant Pages With Response Filters for detailed information.

Download Basic Date Picker Trial

The PageFilter corrects all issues except one:

  1. By default Basic Date Picker renders a <style> block to include the required external StyleSheet (basicdatepicker.css). We did not want to rely on the PageFilter Regular Expression parsing to move the <style> tag from the <body> to the page <head>, so we set the .RenderStyleSheet property to "None" and place/include the <style> block manually into the <head> of the page. Example:
    <bdp:BasicDatePicker 
        id="BasicDatePicker1" 
        runat="server" 
        RenderStyleSheet="None" />

Other important notes:

  1. Ensure you have a valid DOCTYPE. We use xhtml 1.0 transitional. Example:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. Ensure you add a <label> tag to satisfy WAI requirements. Example:
    <label for="BasicDatePicker1_textBox">Sample Date:</label>
    <bdp:BasicDatePicker 
        id="BasicDatePicker1" 
        runat="server" 
        RenderStyleSheet="None" />
    

See Also

RenderStyleSheet | RenderJavaScript | TargetBrowser