diff --git a/lib/ui/window.dart b/lib/ui/window.dart index 2572d2da12a84..dfad860b365bd 100644 --- a/lib/ui/window.dart +++ b/lib/ui/window.dart @@ -1213,7 +1213,6 @@ class AccessibilityFeatures { static const int _kDisableAnimationsIndex = 1 << 2; static const int _kBoldTextIndex = 1 << 3; static const int _kReduceMotionIndex = 1 << 4; - static const int _kOnOffSwitchLabelsIndex = 1 << 5; // A bitfield which represents each enabled feature. final int _index; @@ -1241,11 +1240,6 @@ class AccessibilityFeatures { /// Only supported on iOS. bool get reduceMotion => _kReduceMotionIndex & _index != 0; - /// The platform is requesting that on/off labels be added to switches. - /// - /// Only supported on iOS. - bool get onOffSwitchLabels => _kOnOffSwitchLabelsIndex & _index != 0; - @override String toString() { final List features = []; @@ -1259,8 +1253,6 @@ class AccessibilityFeatures { features.add('boldText'); if (reduceMotion) features.add('reduceMotion'); - if (onOffSwitchLabels) - features.add('onOffSwitchLabels'); return 'AccessibilityFeatures$features'; } diff --git a/lib/ui/window/window.h b/lib/ui/window/window.h index 86547ec0cd00f..bddcb70f3150f 100644 --- a/lib/ui/window/window.h +++ b/lib/ui/window/window.h @@ -44,7 +44,6 @@ enum class AccessibilityFeatureFlag : int32_t { kDisableAnimations = 1 << 2, kBoldText = 1 << 3, kReduceMotion = 1 << 4, - kOnOffSwitchLabels = 1 << 5, }; class WindowClient { diff --git a/lib/web_ui/lib/src/ui/window.dart b/lib/web_ui/lib/src/ui/window.dart index 4cee1c2aaada4..d81159b37e950 100644 --- a/lib/web_ui/lib/src/ui/window.dart +++ b/lib/web_ui/lib/src/ui/window.dart @@ -995,7 +995,6 @@ class AccessibilityFeatures { static const int _kDisableAnimationsIndex = 1 << 2; static const int _kBoldTextIndex = 1 << 3; static const int _kReduceMotionIndex = 1 << 4; - static const int _kOnOffSwitchLabelsIndex = 1 << 5; // A bitfield which represents each enabled feature. final int _index; @@ -1023,11 +1022,6 @@ class AccessibilityFeatures { /// Only supported on iOS. bool get reduceMotion => _kReduceMotionIndex & _index != 0; - /// The platform is requesting that on/off labels be added to switches. - /// - /// Only supported on iOS. - bool get onOffSwitchLabels => _kOnOffSwitchLabelsIndex & _index != 0; - @override String toString() { final List features = []; @@ -1046,9 +1040,6 @@ class AccessibilityFeatures { if (reduceMotion) { features.add('reduceMotion'); } - if (onOffSwitchLabels) { - features.add('onOffSwitchLabels'); - } return 'AccessibilityFeatures$features'; } diff --git a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm index 20f560631f1c8..1e082ec4ebd97 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm @@ -238,13 +238,6 @@ - (void)setupNotificationCenterObservers { selector:@selector(onUserSettingsChanged:) name:UIContentSizeCategoryDidChangeNotification object:nil]; - - if (@available(iOS 13, *)) { - [center addObserver:self - selector:@selector(onAccessibilityStatusChanged:) - name:UIAccessibilityOnOffSwitchLabelsDidChangeNotification - object:nil]; - } } - (void)setInitialRoute:(NSString*)route { @@ -896,10 +889,6 @@ - (void)onAccessibilityStatusChanged:(NSNotification*)notification { flags |= static_cast(flutter::AccessibilityFeatureFlag::kReduceMotion); if (UIAccessibilityIsBoldTextEnabled()) flags |= static_cast(flutter::AccessibilityFeatureFlag::kBoldText); - if (@available(iOS 13, *)) { - if (UIAccessibilityIsOnOffSwitchLabelsEnabled()) - flags |= static_cast(flutter::AccessibilityFeatureFlag::kOnOffSwitchLabels); - } #if TARGET_OS_SIMULATOR // There doesn't appear to be any way to determine whether the accessibility // inspector is enabled on the simulator. We conservatively always turn on the