kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=7e83545ab331e993b8f73c287a3a39f57dd1fe59
commit 7e83545ab331e993b8f73c287a3a39f57dd1fe59 Author: Shilpa Singh <[email protected]> Date: Tue Nov 14 09:52:46 2017 +0900 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 --- src/lib/elementary/elc_popup.c | 24 ++++++++++++++++++++++++ src/lib/elementary/elm_popup.eo | 1 + 2 files changed, 25 insertions(+) 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 { --
