KDE Accessibility • Inform • Home

A Comparision of the Two Architectures

This document describes which of the features of ATK and AT-SPI are also available in the Qt Accessibility Architecture, which can be emulated with simple code and which are completely missing. It was written by Gunnar Schmi Dt as part of our development efforts for interoperable accessibility solutions.

An Overview of the Missing Parts in Qt

There are a number of features that are available within ATK and AT-SPI but are not available in the current QAccessibleInterface class. These features include:

  • Methods for enquiring the relationship between several elements.
  • Support for several actions, each connected with a name, a description, and a key binding. QAccessibleInterface does only allow one default action.
  • Methods for enquiring the layer or the z-order of a GUI element.
  • A method for selecting all children of an element.
  • Methods for enquiring the position the size and a description for images.
  • Methods for handling streamable content.
  • Methods for enquiring accessibility relevant information in tables. These include:
    • A description for the table and for each row and each column,
    • Methods for enquiring headers of the rows and columns,
    • A method for requesting the child at a specified cell in the table, and
    • A method for enquiring the row and column of a given child.
  • Methods for handling a cursor and text attributes in elements with textual information.
  • Methods for accessing the clipboard (e.g., cut, copy and past methods) in elements with editable textual contents.
  • Methods for handling hyperlinks.
  • Methods for handling elements that only display a value of a given range of numbers.

Details Sorted by Interfaces

Within the following tables the first column specifies the methods that are available in ATK and AT-SPI. Unfortunately ATK and AT-SPI do not always have the same names. Therefor I chose to use the name that is used in ATK after stripping the interface name. For example the method "atk_object_get_name" in ATK is called "get_name" within the tables of this document.

The second column specifies whether the actual method of a given row is available in ATK or AT-SPI (or in both). From the semantics of the methods that are only available for either ATK or AT-SPI I suppose that these do not need to be supported by our bridge.

The third column specifies whether the method of a given row is supported by the Qt Accessibility Architecture. A "yes" in this column implies that there is a method for exactly this purpose in the QAccessibleInterface class. An entry "emulatable" is used for methods that can be emulated with other methods of the architecture (this includes access to the static QAccessible::updateAccessibility method and to the QAccessibleInterface, QAccessibleObject and QObject classes). A "partially" in the third column implies that the needed functionality is only partly availabe, and finally a "no" implies that it is completely missing.

For all methods that contain a "emulatable" or a "partially" in the third column some comments are added below the table of the corresponding interface.

The Class Accessible/AtkObject

MethodDefined inAvailable
get_name(); AT-SPI and ATKyes
get_description(); AT-SPI and ATKyes
get_parent(); AT-SPI and ATKyes
get_n_accessible_children(); AT-SPI and ATKyes
ref_accessible_child (index); AT-SPI and ATKyes
ref_relation_set(); AT-SPI and ATKno
get_role(); AT-SPI and ATKyes
ref_state_set(); AT-SPI and ATKyes
get_index_in_parent(); AT-SPI and ATKemulatable
set_name (*name); AT-SPI and ATKemulatable
set_description (*description); AT-SPI and ATKno
is_equal(obj); AT-SPI
get_role_name(); AT-SPI
set_parent (*parent); ATK
set_role (role); ATK
connect_property_change_handler (*handler); ATK
remove_property_change_handler (handler_id);ATK
notify_state_change (state, value); ATK
initialize (gpointer data); ATK
add_relationship (relationship, *target); ATK
remove_relationship (relationship, *target);ATK

The method get_index_in_parent() can be emulated by a loop over the children of the parent widget.

The Interface Action/AtkAction

MethodDefined inAvailable
boolean do_action (index); AT-SPI and ATKpartially
get_n_actions() AT-SPI and ATKno
get_description (index); AT-SPI and ATKno
get_name (index); AT-SPI and ATKpartially
get_key_binding (index); AT-SPI and ATKpartially
get_localized_name (index); ATK
set_description (index, description);ATK

