summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-21 17:18:57 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-21 17:18:57 +0000
commit6b4a530327976d8717dd007cf1403ee453148856 (patch)
tree34f69df22b4db3e770c0f1564cfbde6db743c895
parent0e8090a188bbdb4d9c0628ba5f665c3b9f823d5c (diff)
downloadchromium_src-6b4a530327976d8717dd007cf1403ee453148856.zip
chromium_src-6b4a530327976d8717dd007cf1403ee453148856.tar.gz
chromium_src-6b4a530327976d8717dd007cf1403ee453148856.tar.bz2
Make the tab strip and tabs first-class accessibility objects.
BUG=none TEST=none Review URL: http://codereview.chromium.org/504059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35091 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/cocoa/tab_strip_view.mm11
-rw-r--r--chrome/browser/cocoa/tab_view.mm17
2 files changed, 28 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/tab_strip_view.mm b/chrome/browser/cocoa/tab_strip_view.mm
index a5435e9..797bf14 100644
--- a/chrome/browser/cocoa/tab_strip_view.mm
+++ b/chrome/browser/cocoa/tab_strip_view.mm
@@ -165,4 +165,15 @@
return [dropHandler_ performDragOperation:sender];
}
+- (BOOL)accessibilityIsIgnored {
+ return NO;
+}
+
+- (id)accessibilityAttributeValue:(NSString*)attribute {
+ if ([attribute isEqual:NSAccessibilityRoleAttribute])
+ return NSAccessibilityGroupRole;
+
+ return [super accessibilityAttributeValue:attribute];
+}
+
@end
diff --git a/chrome/browser/cocoa/tab_view.mm b/chrome/browser/cocoa/tab_view.mm
index 1f6c29a..3432908 100644
--- a/chrome/browser/cocoa/tab_view.mm
+++ b/chrome/browser/cocoa/tab_view.mm
@@ -794,6 +794,23 @@ const CGFloat kRapidCloseDist = 2.5;
}
}
+- (BOOL)accessibilityIsIgnored {
+ return NO;
+}
+
+- (NSArray*)accessibilityActionNames {
+ NSArray* parentActions = [super accessibilityActionNames];
+
+ return [parentActions arrayByAddingObject:NSAccessibilityPressAction];
+}
+
+- (id)accessibilityAttributeValue:(NSString*)attribute {
+ if ([attribute isEqual:NSAccessibilityRoleAttribute])
+ return NSAccessibilityButtonRole;
+
+ return [super accessibilityAttributeValue:attribute];
+}
+
@end // @implementation TabView
@implementation TabView(Private)