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

Side by Side Diff: content/browser/accessibility/browser_accessibility_cocoa.mm

Issue 703123002: AXRoleDescriptions are not correctly exposed for dl, dd, dt tags (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebasing changes Created 6 years, 1 month 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include <execinfo.h> 5 #include <execinfo.h>
6 6
7 #import "content/browser/accessibility/browser_accessibility_cocoa.h" 7 #import "content/browser/accessibility/browser_accessibility_cocoa.h"
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 IDS_AX_ROLE_ARTICLE)); 586 IDS_AX_ROLE_ARTICLE));
587 case ui::AX_ROLE_BANNER: 587 case ui::AX_ROLE_BANNER:
588 return base::SysUTF16ToNSString(content_client->GetLocalizedString( 588 return base::SysUTF16ToNSString(content_client->GetLocalizedString(
589 IDS_AX_ROLE_BANNER)); 589 IDS_AX_ROLE_BANNER));
590 case ui::AX_ROLE_COMPLEMENTARY: 590 case ui::AX_ROLE_COMPLEMENTARY:
591 return base::SysUTF16ToNSString(content_client->GetLocalizedString( 591 return base::SysUTF16ToNSString(content_client->GetLocalizedString(
592 IDS_AX_ROLE_COMPLEMENTARY)); 592 IDS_AX_ROLE_COMPLEMENTARY));
593 case ui::AX_ROLE_CONTENT_INFO: 593 case ui::AX_ROLE_CONTENT_INFO:
594 return base::SysUTF16ToNSString(content_client->GetLocalizedString( 594 return base::SysUTF16ToNSString(content_client->GetLocalizedString(
595 IDS_AX_ROLE_ADDRESS)); 595 IDS_AX_ROLE_ADDRESS));
596 case ui::AX_ROLE_DESCRIPTION_LIST:
597 return base::SysUTF16ToNSString(content_client->GetLocalizedString(
598 IDS_AX_ROLE_DESCRIPTION_LIST));
599 case ui::AX_ROLE_DESCRIPTION_LIST_DETAIL:
600 return base::SysUTF16ToNSString(content_client->GetLocalizedString(
601 IDS_AX_ROLE_DESCRIPTION_DETAIL));
602 case ui::AX_ROLE_DESCRIPTION_LIST_TERM:
603 return base::SysUTF16ToNSString(content_client->GetLocalizedString(
604 IDS_AX_ROLE_DESCRIPTION_TERM));
596 case ui::AX_ROLE_FOOTER: 605 case ui::AX_ROLE_FOOTER:
597 return base::SysUTF16ToNSString(content_client->GetLocalizedString( 606 return base::SysUTF16ToNSString(content_client->GetLocalizedString(
598 IDS_AX_ROLE_FOOTER)); 607 IDS_AX_ROLE_FOOTER));
599 case ui::AX_ROLE_MAIN: 608 case ui::AX_ROLE_MAIN:
600 return base::SysUTF16ToNSString(content_client->GetLocalizedString( 609 return base::SysUTF16ToNSString(content_client->GetLocalizedString(
601 IDS_AX_ROLE_MAIN_CONTENT)); 610 IDS_AX_ROLE_MAIN_CONTENT));
602 case ui::AX_ROLE_NAVIGATION: 611 case ui::AX_ROLE_NAVIGATION:
603 return base::SysUTF16ToNSString(content_client->GetLocalizedString( 612 return base::SysUTF16ToNSString(content_client->GetLocalizedString(
604 IDS_AX_ROLE_NAVIGATIONAL_LINK)); 613 IDS_AX_ROLE_NAVIGATIONAL_LINK));
605 case ui::AX_ROLE_REGION: 614 case ui::AX_ROLE_REGION:
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 730
722 // Returns a subrole based upon the role. 731 // Returns a subrole based upon the role.
723 - (NSString*) subrole { 732 - (NSString*) subrole {
724 ui::AXRole browserAccessibilityRole = [self internalRole]; 733 ui::AXRole browserAccessibilityRole = [self internalRole];
725 if (browserAccessibilityRole == ui::AX_ROLE_TEXT_FIELD && 734 if (browserAccessibilityRole == ui::AX_ROLE_TEXT_FIELD &&
726 GetState(browserAccessibility_, ui::AX_STATE_PROTECTED)) { 735 GetState(browserAccessibility_, ui::AX_STATE_PROTECTED)) {
727 return @"AXSecureTextField"; 736 return @"AXSecureTextField";
728 } 737 }
729 738
730 if (browserAccessibilityRole == ui::AX_ROLE_DESCRIPTION_LIST) 739 if (browserAccessibilityRole == ui::AX_ROLE_DESCRIPTION_LIST)
731 return @"AXDescriptionList"; 740 return @"AXDefinitionList";
732 741
733 if (browserAccessibilityRole == ui::AX_ROLE_LIST) 742 if (browserAccessibilityRole == ui::AX_ROLE_LIST)
734 return @"AXContentList"; 743 return @"AXContentList";
735 744
736 return [AXPlatformNodeCocoa nativeSubroleFromAXRole:browserAccessibilityRole]; 745 return [AXPlatformNodeCocoa nativeSubroleFromAXRole:browserAccessibilityRole];
737 } 746 }
738 747
739 // Returns all tabs in this subtree. 748 // Returns all tabs in this subtree.
740 - (NSArray*)tabs { 749 - (NSArray*)tabs {
741 NSMutableArray* tabSubtree = [[[NSMutableArray alloc] init] autorelease]; 750 NSMutableArray* tabSubtree = [[[NSMutableArray alloc] init] autorelease];
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
1474 return [super hash]; 1483 return [super hash];
1475 return browserAccessibility_->GetId(); 1484 return browserAccessibility_->GetId();
1476 } 1485 }
1477 1486
1478 - (BOOL)accessibilityShouldUseUniqueId { 1487 - (BOOL)accessibilityShouldUseUniqueId {
1479 return YES; 1488 return YES;
1480 } 1489 }
1481 1490
1482 @end 1491 @end
1483 1492
OLDNEW
« no previous file with comments | « content/app/strings/content_strings.grd ('k') | content/browser/accessibility/browser_accessibility_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698