Implementing the IAccessibleApplication Interface
Summary
The IAccessibleApplication interface can be used to customize how screen readers such as JAWS identify an application. Specifically, the IAccessibleApplication::get_appName function can be used to specify that JAWS should use a specific name for the application instead of deriving the name for the application from the name of the application’s executable file.
Implementation Details
C++/Windows API
Pending.
C++/ATL and MFC
In order to support the IAccessibleApplication interface in an ATL/MFC application you need to use a custom IAccessible Proxy. To create a custom IAccessible Proxy do the following.
- Create a customized version of the IAccessibleProxyImpl class and CAccessibleProxy class using source code obtained from atlacc.h.
- Add a COM_INTERFACE_ENTRY for IAccessibleApplication in the COM_MAP (BEGIN_COM_MAP/END_COM_MAP) for the custom IAccessibleProxyImpl class.
- Use the BEGIN_SERVICE_MAP, END_SERVICE_MAP, and SERVICE_ENTRY macros to provide an implementation of the IServiceProvider interface.
- Provide an override for the CWnd::CreateAccessibleProxy function to cause your windows to use the custom accessible proxy and thus your implementation of the IAccessibleApplication interface.
You should do this for every window that can gain focus in your application.
Sample Implementation
You can refer to the open source TTSApp application for additional details on how to do this. Pay special attention to the following files.
AccessibleProxyWithAccessibleApplicationSupport.h
The implementation of the custom IAccessible Proxy.
-
Source for the IAccessibleApplication interface implementation.
-
Header file for the IAccessibleApplication interface implementation.
WndWithCustomizedAccessibleInfo.cpp
Source for the class that is used for all windows that can gain focus in the TTSApp application.
WndWithCustomizedAccessibleInfo.h
Header file for the class that is used for all windows that can gain focus in the TTSApp application.
Additional Information
The following web pages supply additional information.