Qt Accessibility Architecture

This description of the Qt Accessibility Architecture was written by Gunnar Schmi Dt as part of our development efforts for interoperable accessibility solutions. Thanks to José Pablo Ezequiel Fernández for earlier work on the topic.

Introduction

The Qt Accessibility Architecture was added to Qt for providing support for the Microsoft Active Accessibility (MSAA) technology on Windows. MSAA can be described as a part of the operating system that collects accessibility relevant information from MSAA aware applications and offers these information to assistive technologies.

Unfortunately MSAA was not designed to be the only source of information that is used by assistive technologies. It rather complements existing technologies for determining what is on the screen (such as the Microsoft Screen Access Model (MSAM)).

In order to design a technology similar to MSAA for Unix systems you have to start from scratch as there are no technologies as MSAM. As a result of that it will be neccessary to extend the Qt Accessibility Architecture to fit the extended requirements.

An Overview of the Architecture

The basic idea for the current design of the Qt Accessibility Architecture is to provide an accessibility object for all widgets within the application. However, only the base classes for these objects are part of the Qt library, the actual implementation of the accessibility information for the widgets is hidden in a plug-in.

For widgets that are implemented outside of Qt (i.e., KDE widgets or application widgets) it is possible to install additional plug-ins.

A More Detailed View on the Architecture

Diagram for Qt Accessibility. Description follows

The three classes of the Qt Accessibility Architecture that are part of the Qt library are QAccessible, QAccessibleInterface, and QAccessibleObject. QAccessible consists of two static methods and a number of enumerations. QAccessibleInterface is the most important class outside of the plug-in. It is derived from QAccessible and contains pure virtual methods for enquiring all available information. The QAccessibleObject class is inherited from QAccessibleInterface and implements part of the functionality. For this purpose it also has a reference to the QObject it represents.

The plug-ins contain implementations for QAccessibleInterface for all Qt widgets. The base class for these implementations is QAccessibleWidget, from which all other classes of the plug-in are derived. Some of these derived classes have a reference to the corresponding Qt widget (as for example QAccessibleButton), others use the reference that is part of QAccessibleWidget (as for example QAccessibleText). QAccessibleWidget is inherited from QAccessibleObject.

Unfortunately not all GUI elements within Qt are widgets. For example the entries within a QTable or a QListView are simple C++ classes. For these elements no QAccessibleInterface instance is created. Instead you will have to use the QAccessibleInstance of the parent widget for handling these elements.

In order to inform the Qt Accessibility Architecture architecture about changes in the accessibility information the widgets have to call a static method within the QAccessible class.

Details About the Core Classes

The QAccessible Class

The QAccessible class simply contains a three static methods and a number of enumerations:

The QAccessibleInterface Class

The QAccessibleInterface class is designed to be the only contract between the accessibility implementation of the widgets and the bridge to the accessibility infrastructure within the system. It provides methods for accessing many relevant properties:

The QAccessibleObject Class

This class is mainly provided for convenience. It is recommended that all subclasses of QAccessibleInterface use this class as their base class. It implements part of the QAccessibleInterface interface for QObjects.

Further Information

In the Qt Reference Documentation you can find details on the three classes QAccessible, QAccessibleInterface, and QAccessibleObject

Inform

Skip menu "Inform"

Communicate

Skip menu "Communicate"

Develop

Skip menu "Develop"

Explore

Skip menu "Explore"

Global navigation links