Guías de programación para soporte de accesibilidad
Here are some things you can do in your code to make your program work as well as possible with assistive technologies. (You can find a list of things to consider when designing your GUI in the User Interface Guidelines for Supporting Accessibility section later in this document):
-
Para los componentes que no muestren una cadena corta (tales como un botón gráfico), especifique un nombre para ellos con atk_object_set_name(). Puede querer hacerlo para botones con imagen exclusivamente, paneles que proporcionen agrupaciones lógicas, áreas de texto y demás.
-
Si no puede proporcionar una sugerencia para un componente, use atk_object_set_description() en su lugar para proporcionar una descripción que las tecnologías de asistencia puedan proporcionar al usuario. Por ejemplo, para proporcionar una descripción accesible para un botón Cerrar.
Ejemplo 1-1 Proporcionar una descripción accesible para un GtkButton{ AtkObject *obj; obj = gtk_widget_get_accessible(button); atk_object_set_description(obj,_("Cierra la ventana")); }
-
Use atk_image_set_description() para proporcionar una descripción de texto para todas las imágenes e iconos de su programa.
-
Si varios componentes forman un grupo lógico, intente ponerlos en un contenedor.
-
Whenever you have a label that describes another component, use atk_relation_set_add_relation() so that assistive technologies can find the component with which the label is associated. (If you associate the label with the component using gtk_label_set_mnemonic_widget(), the ATK_RELATION_LABEL_FOR relation is generated automatically, so the following code would not be necessary):
Ejemplo 1-2 Relacionar un GtkLabel con un GtkWidget{ GtkWidget *widget; GtkLabel *label; AtkObject *atk_widget, *atk_label; AtkRelationSet *relation_set; AtkRelation *relation; AtkObject *targets[1]; atk_widget = gtk_widget_get_accessible(widget); atk_label = gtk_widget_get_accessible (GTK_WIDGET(label)); relation_set = atk_object_ref_relation_set (atk_label); targets[0] = atk_widget; relation = atk_relation_new(targets,1, ATK_RELATION_LABEL_FOR); atk_relation_set_add(relation_set,relation); g_object_unref(G_OBJECT(relation)); }
-
If you create a custom widget, make sure it supports accessibility. Custom components that are descendants of other GTK widgets should override inherited accessibility information as necessary. For more information, see Making Custom Components Accessible.
-
No rompa lo que consigue gratis. Si su IGU tiene un contenedor inaccesible, cualquier componente dentro de ese contenedor puede resultar inaccesible.