diff options
author | Igor Olshevskyi <i.olshevskyi@samsung.com> | 2017-10-30 09:23:03 +0200 |
---|---|---|
committer | Igor Olshevskyi <i.olshevskyi@samsung.com> | 2017-10-31 10:21:32 +0200 |
commit | 7142649b8263614f99f1e8c8706714e8dd7b7711 (patch) | |
tree | b269a01cebd41c8fd2e3f9733f7c14613b810400 | |
parent | 6ac5f4d0dbd1bab1ff2997a9052915a29ace5692 (diff) | |
download | call-ui-7142649b8263614f99f1e8c8706714e8dd7b7711.tar.gz call-ui-7142649b8263614f99f1e8c8706714e8dd7b7711.tar.bz2 call-ui-7142649b8263614f99f1e8c8706714e8dd7b7711.zip |
TizenRefApp-9739 [Call UI] Fix issue with two fingers swipe on Accept/Reject call during Screen Reader
Change-Id: Idf5452d6fdf1095a62103f5b5477d36a857bd180
-rw-r--r-- | call-ui/view/AcceptRejectWidget.cpp | 7 | ||||
-rw-r--r-- | ucl/include/ucl/gui/Atspi.h | 12 | ||||
-rw-r--r-- | ucl/include/ucl/gui/Atspi.hpp | 12 |
3 files changed, 31 insertions, 0 deletions
diff --git a/call-ui/view/AcceptRejectWidget.cpp b/call-ui/view/AcceptRejectWidget.cpp index 9b1e93a..19be23c 100644 --- a/call-ui/view/AcceptRejectWidget.cpp +++ b/call-ui/view/AcceptRejectWidget.cpp @@ -57,6 +57,9 @@ namespace callui { namespace { namespace impl { constexpr LayoutTheme LAYOUT_IMG_REJECT {"layout", "callui_image", "reject"}; + const std::string ATSPI_ATTRIBUTE_KEY = "gesture_required"; + const std::string ATSPI_ATTRIBUTE_VALUE = "scroll"; + constexpr auto BC_ITEM_COUNT = 4; constexpr auto BC_ANIMATE_COUNT_MAX = 3; @@ -1521,6 +1524,8 @@ namespace callui { acceptAtspi.setName(AO_STR_ACCEPT_CALL); acceptAtspi.setDescription( AO_STR_SWIPE_RIGHT_WITH_TWO_FINGERS_TO_ACCEPT); + acceptAtspi.addAttribute(impl::ATSPI_ATTRIBUTE_KEY, + impl::ATSPI_ATTRIBUTE_VALUE); m_rejAo = utils::createAccessObject(parent, *m_rejEventLy); if (!m_rejAo) { @@ -1533,6 +1538,8 @@ namespace callui { rejectAtspi.setName(AO_STR_REJECT_CALL); rejectAtspi.setDescription( AO_STR_SWIPE_LEFT_WITH_TWO_FINGERS_TO_REJECT); + rejectAtspi.addAttribute(impl::ATSPI_ATTRIBUTE_KEY, + impl::ATSPI_ATTRIBUTE_VALUE); return RES_OK; } diff --git a/ucl/include/ucl/gui/Atspi.h b/ucl/include/ucl/gui/Atspi.h index 4194ddc..adea58d 100644 --- a/ucl/include/ucl/gui/Atspi.h +++ b/ucl/include/ucl/gui/Atspi.h @@ -173,6 +173,18 @@ namespace ucl { */ void clearRelationships(); + /** + * @brief Adds key-value pair identifying widget extra attribute + * @param[in] key The string key to give extra information + * @param[in] value The string value to give extra information + */ + void addAttribute(const std::string &key, const std::string &value); + + /** + * @brief Removes all attributes in accessible object + */ + void clearAttributes(); + /** * @brief Registers gesture event handler * @param[in] handler Handler of the event diff --git a/ucl/include/ucl/gui/Atspi.hpp b/ucl/include/ucl/gui/Atspi.hpp index e1c53f6..9a6d732 100644 --- a/ucl/include/ucl/gui/Atspi.hpp +++ b/ucl/include/ucl/gui/Atspi.hpp @@ -147,6 +147,18 @@ namespace ucl { elm_atspi_accessible_relationships_clear(getAo()); } + inline void Atspi::addAttribute(const std::string &key, + const std::string &value) + { + elm_atspi_accessible_attribute_append(getAo(), + key.c_str(), value.c_str()); + } + + inline void Atspi::clearAttributes() + { + elm_atspi_accessible_attributes_clear(getAo()); + } + inline void Atspi::addGestureHandler(AtspiGestureHandler handler) { if (handler) { |