The QAccessibleInterface class only allows to trigger a default action. Both ATK and AT-SPI allow to have multiple actions, all connected with a name, a description, and a key binding.

The Interface Component/AtkComponent

MethodDefined inAvailable
add_focus_handler (handler); AT-SPI and ATKemulatable
contains (x, y, coord_type); AT-SPI and ATKemulatable
get_extents (*x, *y, *width, *height, coord_type);AT-SPI and ATKyes
get_layer(); AT-SPI and ATKno
get_mdi_zorder(); AT-SPI and ATKno
get_position (*x,*y, coord_type); AT-SPI and ATKyes
get_size (*width, *height); AT-SPI and ATKyes
grab_focus (); AT-SPI and ATKyes
ref_accessible_at_point (x, y, coord_type); AT-SPI and ATKyes
remove_focus_handler (handler_id); AT-SPI and ATKemulatable
set_extents (x, y, width, height, coord_type); ATK
set_position (x, y, coord_type); ATK
set_size (width, height); ATK

The QAccessibleInterface class does not allow to add focus handlers. However, this can be emulated by some code within the QAccessible::updateAccessibility (*object, control, reason) method.

The method contains (x, y, coord_type) can be emulated for example by asking for the screen extends and applying some geometric calculations.

The Interface Selection / AtkSelection

MethodDefined inAvailable
add_selection (index); AT-SPI and ATKyes
clear_selection(); AT-SPI and ATKyes
ref_selection (index); AT-SPI and ATKyes
get_selection_count(); AT-SPI and ATKyes
is_child_selected (index);AT-SPI and ATKemulatable
remove_selection (index);AT-SPI and ATKyes
select_all_selection(); AT-SPI and ATKemulatable

The method is_child_selected (index) can be emulated by asking the child widget for its state and then checking if the selected state is set. The method select_all_selection() can be emulated by sequentially selecting all children.

The Interface AtkDocument

MethodDefined inAvailable
get_document (); ATKno

Please note that AtkDocument is currently ignored within the current bridge to AT-SPI as there is no standard way to provide access to an application's DOM tree.

The Interface Image / AtkImage

MethodDefined inAvailable
get_image_description(); AT-SPI and ATKno
get_image_position (*x, *y, coord_type);AT-SPI and ATKno
get_image_size (*width, *height); AT-SPI and ATKno
get_image_extents (*x, *y, *width, *height, coord_type);AT-SPI
set_image_description (description); ATK

The Interface StreamableContent / AtkStreamableContent

MethodDefined inAvailable
get_n_mime_types(); AT-SPI and ATKno
get_mime_type (index); AT-SPI and ATKno
get_stream (*mime_type);AT-SPI and ATKno

Please note that currently there is no assistive technology that makes use of this interface.

The Interface Table / AtkTable

MethodDefined inAvailable
ref_at (row, column); AT-SPI and ATKno
get_index_at (row, column); AT-SPI and ATKno
get_column_at_index (index); AT-SPI and ATKno
get_row_at_index (index); AT-SPI and ATKno
get_n_columns(); AT-SPI and ATKno
get_n_rows(); AT-SPI and ATKno
get_column_extent_at (row, column); AT-SPI and ATKno
get_row_extent_at (row, column); AT-SPI and ATKno
get_caption(); AT-SPI and ATKno
get_column_description (column); AT-SPI and ATKno
get_row_description (row); AT-SPI and ATKno
get_column_header (column); AT-SPI and ATKno
get_row_header (row); AT-SPI and ATKno
get_summary(); AT-SPI and ATKno
get_selected_columns (**selected); AT-SPI and ATKno
get_selected_rows (**selected); AT-SPI and ATKno
is_column_selected (column); AT-SPI and ATKno
is_row_selected (row); AT-SPI and ATKno
is_selected (row, column); AT-SPI and ATKno
add_column_selection (column); AT-SPI and ATKno
add_row_selection (row); AT-SPI and ATKno
remove_column_selection (column); AT-SPI and ATKno
remove_row_selection (row); AT-SPI and ATKno
set_caption (caption); ATK
set_row_description (row, description); ATK
set_column_description (column, description);ATK
set_row_header (row, header); ATK
set_column_header (column, header); ATK
set_summary (summary); ATK

Please note that QAccessibleInterface provides a method that allows to navigate between the children of an element (e.g., to ask which child is above, below, or in the right or left of an other child). However, this method does not at all cover the requirements for the Table interface.

The Interface Text / AtkText

MethodDefined inAvailable
get_text (start_offset, end_offset); AT-SPI and ATKyes
get_character_at_offset (offset); AT-SPI and ATKno
get_text_after_offset (offset, boundary_type, *start_offset, *end_offset); AT-SPI and ATKno
get_text_at_offset (offset, boundary_type, *start_offset, *end_offset); AT-SPI and ATKno
get_text_before_offset (offset, boundary_type, *start_offset, *end_offset);AT-SPI and ATKno
get_caret_offset(); AT-SPI and ATKno
get_character_extents (offset, *x, *y, *width, *height, coords); AT-SPI and ATKno
get_run_attributes (offset, *start_offset, *end_offset); AT-SPI and ATKno
get_character_count(); AT-SPI and ATKno
get_offset_at_point (x, y, coords); AT-SPI and ATKno
get_n_selections(); AT-SPI and ATKno
get_selection (selection_num, *start_offset, *end_offset); AT-SPI and ATKno
add_selection (start_offset, end_offset); AT-SPI and ATKno
remove_selection (selection_num); AT-SPI and ATKno
set_selection (selection_num, start_offset, end_offset); AT-SPI and ATKno
set_caret_offset (offset); AT-SPI and ATKno
get_range_extents (start_offset, end_offset, coord_type, *rect) AT-SPI and ATKno
get_bounded_ranges (*rect, coord_type, x_clip_type, y_clip_type) AT-SPI and ATKno
get_default_attributes(); ATK

The Interface EditableText / AtkEditableText

MethodDefined inAvailable
set_run_attributes (attrib_set, start_offset, end_offset);AT-SPI and ATKno
set_text_contents (string); AT-SPI and ATKyes
insert_text (string, length, *position); AT-SPI and ATKemulatable
copy_text (start_pos, end_pos); AT-SPI and ATKno
cut_text (start_pos, end_pos); AT-SPI and ATKno
delete_text (start_pos, end_pos); AT-SPI and ATKemulatable
paste_text (position); AT-SPI and ATKno

The methods insert_text(...) and delete_text(...) can be emulated by requesting the text, changing it, and setting the result. All other missing methods either need acces to the cursor position or access to the clipboard.

The Interface Hypertext / AtkHypertext

MethodDefined inAvailable
get_link (link_index); AT-SPI and ATKno
get_n_links (); AT-SPI and ATKno
get_link_index (char_index);AT-SPI and ATKno

The Class Hyperlink / AtkHyperlink

MethodDefined inAvailable
get_uri (index); AT-SPI and ATKno
get_object (index);AT-SPI and ATKno
get_end_index(); AT-SPI and ATKno
get_start_index(); AT-SPI and ATKno
is_valid(); AT-SPI and ATKno
get_n_anchors(); AT-SPI and ATKno

Please note that the support for class is tightly connected to the support of the Hypertext interface.

The Interface Value / AtkValue

MethodDefined inAvailable
get_current_value (*value);AT-SPI and ATKemulatable
get_maximum_value (*value);AT-SPI and ATKno
get_minimum_value (*value);AT-SPI and ATKno
set_current_value (value); AT-SPI and ATKno
get_minimum_increment (*value);AT-SPIno

Please note that QAccessibleInterface has a method that can be used for enquiring the value of any element. However, that method always returns a QString, i.e., numers for example are converted to text. As the Value interface needs to return numbers we would need to convert the QString back to its original type.

Global navigation links