Fix UX issues 77/180177/1
authorYunjin Lee <yunjin-.lee@samsung.com>
Fri, 25 May 2018 08:30:20 +0000 (17:30 +0900)
committerYunjin Lee <yunjin-.lee@samsung.com>
Fri, 25 May 2018 08:30:20 +0000 (17:30 +0900)
- Fix wearable popup title for screen reader support (read/highlight)
- Give list_effect style to scroller to get scroll end effect

Change-Id: Ia45b1a0c415510f64aaec5480718d57bc0807a3d
Signed-off-by: Yunjin Lee <yunjin-.lee@samsung.com>
src/notification-daemon/ui/PopupCheckWearable.h

index d2f60fb..8538dd5 100644 (file)
@@ -61,6 +61,7 @@ public:
         elm_popup_scrollable_set(m_popup, EINA_FALSE);
 
         m_scroller = elm_scroller_add(m_popup);
+        elm_object_style_set(m_scroller, "list_effect");
         elm_scroller_policy_set(m_scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
         evas_object_size_hint_weight_set(m_scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
         evas_object_size_hint_align_set(m_scroller, EVAS_HINT_FILL, EVAS_HINT_FILL);
@@ -75,6 +76,13 @@ public:
         elm_object_part_text_set(m_layout, "elm.text.title", Po::getPopupTitleMsg().c_str());
         elm_object_content_set(m_scroller, m_layout);
 
+        m_title = (Evas_Object *)edje_object_part_object_get((const Edje_Object *)elm_layout_edje_get(m_layout), "elm.text.title");
+        ao_title_text = elm_access_object_register(m_title, m_layout);
+        elm_atspi_accessible_reading_info_type_set(ao_title_text, ELM_ACCESSIBLE_READING_INFO_TYPE_NAME);
+        elm_atspi_accessible_name_set(ao_title_text, Po::getPopupTitleMsg().c_str());
+        elm_atspi_accessible_can_highlight_set(ao_title_text, EINA_TRUE);
+        elm_atspi_component_highlight_grab(ao_title_text);
+
         m_layoutInner = elm_layout_add(m_layout);
         if (m_layoutInner == nullptr) {
             ALOGE("EFL : Failed to add layout");
@@ -152,6 +160,8 @@ public:
         evas_object_show(m_popup);
     }
 private:
+    Evas_Object *ao_title_text = nullptr;
+    Evas_Object *m_title = nullptr;
     Evas_Object *m_content = nullptr;
     Evas_Object *m_layout = nullptr;
     Evas_Object *m_layoutInner = nullptr;