mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix announcement issue with Switch (#39298)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39298 Previously, switches were being announced using Talkback in this order: [state][role][label] but they should be announced as [state][label][role]. Reviewed By: NickGerleman Differential Revision: D48807314 fbshipit-source-id: e827b9ca6d3b61b5bd2884f0f0ce6ddae00bb7df
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a13d463a59
commit
79b293ea33
+1
-1
@@ -630,7 +630,7 @@ public class ReactAccessibilityDelegate extends ExploreByTouchHelper {
|
||||
info.setCheckable(true);
|
||||
info.setChecked(boolValue);
|
||||
if (info.getClassName().equals(AccessibilityRole.getValue(AccessibilityRole.SWITCH))) {
|
||||
info.setText(
|
||||
info.setStateDescription(
|
||||
context.getString(
|
||||
boolValue ? R.string.state_on_description : R.string.state_off_description));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user