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
This commit is contained in:
Shilpa Singh 2017-11-14 09:52:46 +09:00 committed by Shinwoo Kim
parent 8f2e491573
commit 7e83545ab3
2 changed files with 25 additions and 0 deletions

View File

@ -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)

View File

@ -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 {