Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add ContentsView to AXChildren #23174

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 12 additions & 1 deletion shell/browser/ui/cocoa/atom_ns_window.mm
Expand Up @@ -120,7 +120,18 @@ - (id)accessibilityAttributeValue:(NSString*)attribute {
[NSButtonCell class], @"RenderWidgetHostViewCocoa"];

NSArray* children = [super accessibilityAttributeValue:attribute];
return [children filteredArrayUsingPredicate:predicate];
NSMutableArray* mutableChildren = [[children mutableCopy] autorelease];
[mutableChildren filterUsingPredicate:predicate];

// We need to add the web contents: Without us doing so, VoiceOver
// users will be able to navigate up the a11y tree, but not back down.
// The content view contains the "web contents", which VoiceOver
// immediately understands.
NSView* contentView =
[shell_->GetNativeWindow().GetNativeNSWindow() contentView];
[mutableChildren addObject:contentView];

return mutableChildren;
}

- (NSString*)accessibilityTitle {
Expand Down