From dd4db9fa2c5ed33b4f29137a91afbbb894cbb782 Mon Sep 17 00:00:00 2001 From: Evgen Servetnik Date: Tue, 15 Aug 2017 11:16:41 +0300 Subject: TizenRefApp-9117 Implement screen reader for Settings Change-Id: I3420d4479cb6121cd3741ee0e5446c662c16a2b0 Signed-off-by: Evgen Servetnik --- src/Common/View/inc/Atspi.h | 8 ++++++++ src/Common/View/src/ListItem.cpp | 2 ++ src/Conversation/View/src/ConvReplyListItem.cpp | 2 +- src/Settings/View/src/SettingsMenuListItem.cpp | 2 ++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Common/View/inc/Atspi.h b/src/Common/View/inc/Atspi.h index b34f9d5..6858f97 100644 --- a/src/Common/View/inc/Atspi.h +++ b/src/Common/View/inc/Atspi.h @@ -48,6 +48,7 @@ namespace Msg void appendFlowRel(Elm_Interface_Atspi_Accessible *obj); void removeFlowRel(Elm_Interface_Atspi_Accessible *obj); + void appendControlRel(Elm_Interface_Atspi_Accessible *obj); // TODO: impl. other methods if needed private: @@ -136,6 +137,13 @@ namespace Msg elm_atspi_accessible_relationship_append(obj, ELM_ATSPI_RELATION_FLOWS_FROM, m_pEo); } + + inline void Atspi::appendControlRel(Elm_Interface_Atspi_Accessible *obj) + { + elm_atspi_accessible_relationship_append(m_pEo, ELM_ATSPI_RELATION_CONTROLLER_FOR, obj); + elm_atspi_accessible_relationship_append(obj, ELM_ATSPI_RELATION_CONTROLLED_BY, m_pEo); + } + inline void Atspi::removeFlowRel(Elm_Interface_Atspi_Accessible *obj) { elm_atspi_accessible_relationship_remove(m_pEo, ELM_ATSPI_RELATION_FLOWS_TO, obj); diff --git a/src/Common/View/src/ListItem.cpp b/src/Common/View/src/ListItem.cpp index 60c0f14..0fccf51 100644 --- a/src/Common/View/src/ListItem.cpp +++ b/src/Common/View/src/ListItem.cpp @@ -169,6 +169,8 @@ Evas_Object *ListItem::addCheck() evas_object_smart_callback_add(check, "changed", makeCbFirst(&ListItem::onCheckChanged), this); elm_object_focus_allow_set(check, false); evas_object_show(check); + getAtspi().appendControlRel(check); + getAtspi().appendRel(ELM_ATSPI_RELATION_DESCRIBED_BY, check); return check; } diff --git a/src/Conversation/View/src/ConvReplyListItem.cpp b/src/Conversation/View/src/ConvReplyListItem.cpp index b8b04e9..92a2ec2 100644 --- a/src/Conversation/View/src/ConvReplyListItem.cpp +++ b/src/Conversation/View/src/ConvReplyListItem.cpp @@ -68,5 +68,5 @@ Evas_Object *ConvReplyListItem::getReplyButton() void ConvReplyListItem::onAttached(ViewItem &item) { - getAtspi().canHighlight(false); + getAtspi().setRole(ELM_ATSPI_ROLE_REDUNDANT_OBJECT); } diff --git a/src/Settings/View/src/SettingsMenuListItem.cpp b/src/Settings/View/src/SettingsMenuListItem.cpp index cd18e60..2e42d8f 100644 --- a/src/Settings/View/src/SettingsMenuListItem.cpp +++ b/src/Settings/View/src/SettingsMenuListItem.cpp @@ -96,6 +96,8 @@ Evas_Object *SettingsMenuListItem::createCheck() evas_object_propagate_events_set(check, false); evas_object_smart_callback_add(check, "changed", makeCbFirst(&SettingsMenuListItem::onCheckChanged), this); View::processSignal(check); + getAtspi().appendControlRel(check); + getAtspi().appendRel(ELM_ATSPI_RELATION_DESCRIBED_BY, check); return check; } -- cgit v1.2.3