Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions lib/ui/window.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<String> features = <String>[];
Expand All @@ -1259,8 +1253,6 @@ class AccessibilityFeatures {
features.add('boldText');
if (reduceMotion)
features.add('reduceMotion');
if (onOffSwitchLabels)
features.add('onOffSwitchLabels');
return 'AccessibilityFeatures$features';
}

Expand Down
1 change: 0 additions & 1 deletion lib/ui/window/window.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ enum class AccessibilityFeatureFlag : int32_t {
kDisableAnimations = 1 << 2,
kBoldText = 1 << 3,
kReduceMotion = 1 << 4,
kOnOffSwitchLabels = 1 << 5,
};

class WindowClient {
Expand Down
9 changes: 0 additions & 9 deletions lib/web_ui/lib/src/ui/window.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<String> features = <String>[];
Expand All @@ -1046,9 +1040,6 @@ class AccessibilityFeatures {
if (reduceMotion) {
features.add('reduceMotion');
}
if (onOffSwitchLabels) {
features.add('onOffSwitchLabels');
}
return 'AccessibilityFeatures$features';
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -896,10 +889,6 @@ - (void)onAccessibilityStatusChanged:(NSNotification*)notification {
flags |= static_cast<int32_t>(flutter::AccessibilityFeatureFlag::kReduceMotion);
if (UIAccessibilityIsBoldTextEnabled())
flags |= static_cast<int32_t>(flutter::AccessibilityFeatureFlag::kBoldText);
if (@available(iOS 13, *)) {
if (UIAccessibilityIsOnOffSwitchLabelsEnabled())
flags |= static_cast<int32_t>(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
Expand Down