From 1ee67dcc34110a97f4b16c7c2d8c657058b39c79 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Thu, 10 Nov 2022 09:39:25 +0100 Subject: [PATCH] [macOS] Eliminate macOS 10.14 availability check Now that the macOS embedders have all been updated to use a minimum macOS SDK of 10.14, eliminate the remaining @available checks dependent on that version. Issue: https://github.com/flutter/flutter/issues/114445 --- .../Source/AccessibilityBridgeMac.mm | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMac.mm b/shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMac.mm index a0ce01dd3aeca..d124bcfe34826 100644 --- a/shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMac.mm +++ b/shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMac.mm @@ -216,30 +216,6 @@ break; } case ui::AXEventGenerator::Event::LIVE_REGION_CHANGED: { - if (@available(macOS 10.14, *)) { - // Do nothing on macOS >=10.14. - } else { - // Uses the announcement API to get around OS <= 10.13 VoiceOver bug - // where it stops announcing live regions after the first time focus - // leaves any content area. - // Unfortunately this produces an annoying boing sound with each live - // announcement, but the alternative is almost no live region support. - NSString* announcement = [[NSString alloc] - initWithUTF8String:mac_platform_node_delegate->GetLiveRegionText().c_str()]; - NSDictionary* notification_info = @{ - NSAccessibilityAnnouncementKey : announcement, - NSAccessibilityPriorityKey : @(NSAccessibilityPriorityLow) - }; - // Triggers VoiceOver speech and show on Braille display, if available. - // The Braille will only appear for a few seconds, and then will be replaced - // with the previous announcement. - events.push_back({ - .name = NSAccessibilityAnnouncementRequestedNotification, - .target = [NSApp mainWindow], - .user_info = notification_info, - }); - break; - } // Uses native VoiceOver support for live regions. events.push_back({ .name = kAccessibilityLiveRegionChangedNotification,