extension of Glade DTD to support accessibility



Hi folks:

For awhile now one of the ideas in the background of Gnome accessibility 
has been how Glade can help us enhance accessibility for applications.  
Now that we have defined a set of accessibility interfaces and 
properties, it seems appropriate to consider how to support those 
properties in Glade/libglade.

As has been pointed out before, in many cases applications may need to 
provide accessibility hints in addition to or instead of those provided 
"automatically" by the ATK implementation for stock GTK widgets.  For 
example, an unlabelled button may wish to set an accessibility "name" 
without actually containing a label:

  AtkObject atkObject = gtk_widget_get_accessible (aButton);

  atk_object_set_name (atkObject, "Quit");

I believe that a libglade application can do this by querying libglade 
for a pointer to the appropriate widget, via the widget's unique 
identifier.  However it would be nicer if some ATK properties (at least) 
were settable via attributes in the Glade XML.

This presumably suggests three steps:

extension of Glade's XML DTD to include these (optional) attributes;
extension of libglade to parse these attributes and call the appropriate 
atk methods (as above);
(eventually) extension of Glade to expose these attributes when a 
developer is setting widget properties in the Glade UI builder.

I believe that the ATK attributes of most interest are those ordinarily 
set by the following ATK methods:

atk_image_set_image_description (AtkImage *image, gchar *desc);
atk_object_set_name (AtkObject *accessible, gchar * name);
atk_object_set_description (AtkObject *accessible, gchar *desc);
atk_object_set_parent (AtkObject *accessible, AtkObject *parent);
atk_object_set_role (AtkObject *accessible, AtkRole role);
 (ROLES are readily specified via a string)
atk_table_set_caption  (AtkTable *table, gchar *caption);
atk_table_set_column_description (AtkTable *table, gchar *desc);
atk_table_set_row_description  (AtkTable *table, gchar *desc);

also (very important!) need to have multiple attributes of type 
"atk_relation" settable on a widget.  The atk_relation consists of a 
relation type flag (such as LABEL_FOR) and a reference to some other 
widget (implementable using an "id" attribute if glade XML supports such 
attributes on the XML elements). AtkObject's set_parent method likewise 
takes a reference to an "AtkObject" object.  The other methods are 
readily implemented using character strings as attribute values.

Comments, suggestions (and volunteers :-) welcome...

-Bill

------
Bill Haneman x19279
Gnome Accessibility / Batik SVG Toolkit
Sun Microsystems Ireland 





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]