Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit a4557b7

Browse files
rachelkangTheCodeTravelerjsuarezruizjfversluis
authored
[Android] Fix a11y set semantic focus (#1782)
* Add SemanticExtensions SetFocus and Announce * Add Windows Announce implementation * Update based on feedback * Fix SetSemanticFocus for Android * Revert order of usings to clean up diff Co-authored-by: Brandon Minnick <[email protected]> Co-authored-by: Javier Suárez <[email protected]> Co-authored-by: Gerald Versluis <[email protected]>
1 parent 4b28658 commit a4557b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/CommunityToolkit/Xamarin.CommunityToolkit/Extensions/Semantic/SemanticExtensions.android.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ static void PlatformSetSemanticFocus(this VisualElement element)
1717
if (androidView is not AView view)
1818
throw new NullReferenceException("Can't access view");
1919

20-
view.SendAccessibilityEvent(EventTypes.ViewFocused);
20+
view.SendAccessibilityEvent((EventTypes)(int)WindowsChange.AccessibilityFocused);
2121
}
2222

2323
static void PlatformAnnounce(string text)
@@ -36,4 +36,4 @@ static void PlatformAnnounce(string text)
3636
manager.SendAccessibilityEvent(announcement);
3737
}
3838
}
39-
}
39+
}

0 commit comments

Comments
 (0)