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.
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:
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.
| Method | Defined in | Available |
|---|---|---|
| get_name(); | AT-SPI and ATK | yes |
| get_description(); | AT-SPI and ATK | yes |
| get_parent(); | AT-SPI and ATK | yes |
| get_n_accessible_children(); | AT-SPI and ATK | yes |
| ref_accessible_child (index); | AT-SPI and ATK | yes |
| ref_relation_set(); | AT-SPI and ATK | no |
| get_role(); | AT-SPI and ATK | yes |
| ref_state_set(); | AT-SPI and ATK | yes |
| get_index_in_parent(); | AT-SPI and ATK | emulatable |
| set_name (*name); | AT-SPI and ATK | emulatable |
| set_description (*description); | AT-SPI and ATK | no |
| 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.
| Method | Defined in | Available |
|---|---|---|
| boolean do_action (index); | AT-SPI and ATK | partially |
| get_n_actions() | AT-SPI and ATK | no |
| get_description (index); | AT-SPI and ATK | no |
| get_name (index); | AT-SPI and ATK | partially |
| get_key_binding (index); | AT-SPI and ATK | partially |
| 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.
| Method | Defined in | Available |
|---|---|---|
| add_focus_handler (handler); | AT-SPI and ATK | emulatable |
| contains (x, y, coord_type); | AT-SPI and ATK | emulatable |
| get_extents (*x, *y, *width, *height, coord_type); | AT-SPI and ATK | yes |
| get_layer(); | AT-SPI and ATK | no |
| get_mdi_zorder(); | AT-SPI and ATK | no |
| get_position (*x,*y, coord_type); | AT-SPI and ATK | yes |
| get_size (*width, *height); | AT-SPI and ATK | yes |
| grab_focus (); | AT-SPI and ATK | yes |
| ref_accessible_at_point (x, y, coord_type); | AT-SPI and ATK | yes |
| remove_focus_handler (handler_id); | AT-SPI and ATK | emulatable |
| 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.
| Method | Defined in | Available |
|---|---|---|
| add_selection (index); | AT-SPI and ATK | yes |
| clear_selection(); | AT-SPI and ATK | yes |
| ref_selection (index); | AT-SPI and ATK | yes |
| get_selection_count(); | AT-SPI and ATK | yes |
| is_child_selected (index); | AT-SPI and ATK | emulatable |
| remove_selection (index); | AT-SPI and ATK | yes |
| select_all_selection(); | AT-SPI and ATK | emulatable |
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.
| Method | Defined in | Available |
|---|---|---|
| get_document_type(); | ATK | no |
| get_document (); | ATK | no |
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.
| Method | Defined in | Available |
|---|---|---|
| get_image_description(); | AT-SPI and ATK | no |
| get_image_position (*x, *y, coord_type); | AT-SPI and ATK | no |
| get_image_size (*width, *height); | AT-SPI and ATK | no |
| get_image_extents (*x, *y, *width, *height, coord_type); | AT-SPI | |
| set_image_description (description); | ATK |
| Method | Defined in | Available |
|---|---|---|
| get_n_mime_types(); | AT-SPI and ATK | no |
| get_mime_type (index); | AT-SPI and ATK | no |
| get_stream (*mime_type); | AT-SPI and ATK | no |
Please note that currently there is no assistive technology that makes use of this interface.
| Method | Defined in | Available |
|---|---|---|
| ref_at (row, column); | AT-SPI and ATK | no |
| get_index_at (row, column); | AT-SPI and ATK | no |
| get_column_at_index (index); | AT-SPI and ATK | no |
| get_row_at_index (index); | AT-SPI and ATK | no |
| get_n_columns(); | AT-SPI and ATK | no |
| get_n_rows(); | AT-SPI and ATK | no |
| get_column_extent_at (row, column); | AT-SPI and ATK | no |
| get_row_extent_at (row, column); | AT-SPI and ATK | no |
| get_caption(); | AT-SPI and ATK | no |
| get_column_description (column); | AT-SPI and ATK | no |
| get_row_description (row); | AT-SPI and ATK | no |
| get_column_header (column); | AT-SPI and ATK | no |
| get_row_header (row); | AT-SPI and ATK | no |
| get_summary(); | AT-SPI and ATK | no |
| get_selected_columns (**selected); | AT-SPI and ATK | no |
| get_selected_rows (**selected); | AT-SPI and ATK | no |
| is_column_selected (column); | AT-SPI and ATK | no |
| is_row_selected (row); | AT-SPI and ATK | no |
| is_selected (row, column); | AT-SPI and ATK | no |
| add_column_selection (column); | AT-SPI and ATK | no |
| add_row_selection (row); | AT-SPI and ATK | no |
| remove_column_selection (column); | AT-SPI and ATK | no |
| remove_row_selection (row); | AT-SPI and ATK | no |
| 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.
| Method | Defined in | Available |
|---|---|---|
| get_text (start_offset, end_offset); | AT-SPI and ATK | yes |
| get_character_at_offset (offset); | AT-SPI and ATK | no |
| get_text_after_offset (offset, boundary_type, *start_offset, *end_offset); | AT-SPI and ATK | no |
| get_text_at_offset (offset, boundary_type, *start_offset, *end_offset); | AT-SPI and ATK | no |
| get_text_before_offset (offset, boundary_type, *start_offset, *end_offset); | AT-SPI and ATK | no |
| get_caret_offset(); | AT-SPI and ATK | no |
| get_character_extents (offset, *x, *y, *width, *height, coords); | AT-SPI and ATK | no |
| get_run_attributes (offset, *start_offset, *end_offset); | AT-SPI and ATK | no |
| get_character_count(); | AT-SPI and ATK | no |
| get_offset_at_point (x, y, coords); | AT-SPI and ATK | no |
| get_n_selections(); | AT-SPI and ATK | no |
| get_selection (selection_num, *start_offset, *end_offset); | AT-SPI and ATK | no |
| add_selection (start_offset, end_offset); | AT-SPI and ATK | no |
| remove_selection (selection_num); | AT-SPI and ATK | no |
| set_selection (selection_num, start_offset, end_offset); | AT-SPI and ATK | no |
| set_caret_offset (offset); | AT-SPI and ATK | no |
| get_range_extents (start_offset, end_offset, coord_type, *rect) | AT-SPI and ATK | no |
| get_bounded_ranges (*rect, coord_type, x_clip_type, y_clip_type) | AT-SPI and ATK | no |
| get_default_attributes(); | ATK |
| Method | Defined in | Available |
|---|---|---|
| set_run_attributes (attrib_set, start_offset, end_offset); | AT-SPI and ATK | no |
| set_text_contents (string); | AT-SPI and ATK | yes |
| insert_text (string, length, *position); | AT-SPI and ATK | emulatable |
| copy_text (start_pos, end_pos); | AT-SPI and ATK | no |
| cut_text (start_pos, end_pos); | AT-SPI and ATK | no |
| delete_text (start_pos, end_pos); | AT-SPI and ATK | emulatable |
| paste_text (position); | AT-SPI and ATK | no |
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.
| Method | Defined in | Available |
|---|---|---|
| get_link (link_index); | AT-SPI and ATK | no |
| get_n_links (); | AT-SPI and ATK | no |
| get_link_index (char_index); | AT-SPI and ATK | no |
| Method | Defined in | Available |
|---|---|---|
| get_uri (index); | AT-SPI and ATK | no |
| get_object (index); | AT-SPI and ATK | no |
| get_end_index(); | AT-SPI and ATK | no |
| get_start_index(); | AT-SPI and ATK | no |
| is_valid(); | AT-SPI and ATK | no |
| get_n_anchors(); | AT-SPI and ATK | no |
Please note that the support for class is tightly connected to the support of the Hypertext interface.
| Method | Defined in | Available |
|---|---|---|
| get_current_value (*value); | AT-SPI and ATK | emulatable |
| get_maximum_value (*value); | AT-SPI and ATK | no |
| get_minimum_value (*value); | AT-SPI and ATK | no |
| set_current_value (value); | AT-SPI and ATK | no |
| get_minimum_increment (*value); | AT-SPI | no |
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.