[NUI][AT-SPI] Set focus in OnAccessibilityActivated()
authorArtur Świgoń <a.swigon@samsung.com>
Tue, 11 Jul 2023 13:51:00 +0000 (15:51 +0200)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Wed, 12 Jul 2023 06:00:56 +0000 (15:00 +0900)
commit4d0600a58119142bd65af9c9c544a0caf8e7a326
tree28da3b428c7ddf0596f92929388beee1bea3d817
parent7c0444bcde8006f550566a41f9bd3fd95b2eada9
[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