Skip to content

Commit

Permalink
[macOS] Eliminate macOS 10.14 availability check (flutter#37490)
Browse files Browse the repository at this point in the history
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: flutter/flutter#114445
  • Loading branch information
cbracken authored and schwa423 committed Nov 16, 2022
1 parent d47eff5 commit e235398
Showing 1 changed file with 0 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e235398

Please sign in to comment.