elm_entry: fix for anchor navigation and activation 77/287377/1
authorMaria Bialota <m.bialota@samsung.com>
Tue, 24 Jan 2023 16:26:32 +0000 (17:26 +0100)
committerArtur Świgoń <a.swigon@samsung.com>
Fri, 27 Jan 2023 10:05:47 +0000 (11:05 +0100)
Change-Id: I8e495fa156b6d79617b054fac9963abbf4d8de13

src/lib/elementary/elm_entry.c

index f8004f5..22fcb73 100644 (file)
@@ -8227,8 +8227,10 @@ _anchor_rect_activated_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_
    ei.name = evas_object_data_get(obj, "anchor_name");
    ei.x = ei.y = ei.w = ei.h = 0;
 
+   //TIZEN_ONLY(20230124): fix for anchor navigation and activation
    if (!sd->disabled)
-     evas_object_smart_callback_call(obj, SIG_ANCHOR_CLICKED, &ei);
+     evas_object_smart_callback_call(entry, SIG_ANCHOR_CLICKED, &ei);
+   //
 }
 
 static void
@@ -8287,19 +8289,9 @@ _atspi_expose_anchors(Eo *obj, Eina_Bool is_screen_reader)
                        Evas_Object *rect = NULL;
                        Evas_Object *ao = NULL;
                        char *text;
-                       //TIZEN_ONLY(20191216): link not read, so adding link to entry
-                       Eina_Strbuf *buf = NULL;
-                       buf = eina_strbuf_new();
-                       //
                        evas_textblock_cursor_at_format_set(end, node);
                        text = evas_textblock_cursor_range_text_get(
                           start, end, EVAS_TEXTBLOCK_TEXT_PLAIN);
-                       //TIZEN_ONLY(20191216): link not read, so adding link to entry
-                       eina_strbuf_append_printf(buf, "%s, %s", text, E_("WDS_ACCS_TBOPT_LINK"));
-                       if (text) free(text);
-                       text = eina_strbuf_string_steal(buf);
-                       eina_strbuf_free(buf);
-                       //
                        range = evas_textblock_cursor_range_geometry_get(start, end);
                        EINA_LIST_FOREACH_SAFE(range, ll, ll_next, r)
                          {
@@ -8320,12 +8312,9 @@ _atspi_expose_anchors(Eo *obj, Eina_Bool is_screen_reader)
 
                                  ao = elm_access_object_register(rect, obj);
                                  efl_access_object_i18n_name_set(ao, text);
-                                 //TIZEN_ONLY(20191216): Update Reading as per UX 2019 guideline
-                                 efl_access_object_reading_info_type_set(ao,
-                                         EFL_ACCESS_READING_INFO_TYPE_NAME |
-                                         EFL_ACCESS_READING_INFO_TYPE_DESCRIPTION);
+                                 //TIZEN_ONLY(20230124): fix for anchor navigation and activation
                                  elm_atspi_accessible_name_set(ao, text);
-                                 elm_atspi_accessible_description_set(ao, E_("WDS_ACCS_TBBODY_DOUBLE_TAP_TO_ACTIVATE"));
+                                 efl_access_object_role_set(ao, EFL_ACCESS_ROLE_LINK);
                                  //
                                  evas_object_smart_callback_add(ao, "atspi,highlighted",
                                             _anchor_rect_highlighted_cb, (void *)index);
@@ -8385,10 +8374,10 @@ _elm_entry_efl_access_object_access_children_get(const Eo *obj EINA_UNUSED, Elm_
      {
         EINA_LIST_FOREACH(sd->anchor_atspi_rects, l, rect)
           {
-            //TIZEN_ONLY(20181024): Fix parent-children incosistencies in atspi tree
-             if (efl_isa(rect, EFL_ACCESS_OBJECT_MIXIN))
+            //TIZEN_ONLY(20230124): fix for anchor navigation and activation
+             Eo *rect_eo = elm_access_object_get(rect);
+             if(rect_eo)
                {
-                  Eo *rect_eo = elm_access_object_get(rect);
                   ret = eina_list_append(ret, rect_eo);
                   efl_access_object_access_parent_set(rect_eo, (Eo *)obj);
                }