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

Unified Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window.mm

Issue 2320723006: cocoa: give bookmarks menu an accessible title (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window.mm
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window.mm
index 31178191b460ea85eb73c792ce132c436ff485b2..ff43da084fcee0c618616dfda543779edef1bf74 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window.mm
@@ -8,7 +8,9 @@
#import "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_constants.h"
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h"
+#include "chrome/grit/generated_resources.h"
#import "third_party/google_toolbox_for_mac/src/AppKit/GTMNSColor+Luminance.h"
+#include "ui/base/l10n/l10n_util_mac.h"
#include "ui/base/material_design/material_design_controller.h"
using bookmarks::kBookmarkBarMenuCornerRadius;
@@ -20,6 +22,12 @@
} // namespace
+@interface BookmarkBarFolderWindow (Accessibility)
+
+- (NSString*)accessibilityTitle;
+
+@end
+
@implementation BookmarkBarFolderWindow
- (id)initWithContentRect:(NSRect)contentRect
@@ -48,6 +56,13 @@ - (BOOL)canBecomeMainWindow {
- (void)keyDown:(NSEvent *)theEvent {
}
+// This is a little icky. If the menu doesn't have a separate accessibleTitle,
+// it will get announced as its normal window title, which is "BmbPopUpWindow".
+// Instead, reuse the bookmark chevron's label for the menu that it spawns.
+- (NSString*)accessibilityTitle {
+ return l10n_util::GetNSString(IDS_ACCNAME_BOOKMARKS_CHEVRON);
Avi (use Gerrit) 2016/09/08 14:43:30 But this is "Menu containing hidden bookmarks", wh
+}
+
@end
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698