[NUI][AT-SPI] Set focus in OnAccessibilityActivated()
authorArtur Świgoń <a.swigon@samsung.com>
Tue, 11 Jul 2023 13:51:00 +0000 (15:51 +0200)
committerbshsqa <32317749+bshsqa@users.noreply.github.com>
Tue, 18 Jul 2023 09:41:32 +0000 (18:41 +0900)
commit360f543effa9420402a0c908ca0611d56a23433b
tree972322bede77f50ee04bc2ed6dc8f23cfa24ac2e
parent8daef53db6c7f89634638b9ee689f3da75a088fc
[NUI][AT-SPI] Set focus in OnAccessibilityActivated()

This aligns the behaviour of Components (derived from CustomView), and other controls, with that
of BaseComponents (and other controls with ViewAccessibilityMode.Default, backed by the C++
accessibility implementation), which set the keyboard focus on activation. Please note that in the
latter case, the implementation of View.OnAccessibilityActivated is unused, and the unrelated method
(albeit bearing the same name) Toolkit::Control::OnAccessibilityActivated is called:

bool Control::OnAccessibilityActivated()
{
  if(Toolkit::KeyboardFocusManager::Get().SetCurrentFocusActor(Self()))
  {
    return OnKeyboardEnter();
  }
  return false;
}

So, in other words, this patch makes C# controls behave in a similar manner, i.e. set the keyboard
focus on accessibility activation.
src/Tizen.NUI/src/public/BaseComponents/CustomView.cs
src/Tizen.NUI/src/public/BaseComponents/ViewAccessibility.cs