Making Custom Controls Accessible: Getting Started
This article provides control developers with the information they need before reading the Making Custom Controls Accessible articles.
Technologies for Making Controls Accessible
On the Windows operating system, several technologies are available to make controls accessible:
- Microsoft Active Accessibility (MSAA): based on implementations of IAccessible.
- Dynamic Annotation: controls that support MSAA can be customized by using Dynamic Annotation.
- Microsoft UI Automation: supported natively by some newer controls and can also take advantage of implementations of MSAA by “bridging.”
- IAccessibleEx: an interface that has been developed as a way of upgrading older controls so that the UI Automation engine can derive more information from them than from a simple IAccessible implementation.
Each article in this series refers to two Visual Studio projects for a simple custom control: the initial project and the final project with new accessibility features added. To download these projects:
- Open the Project files for Accessibility Developer Center articles page on the MSDN Code Gallery.
- Click the Release tab and select the Begin and End files associated with the article.
The initial project contains the non-accessible control, the final project contains the accessible control implemented per suggestions in this article. You can use the windiff tool or other similar tools to quickly see the changes between the two projects that made the final project accessible.
For the first article, the initial project creates the control itself: a list box with special slider functionality. Accessibility is limited to whatever information can be derived from the control window. We then add accessible information by using Dynamic Annotation.
Before You Begin
Before you start reading the articles, do any of the following steps to prepare your build that you haven't already done.
1. Install Visual Studio.
The sample projects were created and built using Visual Studio 2005.
2. Install the latest Windows SDK.
Visual Studio 2005 does not come with the required libraries for using UI Automation. To follow this sample you need to install the latest Windows SDK from the Microsoft Download Center. After installation, go to Start > All Programs > Microsoft Windows SDK >Visual Studio Registration > Integrate Windows SDK with Visual Studio 2005. Execute this command as administrator.
Projects are configured to build with the default options.
3. Install test tools.
To verify the accessibility in the projects for these articles, you must install the following accessibility tools:
- Inspect and AccEvent. These MSAA tools can be downloaded here.
- UI Spy. This UI Automation tool is installed automatically when you install the Windows Vista SDK.
4. Download the sample projects from the MSDN Code Gallery: https://code.msdn.microsoft.com/accProjects.
References
The following links lead to reference material for the technologies discussed in these articles.
MSAA
- MSAA overview
- MSAA basics
- Dynamic Annotation
- The WM_GETOBJECT message
- The IAccessible Interface
- WinEvents
- Server Guideline
- User Interface Elements Reference
- Reference for client developers
UI Automation