summaryrefslogtreecommitdiff
path: root/src
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 /src
parent8f2e4915732553b2678c1813f45dad0cd55ba41e (diff)
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
Diffstat (limited to 'src')
-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)
1808 return ret; 1808 return ret;
1809} 1809}
1810 1810
1811EOLIAN static const char*
1812_elm_popup_efl_access_name_get(Eo *obj, Elm_Popup_Data *sd)
1813{
1814 const char *name = NULL;
1815 Eina_Strbuf *buf;
1816
1817 name = efl_access_name_get(efl_super(obj, ELM_POPUP_CLASS));
1818 if (name) return name;
1819
1820 buf = eina_strbuf_new();
1821 eina_strbuf_append_printf(buf, "%s", E_("Alert"));
1822 if (sd->title_text)
1823 eina_strbuf_append_printf(buf, ", %s", sd->title_text);
1824 else if (sd->text_content_obj)
1825 eina_strbuf_append_printf(buf, ", %s", elm_object_text_get(sd->text_content_obj));
1826 else if (elm_object_part_text_get(obj, "elm.text"))
1827 eina_strbuf_append_printf(buf, ", %s", elm_object_part_text_get(obj, "elm.text"));
1828
1829 name = _elm_widget_accessible_plain_name_get(obj, eina_strbuf_string_get(buf));
1830 eina_strbuf_free(buf);
1831
1832 return name;
1833}
1834
1811/* Standard widget overrides */ 1835/* Standard widget overrides */
1812 1836
1813ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(elm_popup, Elm_Popup_Data) 1837ELM_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
177 Efl.Canvas.Layout_Signal.signal_emit; 177 Efl.Canvas.Layout_Signal.signal_emit;
178 Elm.Interface.Atspi_Widget_Action.elm_actions { get; } 178 Elm.Interface.Atspi_Widget_Action.elm_actions { get; }
179 Efl.Access.state_set { get; } 179 Efl.Access.state_set { get; }
180 Efl.Access.name { get; }
180 Efl.Part.part; 181 Efl.Part.part;
181 } 182 }
182 events { 183 events {