Small GNOME foot in banner [Making Applications Accessible]
back next

Properties of the Base AtkObject

  • Name
    • should be as specific as possible and should differentiate this object from others within the same context
    • If logic is required to retrieve the accessible name, or the name is dynamic, you must provide an AtkObject implementation which overrides the get_name class method:
    • 
      static gchar *
      gail_label_get_name (AtkObject *accessible)
      {
      ...
        if (accessible->name != NULL)
          return accessible->name;
        else
          {
            /* Get the text on the label */
            GtkWidget *widget;
      
            widget = GTK_ACCESSIBLE (accessible)->widget;
            if (widget == NULL) /* defunct! */
              return NULL;
      ...
            return gtk_label_get_text (GTK_LABEL (widget));
          }
      }
      
st