How Controls Support Accessibility

ASP.NET controls designed to be accessible.

Identify themselves to screen readers and do not require a mouse for input.

Tab index settings make mouse-less navigation easier.

Enable SkipLinkText property by default - causes screen readers to skip navigation links within control (which are not normally visible to users).

Improving Visual Accessibility

  • Describe every image via AlternateText property. Can also set Imaage.DescriptionUrl to html page that further describes the image. If image not important set GenerateEmptyAlternateText to true.

  • Use solid background colours with contrasting text.

  • Use flexible page layout that scales when text size increased.

  • Set Table.Caption property to a description of table.

  • Identify column headers, e.g. by using TableHeaderRow class and setting TableSection to be TableHeader. When creating cells via TableCell control set its AssoiatedHeaderCellID property to ID of appropriate table header cell.

  • Don't define specific font sizes, instead use heading tags, e.g. H1, H2, etc.

  • Don't require client scripts to be available. Only use for non-essential effects, e.g. mouse roll-overs.

If cannot meet accessibility goals consider providing alternate text-only pages. Could use global resources to allow both accessible and non-accessible pages to share content.

Improving Accessibility of Forms

  • Set DefaultFocus to place cursor at location where date entry begins.

  • Define Tab order so form can be completed without mouse

  • Specify DefaultButton that is accessed by pressing Enter

  • Provide useful link text - avoid hyperlinks with "Click here" as text, instead provide link destination within hyperlink.

  • Use AccessKey property to define access keys for web controls - act just as in WinForm applications

  • Use Label controls to define access keys for text boxes. Text boxes do not have descriptions so should associate with descriptive labels that can also define AccessKey

  • Use Panel control to sub-divide form and use Panel.GroupingText to describe the grouping

  • Provide meaningful messages in Text and ErrorMessage validator properties

Accessibility Testing of Page

  • Open page to check

  • Select View | Error List to show errors window

  • Select Tools | Check Accessibility - results appear in errors window

Accessibility Testing of Application

  • Open property page for applications

  • Click Accessibility node and select checking required

  • Select Build node and select if checks made on individual pages or entire site

  • Build application - results appear in errors window