Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(419)

Side by Side Diff: ui/accessibility/platform/ax_platform_node_mac.mm

Issue 2119413004: a11y: Exclude children of nested keyboard accessible controls from a11y tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix widget children. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
tapted 2017/01/11 18:27:39 CL description nit "controls from to have" -> "con
Patti Lor 2017/02/21 03:29:16 Done.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ui/accessibility/platform/ax_platform_node_mac.h" 5 #import "ui/accessibility/platform/ax_platform_node_mac.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/strings/sys_string_conversions.h" 11 #include "base/strings/sys_string_conversions.h"
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 280
281 // NSAccessibility informal protocol implementation. 281 // NSAccessibility informal protocol implementation.
282 282
283 - (BOOL)accessibilityIsIgnored { 283 - (BOOL)accessibilityIsIgnored {
284 return [[self AXRole] isEqualToString:NSAccessibilityUnknownRole] || 284 return [[self AXRole] isEqualToString:NSAccessibilityUnknownRole] ||
285 node_->GetData().HasStateFlag(ui::AX_STATE_INVISIBLE); 285 node_->GetData().HasStateFlag(ui::AX_STATE_INVISIBLE);
286 } 286 }
287 287
288 - (id)accessibilityHitTest:(NSPoint)point { 288 - (id)accessibilityHitTest:(NSPoint)point {
289 for (AXPlatformNodeCocoa* child in [self AXChildren]) { 289 for (AXPlatformNodeCocoa* child in [self AXChildren]) {
290 if (NSPointInRect(point, child.boundsInScreen)) 290 if (![child accessibilityIsIgnored] &&
291 NSPointInRect(point, [child boundsInScreen]))
291 return [child accessibilityHitTest:point]; 292 return [child accessibilityHitTest:point];
292 } 293 }
293 return NSAccessibilityUnignoredAncestor(self); 294 return NSAccessibilityUnignoredAncestor(self);
294 } 295 }
295 296
296 - (BOOL)accessibilityNotifiesWhenDestroyed { 297 - (BOOL)accessibilityNotifiesWhenDestroyed {
297 return YES; 298 return YES;
298 } 299 }
299 300
300 - (id)accessibilityFocusedUIElement { 301 - (id)accessibilityFocusedUIElement {
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 } 599 }
599 NotifyMacEvent(native_node_, event_type); 600 NotifyMacEvent(native_node_, event_type);
600 } 601 }
601 602
602 int AXPlatformNodeMac::GetIndexInParent() { 603 int AXPlatformNodeMac::GetIndexInParent() {
603 // TODO(dmazzoni): implement this. http://crbug.com/396137 604 // TODO(dmazzoni): implement this. http://crbug.com/396137
604 return -1; 605 return -1;
605 } 606 }
606 607
607 } // namespace ui 608 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | ui/views/accessibility/native_view_accessibility.h » ('j') | ui/views/accessibility/native_view_accessibility.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698