atspi: use entry text and parent accessible name 84/147784/2
authorShinwoo Kim <cinoo.kim@samsung.com>
Tue, 5 Sep 2017 13:42:50 +0000 (22:42 +0900)
committerShinwoo Kim <cinoo.kim@samsung.com>
Thu, 7 Sep 2017 03:43:22 +0000 (12:43 +0900)
(1) The entry is using entry text for its accessible name.
(2) It is possible to overwrite default accessible name of entry by using
parent accessible name.

Change-Id: I29cdfe0fd6c517d9611ad46996eebe40c7be27e9

src/lib/elm_entry.c

index de1bc2e09e4f878c4afce07c6a8994099038ae03..97aadcd59aa9109d411117bd2c6dda205096bb62 100644 (file)
@@ -7803,8 +7803,17 @@ _elm_entry_elm_interface_atspi_accessible_state_set_get(Eo *obj, Elm_Entry_Data
 }
 
 EOLIAN static const char*
-_elm_entry_elm_interface_atspi_accessible_name_get(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd)
+_elm_entry_elm_interface_atspi_accessible_name_get(Eo *obj, Elm_Entry_Data *sd)
 {
+   char *name = NULL;
+   eo_do_super(obj, ELM_ENTRY_CLASS, name = (char *)elm_interface_atspi_accessible_name_get());
+   if (name && strncmp("", name, 1)) return name;
+
+   if (sd->password) return NULL;
+
+   name = _elm_util_mkup_to_text(elm_entry_entry_get(obj));
+   if (name && strncmp("", name, 1)) return name;
+
    const char *ret = edje_object_part_text_get(sd->entry_edje, "elm.guide");
    return _elm_util_mkup_to_text(ret);
 }