Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[macOS] Eliminate macOS 10.14 availability check #37490

Merged
merged 1 commit into from
Nov 10, 2022
Merged
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
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