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

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: Refactor to use ui::AX_ROLE_IGNORED for excluding a11y elements from the tree instead of focusabili… Created 3 years, 12 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.
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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 278
279 // NSAccessibility informal protocol implementation. 279 // NSAccessibility informal protocol implementation.
280 280
281 - (BOOL)accessibilityIsIgnored { 281 - (BOOL)accessibilityIsIgnored {
282 return [[self AXRole] isEqualToString:NSAccessibilityUnknownRole] || 282 return [[self AXRole] isEqualToString:NSAccessibilityUnknownRole] ||
283 node_->GetData().HasStateFlag(ui::AX_STATE_INVISIBLE); 283 node_->GetData().HasStateFlag(ui::AX_STATE_INVISIBLE);
284 } 284 }
285 285
286 - (id)accessibilityHitTest:(NSPoint)point { 286 - (id)accessibilityHitTest:(NSPoint)point {
287 for (AXPlatformNodeCocoa* child in [self AXChildren]) { 287 for (AXPlatformNodeCocoa* child in [self AXChildren]) {
288 if (NSPointInRect(point, child.boundsInScreen)) 288 if (NSPointInRect(point, [child boundsInScreen]) &&
289 ![child accessibilityIsIgnored])
tapted 2016/12/22 02:56:36 nit: reorder these so accessibilityIsIgnored is ch
Patti Lor 2017/01/11 02:01:47 Done.
289 return [child accessibilityHitTest:point]; 290 return [child accessibilityHitTest:point];
290 } 291 }
291 return NSAccessibilityUnignoredAncestor(self); 292 return NSAccessibilityUnignoredAncestor(self);
292 } 293 }
293 294
294 - (BOOL)accessibilityNotifiesWhenDestroyed { 295 - (BOOL)accessibilityNotifiesWhenDestroyed {
295 return YES; 296 return YES;
296 } 297 }
297 298
298 - (id)accessibilityFocusedUIElement { 299 - (id)accessibilityFocusedUIElement {
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 } 597 }
597 NotifyMacEvent(native_node_, event_type); 598 NotifyMacEvent(native_node_, event_type);
598 } 599 }
599 600
600 int AXPlatformNodeMac::GetIndexInParent() { 601 int AXPlatformNodeMac::GetIndexInParent() {
601 // TODO(dmazzoni): implement this. http://crbug.com/396137 602 // TODO(dmazzoni): implement this. http://crbug.com/396137
602 return -1; 603 return -1;
603 } 604 }
604 605
605 } // namespace ui 606 } // 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