The Accessibility API

Here are a few of the basic API calls you may need to use in your application to ensure it works well with assistive technologies. The full accessibility API is extensive, to allow you to write your own accessible custom widgets, for example.

Table 1-1Commonly used ATK API calls
API Description
AtkObject* gtk_widget_get_accessible (GtkWidget*) Returns the accessible object that describes the specified GTK widget to an assistive technology.
void atk_object_set_name (AtkObject*, const gchar*) Sets the name of the accessible object. For example, if the object is a graphical button that quits the application when pressed, the name might be "Quit".
void atk_object_set_description (AtkObject*, const gchar*) Sets the textual description of the accessible object. For example, if the object is a graphical "Close" button, the description might be "Closes the window".
AtkRelation* atk_relation_new (AtkObject**, gint, AtkRelationType) Creates a new relation between the specified key and the specified list of target objects. A relationship normally indicates to the assistive technology that one widget is somehow related to another. For example, that a particular GtkLabel widget is the caption for a GtkTreeView in the same window.
void atk_image_set_description (AtkImage*, const gchar*) Sets the textual description of the accessible image object. For example, if the object is a thumbnail of a virtual desktop in a panel applet, the description might be "Image showing window arrangement on desktop 1".