Another item for programmers, more on UIA and MSAA and developing accessible user interfaces, following on from using WPF/XAML with MSAA and UIA.
This is a super-quick guide to using WinForms to make UIs that work well with screenreaders like NVDA or Thunder or JAWS.
- You don’t need to do anything to
Button,CheckBox,MenuItemorMenuStripcontrols – other than put some text on them! Image-only controls are no good. It’s fine if only the image is shown to the end user and the text is hidden. - You can correctly label content controls that don’t have a
Textproperty, likeTextBox,ListBox,ListView,ComboBox,ProgressBarand the like, in one of two ways:- Put a
Labeljust before the control you want to label in the tab index order. TheTexton theLabellabels the control. Use theTabIndexproperty to make sure the order is correct. - Set the
AccessibleNameproperty on the content control itself. This labels the control for the screenreader.
- Put a
Groupboxcontrols don’t label their contents, use one of the other techniques here.- You almost certainly want to avoid labelling
Panelcontrols, since they are generally for layout, which is communicated to the screenreader user in other ways than labeling. - For
WebBrowsercontrols you need to think about the content in terms of web accessibility – uselabelelements, ARIA, and other HTML accessibility techniques. You might also need to label the actualWebBrowsercontrol on your form with aLabelorAccessibleName, just like any other content control.
Unsurprisingly, these techniques are basically the same as writing forms using the Windows C++ API, since WinForms is a wrapper round that.