Windows has built in accessibility tools that make it easier for users with disabilities to use software. This rule verifies that WinForms controls have been setup correctly to allow screen readers such as Microsoft Narrator to work well.

First of all Microsoft Narrator ships with Windows and "reads" the screen to the user. There are a number of other third party screen readers which are similar to Narrator but have more functionality. The basic functionality of a screen reader is to read to the user where the focus is in the UI and the relevant control values. For example when you open a form, Narrator will read the form title and then each control value. The control information is also read as focus moves from control to control. For a control, Narrator will say the control's AccessibleName, the type of control and then the value of the control.

Their are a few things that need to be set approriately for Narrator to read the screen correctly. The one that this rule looks at is the AccessibleName. If the control has its AccessibleName property set then it is assumed to be correct. For controls like TextBoxes, the AccessibleName that is used is usually from the Label that is in front of it. To determine which label to use, the preceding (in TabOrder) are searched for a Label. If an appropriate Label is found before another control that is a TabStop is found then its text is used for the AccessibleName.

This rule looks at all the sibling controls searching for a control that can provide the AccessibleName. It finds the best controls by TabOrder as well as possition. If no control or more than one control is found then the rule adds an appropriate warning.

Last edited Aug 22, 2007 at 8:58 PM by JeffLeBert, version 1


srwoodward Oct 5, 2007 at 5:36 PM 
Hi Jeff - these rules are great! Do you have any documentation describing the rule mechanics. The "IsNear" and "TabIndex" mechanics you've implemented indicate a strong knowledge of the same mechanics used in Narrator (and even JAWS). Where did you source this information?

Also, why isn't the Button control included in your shortlist?