Chromium Code Reviews| Index: ui/accessibility/platform/ax_platform_node_mac.mm |
| diff --git a/ui/accessibility/platform/ax_platform_node_mac.mm b/ui/accessibility/platform/ax_platform_node_mac.mm |
| index 620841889eae237edc5ee3a5a3f4f237f6de4a33..b10a9adf66e859f535ff68635684f38f26ea2412 100644 |
| --- a/ui/accessibility/platform/ax_platform_node_mac.mm |
| +++ b/ui/accessibility/platform/ax_platform_node_mac.mm |
| @@ -307,6 +307,9 @@ RoleMap BuildSubroleMap() { |
| @end |
| +// TODO(patricialor): Remove this when the deployment target is 10.9 or later. |
|
dmazzoni
2016/06/21 20:09:36
Just an idea: rather than a TODO, how about just m
tapted
2016/06/22 00:23:38
This is a good suggestion! But I have an alternati
Patti Lor
2016/06/23 01:00:39
Done, thanks for the suggestions. I stole that bit
|
| +extern NSString* const NSAccessibilityPriorityKey; |
| + |
| namespace ui { |
| // static |
| @@ -335,7 +338,22 @@ gfx::NativeViewAccessible AXPlatformNodeMac::GetNativeViewAccessible() { |
| } |
| void AXPlatformNodeMac::NotifyAccessibilityEvent(ui::AXEvent event_type) { |
| - // TODO(dmazzoni): implement this. http://crbug.com/396137 |
| + switch (event_type) { |
| + case ui::AX_EVENT_ALERT: { |
| + NSString* announcement = base::SysUTF8ToNSString( |
| + GetData().GetStringAttribute(ui::AX_ATTR_NAME)); |
| + NSDictionary* notification_info = @{ |
| + NSAccessibilityAnnouncementKey : announcement, |
| + NSAccessibilityPriorityKey : @(NSAccessibilityPriorityHigh) |
|
tapted
2016/06/22 00:23:38
does
NSAccessibilityPriorityKey : NSAccessibility
Patti Lor
2016/06/23 01:00:39
It complains "collection element of type 'NSAccess
tapted
2016/07/11 03:46:47
Ah - right you are. [NSNumber numberWithInteger:NS
|
| + }; |
| + NSAccessibilityPostNotificationWithUserInfo( |
| + [NSApp mainWindow], NSAccessibilityAnnouncementRequestedNotification, |
| + notification_info); |
| + } break; |
| + default: |
| + // TODO(dmazzoni): implement this. http://crbug.com/396137 |
| + break; |
| + } |
| } |
| int AXPlatformNodeMac::GetIndexInParent() { |