Fix screen reader gestures for Snooze and Dismiss button in Alert. 72/172872/1
authorEugene Kurzberg <i.kurtsberg@samsung.com>
Fri, 27 Oct 2017 13:59:45 +0000 (16:59 +0300)
committerNilesh Trimbake <t.shripati@samsung.com>
Fri, 16 Mar 2018 10:04:33 +0000 (15:34 +0530)
Change-Id: Ic85c8401b09dfe742a7f9ca6f22bb20ba354d92a
Signed-off-by: Eugene Kurzberg <i.kurtsberg@samsung.com>
alarm-app/inc/Alert/AlertView.h
alarm-app/src/Alert/AlertView.cpp

index b077020dc6be8cc8824a36ff9e85cf5be77aa5ff..5b13d8b6058c09cee6654dc3ad678d9f834e6c9b 100644 (file)
@@ -59,8 +59,6 @@ namespace Alert
                void onSnoozeClicked(Evas_Object *button, void *eventInfo);
                void onFocusChanged(sound_stream_focus_state_e state);
                static void onButtonPressed(const char *signal, Evas_Object *button, void *eventInfo);
-               static Eina_Bool onButtonActivated(Evas_Object *button, Evas_Object *obj,
-                               Elm_Access_Action_Info *accessInfo);
                static Eina_Bool onFeedbackTimer(void *data);
 
                Evas_Object *m_DismissButton;
index b418014a217809be28eb90e7c7584aff01ceadae..99ab792584c67a7ff05e4bfd688cec326336db7d 100644 (file)
@@ -165,7 +165,7 @@ Evas_Object *AlertView::createButton(Evas_Object *parent, const char *iconPath,
 Evas_Object *AlertView::createButtonAccessObject(Evas_Object *button,
                const char *name, const char *description)
 {
-       Evas_Object *obj = Ui::createPartAccessObject(button,  "elm.swallow.content");
+       Evas_Object *obj = Ui::createPartAccessObject(button, "elm.swallow.content");
        elm_atspi_accessible_translation_domain_set(obj, TEXT_DOMAIN);
        elm_atspi_accessible_name_set(obj, name);
        elm_atspi_accessible_description_set(obj, description);
@@ -173,8 +173,7 @@ Evas_Object *AlertView::createButtonAccessObject(Evas_Object *button,
                        ELM_ACCESSIBLE_READING_INFO_TYPE_NAME |
                        ELM_ACCESSIBLE_READING_INFO_TYPE_DESCRIPTION));
        elm_atspi_accessible_role_set(button, ELM_ATSPI_ROLE_REDUNDANT_OBJECT);
-       elm_access_action_cb_set(obj, ELM_ACCESS_ACTION_SCROLL,
-                       (Elm_Access_Action_Cb) &AlertView::onButtonActivated, button);
+       elm_atspi_accessible_attribute_append(obj, "gesture_required", "scroll");
 
        return obj;
 }
@@ -256,16 +255,6 @@ void AlertView::onButtonPressed(const char *signal, Evas_Object *button, void *e
        elm_layout_signal_emit(elm_object_parent_widget_get(button), signal, "");
 }
 
-Eina_Bool AlertView::onButtonActivated(Evas_Object *button, Evas_Object *obj,
-               Elm_Access_Action_Info *accessInfo)
-{
-       /* Activate and expand the button by sending two "press" signals
-          as if the bezel was rotated twice. */
-       elm_layout_signal_emit(button, SIGNAL_BUTTON_PRESS, "");
-       elm_layout_signal_emit(button, SIGNAL_BUTTON_PRESS, "");
-       return EINA_TRUE;
-}
-
 Eina_Bool AlertView::onFeedbackTimer(void *data)
 {
        feedback_play(FEEDBACK_PATTERN_WAKEUP);