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

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: Rebase. Created 3 years, 8 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
« no previous file with comments | « no previous file | ui/views/accessibility/native_view_accessibility_base.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
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"
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 289
290 // NSAccessibility informal protocol implementation. 290 // NSAccessibility informal protocol implementation.
291 291
292 - (BOOL)accessibilityIsIgnored { 292 - (BOOL)accessibilityIsIgnored {
293 return [[self AXRole] isEqualToString:NSAccessibilityUnknownRole] || 293 return [[self AXRole] isEqualToString:NSAccessibilityUnknownRole] ||
294 node_->GetData().HasStateFlag(ui::AX_STATE_INVISIBLE); 294 node_->GetData().HasStateFlag(ui::AX_STATE_INVISIBLE);
295 } 295 }
296 296
297 - (id)accessibilityHitTest:(NSPoint)point { 297 - (id)accessibilityHitTest:(NSPoint)point {
298 for (AXPlatformNodeCocoa* child in [self AXChildren]) { 298 for (AXPlatformNodeCocoa* child in [self AXChildren]) {
299 if (NSPointInRect(point, child.boundsInScreen)) 299 if (![child accessibilityIsIgnored] &&
300 NSPointInRect(point, [child boundsInScreen])) {
300 return [child accessibilityHitTest:point]; 301 return [child accessibilityHitTest:point];
302 }
301 } 303 }
302 return NSAccessibilityUnignoredAncestor(self); 304 return NSAccessibilityUnignoredAncestor(self);
303 } 305 }
304 306
305 - (BOOL)accessibilityNotifiesWhenDestroyed { 307 - (BOOL)accessibilityNotifiesWhenDestroyed {
306 return YES; 308 return YES;
307 } 309 }
308 310
309 - (id)accessibilityFocusedUIElement { 311 - (id)accessibilityFocusedUIElement {
310 return node_->GetDelegate()->GetFocus(); 312 return node_->GetDelegate()->GetFocus();
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 } 701 }
700 NotifyMacEvent(native_node_, event_type); 702 NotifyMacEvent(native_node_, event_type);
701 } 703 }
702 704
703 int AXPlatformNodeMac::GetIndexInParent() { 705 int AXPlatformNodeMac::GetIndexInParent() {
704 // TODO(dmazzoni): implement this. http://crbug.com/396137 706 // TODO(dmazzoni): implement this. http://crbug.com/396137
705 return -1; 707 return -1;
706 } 708 }
707 709
708 } // namespace ui 710 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | ui/views/accessibility/native_view_accessibility_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698