gMoveOutedCalled = true;
return wr->newReplyMessage(m);
};
+
+ wr->testMethods[std::tuple<std::string, std::string, std::string, MethodType>{"/org/a11y/atspi/accessible", "org.a11y.atspi.Event.Window", "Activate", MethodType::Method}] =
+ [wr](const MessagePtr &m) -> MessagePtr {
+ return wr->newReplyMessage(m);
+ };
+ wr->testMethods[std::tuple<std::string, std::string, std::string, MethodType>{"/org/a11y/atspi/accessible", "org.a11y.atspi.Event.Window", "Deactivate", MethodType::Method}] =
+ [wr](const MessagePtr &m) -> MessagePtr {
+ return wr->newReplyMessage(m);
+ };
}
auto wr = static_cast<TestDBusWrapper*>(DBusWrapper::Installed());
wr->fromTestChangeProperty("/org/a11y/bus", "org.a11y.Status", "ScreenReaderEnabled", b);
return;
}
- auto* accessible = Dali::Accessibility::Accessible::Get(Self());
- if(display)
- {
- Dali::Accessibility::Bridge::GetCurrentBridge()->AddPopup(accessible);
- accessible->EmitStateChanged(Dali::Accessibility::State::SHOWING, 1, 0);
- }
- else
- {
- accessible->EmitStateChanged(Dali::Accessibility::State::SHOWING, 0, 0);
- Dali::Accessibility::Bridge::GetCurrentBridge()->RemovePopup(accessible);
- }
-
// Convert the bool state to the actual display state to use.
- mDisplayState = display ? Toolkit::Popup::SHOWING : Toolkit::Popup::HIDING;
+ mDisplayState = display ? Toolkit::Popup::SHOWING : Toolkit::Popup::HIDING;
+ auto* accessible = Dali::Accessibility::Accessible::Get(Self());
if(display)
{
// Update the state to indicate the current intent.
mDisplayState = Toolkit::Popup::SHOWING;
+ Dali::Accessibility::Bridge::GetCurrentBridge()->RegisterDefaultLabel(accessible);
+ accessible->EmitShowing(true);
// We want the popup to have key input focus when it is displayed
SetKeyInputFocus();
else // Not visible.
{
mDisplayState = Toolkit::Popup::HIDING;
+ Dali::Accessibility::Bridge::GetCurrentBridge()->UnregisterDefaultLabel(accessible);
ClearKeyInputFocus();
-
+ accessible->EmitShowing(false);
// Restore the keyboard focus when popup is hidden.
if(mPreviousFocusedActor && mPreviousFocusedActor.GetProperty<bool>(Actor::Property::KEYBOARD_FOCUSABLE))
{