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
MenuStripcontrols – 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
ProgressBarand the like, in one of two ways:
- Put a
Labeljust before the control you want to label in the tab index order. The
Labellabels the control. Use the
TabIndexproperty 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.
WebBrowsercontrols you need to think about the content in terms of web accessibility – use
labelelements, ARIA, and other HTML accessibility techniques. You might also need to label the actual
WebBrowsercontrol on your form with a
AccessibleName, 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.