|
216 | 216 | break;
|
217 | 217 | }
|
218 | 218 | case ui::AXEventGenerator::Event::LIVE_REGION_CHANGED: {
|
219 |
| - if (@available(macOS 10.14, *)) { |
220 |
| - // Do nothing on macOS >=10.14. |
221 |
| - } else { |
222 |
| - // Uses the announcement API to get around OS <= 10.13 VoiceOver bug |
223 |
| - // where it stops announcing live regions after the first time focus |
224 |
| - // leaves any content area. |
225 |
| - // Unfortunately this produces an annoying boing sound with each live |
226 |
| - // announcement, but the alternative is almost no live region support. |
227 |
| - NSString* announcement = [[NSString alloc] |
228 |
| - initWithUTF8String:mac_platform_node_delegate->GetLiveRegionText().c_str()]; |
229 |
| - NSDictionary* notification_info = @{ |
230 |
| - NSAccessibilityAnnouncementKey : announcement, |
231 |
| - NSAccessibilityPriorityKey : @(NSAccessibilityPriorityLow) |
232 |
| - }; |
233 |
| - // Triggers VoiceOver speech and show on Braille display, if available. |
234 |
| - // The Braille will only appear for a few seconds, and then will be replaced |
235 |
| - // with the previous announcement. |
236 |
| - events.push_back({ |
237 |
| - .name = NSAccessibilityAnnouncementRequestedNotification, |
238 |
| - .target = [NSApp mainWindow], |
239 |
| - .user_info = notification_info, |
240 |
| - }); |
241 |
| - break; |
242 |
| - } |
243 | 219 | // Uses native VoiceOver support for live regions.
|
244 | 220 | events.push_back({
|
245 | 221 | .name = kAccessibilityLiveRegionChangedNotification,
|
|
0 commit comments