[BUG] Touchbehavior Keyboard Access Click not working on Android #2443
Labels
area/behaviors
Issue/Discussion/PR that has to do with Behaviors
bug
Something isn't working
unverified
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
When you use an App on Android via Keyboard access/navigation and you try to hit a button via space bar for example, the animation is executed, but the click event is not raised or executed
Expected Behavior
You would expect the Click to be executed normally, like it does on iOS
Steps To Reproduce
In the Example App:
Link to public reproduction project repository
https://github.com/plewm/TouchbehaviorExample
Environment
Anything else?
From my debugging I found the issue to be the accessibilityManager and bool IsAccessibilityMode. it seems the accessibilityManager is null and accessibility mode is just false if the App is only used with keyboard. It will only be set if TalkBack is activated on the device. The Keyboard actions than also work, when TalkBack is activated as well. But the App should be usable with only keyboard without TalkBack as well. The Problem is, that the bool IsAccessibilityMode is checked in the OnClick method and is not reaching the HandleTouchEnded if AccessibilityMode is false.:
`void UpdateClickHandler()
{
if (view is null || !view.IsAlive())
{
return;
}
void OnClick(object? sender, EventArgs args)
{
if (!IsEnabled)
{
return;
}
Furthermore that implementation feels not as Android intended cause the documentation on Android side says not to do different stuff based on the AccessibilityManger because it results in inconsistent behavior.
https://developer.android.com/reference/android/view/accessibility/AccessibilityManager
The text was updated successfully, but these errors were encountered: