[AT-SPI] Require ControlAccessible for Control
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / control-impl.cpp
index afb2bf9..1407578 100644 (file)
@@ -167,6 +167,11 @@ void Control::ClearBackground()
   RelayoutRequest();
 }
 
+Toolkit::DevelControl::ControlAccessible* Control::GetAccessibleObject()
+{
+  return mImpl->GetAccessibleObject();
+}
+
 void Control::EnableGestureDetection(GestureType::Value type)
 {
   if((type & GestureType::PINCH) && !mImpl->mPinchGestureDetector)
@@ -484,7 +489,7 @@ void Control::EmitKeyInputFocusSignal(bool focusGained)
 
   if(Accessibility::IsUp())
   {
-    auto self = mImpl->GetAccessibilityObject(Self());
+    auto self = GetAccessibleObject();
     self->EmitFocused(focusGained);
     auto parent = self->GetParent();
     if(parent && !self->GetStates()[Dali::Accessibility::State::MANAGES_DESCENDANTS])
@@ -571,10 +576,7 @@ void Control::OnPropertySet(Property::Index index, const Property::Value& proper
     }
     case Actor::Property::VISIBLE:
     {
-      if(Dali::Accessibility::IsUp() && !Self().GetProperty<bool>(Toolkit::DevelControl::Property::ACCESSIBILITY_HIDDEN))
-      {
-        Dali::Accessibility::Accessible::Get(Self())->EmitVisible(Self().GetProperty(Actor::Property::VISIBLE).Get<bool>());
-      }
+      GetAccessibleObject()->EmitVisible(Self().GetProperty<bool>(Actor::Property::VISIBLE));
       break;
     }
   }