elc_popup/elc_ctxpopup: Do not prepend "Alert" to popup name 15/279515/8
authorArtur Świgoń <a.swigon@samsung.com>
Wed, 10 Aug 2022 13:25:47 +0000 (15:25 +0200)
committerArtur Świgoń <a.swigon@samsung.com>
Wed, 12 Oct 2022 09:10:28 +0000 (11:10 +0200)
This commit applies the new UX guide.

@tizen_only

Change-Id: Ibc9ad595591bf30521ea20c975ab5e538e1e4b54

src/lib/elementary/elc_popup.c
src/lib/elementary_tizen/elc_ctxpopup.c

index 73e6aaf..a416b8d 100644 (file)
@@ -443,18 +443,10 @@ _mirrored_set(Evas_Object *obj,
 static char *
 _access_info_cb(void *data, Evas_Object *obj EINA_UNUSED)
 {
-   Eina_Strbuf *buf;
+   //TIZEN_ONLY(20220810): Do not prepend "Alert" to popup name
    Elm_Popup_Data *priv = data;
-   char *ret = NULL;
-   if (priv->title_text)
-     {
-        buf = eina_strbuf_new();
-        eina_strbuf_append_printf(buf, "%s, %s, %s", N_("Alert"), priv->title_text, N_("Title"));
-        ret = eina_strbuf_string_steal(buf);
-        eina_strbuf_free(buf);
-        return strdup(ret);
-     }
-   return NULL;
+   return eina_strdup(priv->title_text);
+   //
 }
 //
 
@@ -474,6 +466,9 @@ _atspi_expose_title(Eo *obj, Eina_Bool is_atspi)
              ao = _elm_access_edje_object_part_object_register
                    (sd->main_layout, elm_layout_edje_get(sd->main_layout), ACCESS_TITLE_PART);
              efl_access_object_role_set(ao, EFL_ACCESS_ROLE_HEADING);
+             //TIZEN_ONLY(20220810): Do not prepend "Alert" to popup name
+             efl_access_object_reading_info_type_set(ao, EFL_ACCESS_READING_INFO_TYPE_NAME | EFL_ACCESS_READING_INFO_TYPE_DESCRIPTION);
+             //
              _elm_access_callback_set(_elm_access_info_get(ao),
                                        ELM_ACCESS_INFO, _access_info_cb, sd);
           }
@@ -2683,13 +2678,14 @@ _elm_popup_efl_access_object_i18n_name_get(const Eo *obj, Elm_Popup_Data *sd)
    if (name) return name;
 
    buf = eina_strbuf_new();
-   eina_strbuf_append_printf(buf, "%s", E_("Alert"));
+   //TIZEN_ONLY(20220810): Do not prepend "Alert" to popup name
    if (sd->title_text)
-     eina_strbuf_append_printf(buf, "%s", sd->title_text);
+     eina_strbuf_append_printf(buf, "%s", sd->title_text);
    else if (sd->text_content_obj)
-     eina_strbuf_append_printf(buf, "%s", elm_object_text_get(sd->text_content_obj));
+     eina_strbuf_append_printf(buf, "%s", elm_object_text_get(sd->text_content_obj));
    else if (elm_object_part_text_get(obj, "elm.text"))
-     eina_strbuf_append_printf(buf, ", %s", elm_object_part_text_get(obj, "elm.text"));
+     eina_strbuf_append_printf(buf, "%s", elm_object_part_text_get(obj, "elm.text"));
+   //
 
    name = _elm_widget_accessible_plain_name_get(obj, eina_strbuf_string_get(buf));
    eina_strbuf_free(buf);
index d00e51f..8aa687a 100644 (file)
@@ -2824,8 +2824,6 @@ _elm_ctxpopup_efl_access_object_i18n_name_get(const Eo *obj, Elm_Ctxpopup_Data *
    else if (!strcmp(style, "select_mode"))
      eina_strbuf_append_printf(buf, "%s", E_("WDS_ACCS_TBOPT_SELECT_MODE_POPUP"));
    //
-   else
-     eina_strbuf_append_printf(buf, "%s", E_("Alert"));
 
    eina_stringshare_del(wd->accessible_name);
    wd->accessible_name = eina_stringshare_add(eina_strbuf_string_get(buf));