Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NUI][API10][AT-SPI] Set focus in OnAccessibilityActivated() #5387

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

aswigon
Copy link
Contributor

@aswigon aswigon commented Jul 11, 2023

Description of Change

Note: This is an API10 port of #5386.

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) 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.

API Changes

  • ACR: None

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.
@github-actions github-actions bot added the API10 Platform : Tizen 7.0 / TFM: tizen10.0 label Jul 11, 2023
@aswigon aswigon changed the title [API10][NUI][AT-SPI] Set focus in OnAccessibilityActivated() [NUI][API10][AT-SPI] Set focus in OnAccessibilityActivated() Jul 11, 2023
@aswigon aswigon marked this pull request as ready for review July 11, 2023 14:22
Copy link
Contributor

@loleksak loleksak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, now its consistent with other toolkits

Copy link
Contributor

@dongsug-song dongsug-song left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very good for detail description!
approved

@dongsug-song dongsug-song merged commit 4d0600a into Samsung:API10 Jul 12, 2023
3 checks passed
@aswigon aswigon deleted the aswigon-a11y-focus-api10 branch July 12, 2023 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API10 Platform : Tizen 7.0 / TFM: tizen10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants