summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShilpa Singh <shilpa.singh@samsung.com>2017-11-14 09:52:46 +0900
committerShinwoo Kim <cinoo.kim@samsung.com>2017-11-14 15:22:36 +0900
commit7e83545ab331e993b8f73c287a3a39f57dd1fe59 (patch)
treef524c9142dc2891d4964c917a317adbb0cee0769
parent8f2e4915732553b2678c1813f45dad0cd55ba41e (diff)
downloadefl-7e83545ab331e993b8f73c287a3a39f57dd1fe59.tar.gz
elc_popup.c: accessible name_get interface added
Summary: accessible name_get interface added, popup does not have default text. What should be read for the name information should be define by popup. Test Plan: In atspi mode, when an AT-client such as screen-reader queries, it should return as "Alert title(if present)/text(if present)" Reviewers: kimcinoo Subscribers: cedric, jpeg, govi, rajeshps Differential Revision: https://phab.enlightenment.org/D5466
-rw-r--r--src/lib/elementary/elc_popup.c24
-rw-r--r--src/lib/elementary/elm_popup.eo1
2 files changed, 25 insertions, 0 deletions
diff --git a/src/lib/elementary/elc_popup.c b/src/lib/elementary/elc_popup.c
index e21c6311bc..0962d6dc41 100644
--- a/src/lib/elementary/elc_popup.c
+++ b/src/lib/elementary/elc_popup.c
@@ -1808,6 +1808,30 @@ _elm_popup_efl_access_state_set_get(Eo *obj, Elm_Popup_Data *sd EINA_UNUSED)
return ret;
}
+EOLIAN static const char*
+_elm_popup_efl_access_name_get(Eo *obj, Elm_Popup_Data *sd)
+{
+ const char *name = NULL;
+ Eina_Strbuf *buf;
+
+ name = efl_access_name_get(efl_super(obj, ELM_POPUP_CLASS));
+ if (name) return name;
+
+ buf = eina_strbuf_new();
+ eina_strbuf_append_printf(buf, "%s", E_("Alert"));
+ if (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));
+ else if (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);
+
+ return name;
+}
+
/* Standard widget overrides */
ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(elm_popup, Elm_Popup_Data)
diff --git a/src/lib/elementary/elm_popup.eo b/src/lib/elementary/elm_popup.eo
index 00a56c14c9..cc7c0e81a0 100644
--- a/src/lib/elementary/elm_popup.eo
+++ b/src/lib/elementary/elm_popup.eo
@@ -177,6 +177,7 @@ class Elm.Popup (Efl.Ui.Layout, Efl.Ui.Focus.Layer, Elm.Interface.Atspi_Widget_A
Efl.Canvas.Layout_Signal.signal_emit;
Elm.Interface.Atspi_Widget_Action.elm_actions { get; }
Efl.Access.state_set { get; }
+ Efl.Access.name { get; }
Efl.Part.part;
}
events {