-
Notifications
You must be signed in to change notification settings - Fork 525
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
[Bug] Change Accessibility focus in Android #4322
Comments
Seems to be an issue related with Xamarin.Android. @samhouts can we move this issue to https://github.com/xamarin/xamarin-android/issues? |
If you want to do an equivalent of myview.SendAccessibilityEvent((EventTypes) (int) WindowsChange.AccessibilityFocused); The perils of enumification... |
Damn, I feel so stupid for haven't seen that. Thanks a lot! |
I believe you could do this: myview.SendAccessibilityEvent(EventTypes.ViewHoverEnter) |
Oh, yes, that worked too. Thanks! |
In case it's helpful additional info, I believe the So I think it would be recommended to use one of the In this case, if you've previously found that (Note also that |
Oh I see. Perfect, very clear and exahustive, really appreciate that thanks. |
Description
Not able to change the accessibility focus on a certain element after a certain event (like a button press).
Asked also on Community
Steps to Reproduce
Expected Behavior
When you tap a certain button the screen reader should change the focus to the wanted button
Actual Behavior
Using the expected command,
myview.SendAccessibilityEvent(EventTypes.ViewAccessibilityFocused)
the screen reader only read the accessibility name ofmyview
without actually setting the focus on it, that remain on the pressed button.Using some other commands, like
myview.SendAccessibilityEvent(EventTypes.ViewFocused)
orb3.SendAccessibilityEvent(EventTypes.WindowsChanged)
nothing happen.Using some other command like
myview.SendAccessibilityEventUnchecked(AccessibilityEvent.WindowsChangeAccessibilityFocused)
(that should actually be the right one that work in Android Studio), it give the errorArgument 1: cannot convert from 'Android.Views.Accessibility.WindowsChange' to 'Android.Views.Accessibility.AccessibilityEvent
Other information
In Android Studio, using Java, to set the accessibility focus on a certain
myview
you have to domyview.sendAccessibilityEvent(AccessibilityEvent.WINDOWS_CHANGE_ACCESSIBILITY_FOCUSED)
and it works fine. In Xamarin, using C#, everything that I tried doesn't work properly.Reproduction Link
Git repository example
The text was updated successfully, but these errors were encountered: