AXRoleDescripton for DL is "list"; should be "description list"
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Apr 2013 06:17:21 +0000 (06:17 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Apr 2013 06:17:21 +0000 (06:17 +0000)
https://bugs.webkit.org/show_bug.cgi?id=111665

Patch by James Craig <james@cookiecrook.com> on 2013-04-02
Reviewed by Chris Fleizach.

Source/WebCore:

Defining the role and description strings, and accessors for DL.
This previously relied on getting the role and description from the platform API.

Updated existing test coverage.

* English.lproj/Localizable.strings:
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilityRoleMap):
(-[WebAccessibilityObjectWrapper subrole]):
(-[WebAccessibilityObjectWrapper roleDescription]):
* platform/LocalizedStrings.cpp:
(WebCore::AXDescriptionListText):
(WebCore):
* platform/LocalizedStrings.h:
(WebCore):
* platform/blackberry/LocalizedStringsBlackBerry.cpp:
(WebCore::AXDescriptionListText):
(WebCore):
* platform/chromium/LocalizedStringsChromium.cpp:
(WebCore::AXDescriptionListText):
(WebCore):
* platform/efl/LocalizedStringsEfl.cpp:
(WebCore::AXDescriptionListText):
(WebCore):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::AXDescriptionListText):
(WebCore):
* platform/qt/LocalizedStringsQt.cpp:
(WebCore::AXDescriptionListText):
(WebCore):

Source/WebKit/chromium:

Defining the role and description strings.

* public/WebAccessibilityRole.h:
* src/AssertMatchingEnums.cpp:

Tools:

Defining the role and description strings.

* DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:

LayoutTests:

Updating expectation strings for DL role description.

* platform/mac/accessibility/lists-expected.txt:
* platform/mac/accessibility/role-subrole-roledescription-expected.txt:
* platform/mac/accessibility/role-subrole-roledescription.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@147520 268f45cc-cd09-0410-ab3c-d52691b4dbfc

21 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac/accessibility/lists-expected.txt
LayoutTests/platform/mac/accessibility/role-subrole-roledescription-expected.txt
LayoutTests/platform/mac/accessibility/role-subrole-roledescription.html
Source/WebCore/ChangeLog
Source/WebCore/English.lproj/Localizable.strings
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
Source/WebCore/platform/LocalizedStrings.cpp
Source/WebCore/platform/LocalizedStrings.h
Source/WebCore/platform/blackberry/LocalizedStringsBlackBerry.cpp
Source/WebCore/platform/chromium/LocalizedStringsChromium.cpp
Source/WebCore/platform/efl/LocalizedStringsEfl.cpp
Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp
Source/WebCore/platform/qt/LocalizedStringsQt.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/public/WebAccessibilityRole.h
Source/WebKit/chromium/src/AssertMatchingEnums.cpp
Tools/ChangeLog
Tools/DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp

index 11e7b46..c385baf 100644 (file)
@@ -1,3 +1,16 @@
+2013-04-02  James Craig  <james@cookiecrook.com>
+
+        AXRoleDescripton for DL is "list"; should be "description list"
+        https://bugs.webkit.org/show_bug.cgi?id=111665
+
+        Reviewed by Chris Fleizach.
+
+        Updating expectation strings for DL role description.
+
+        * platform/mac/accessibility/lists-expected.txt:
+        * platform/mac/accessibility/role-subrole-roledescription-expected.txt:
+        * platform/mac/accessibility/role-subrole-roledescription.html:
+
 2013-04-02  Jer Noble  <jer.noble@apple.com>
 
         Unreviewed gardening; rebaseline mac expected results after r147470.
index 85ceb66..8c8e269 100644 (file)
@@ -69,7 +69,7 @@ AXARIABusy: 0
 ------------
 AXRole: AXList
 AXSubrole: AXDescriptionList
-AXRoleDescription: list
+AXRoleDescription: description list
 AXChildren: <array of size 5>
 AXHelp: 
 AXParent: <AXList>
index 0cc1e96..2085e0b 100644 (file)
@@ -87,7 +87,7 @@ PASS: dfn
 PASS: dl
       AXRole: AXList
       AXSubrole: AXDescriptionList
-      AXRoleDescription: list
+      AXRoleDescription: description list
       
 PASS: dt
       AXRole: AXGroup
index ae14127..a3dbb8b 100644 (file)
@@ -27,7 +27,7 @@
 <del data-role="" data-subrole="" data-roledescription="" class="ex">X</del>
 <!-- skipped <details/summary> http://webkit.org/b/108979 -->
 <!-- <dfn> http://webkit.org/b/108980 --><dfn data-role="" data-subrole="" data-roledescription="" class="ex">X</dfn>
-<dl data-role="AXList" data-subrole="AXDescriptionList" data-roledescription="list" class="ex">
+<dl data-role="AXList" data-subrole="AXDescriptionList" data-roledescription="description list" class="ex">
     <dt data-role="AXGroup" data-subrole="AXTerm" data-roledescription="term" class="ex">X</dt>
     <dd data-role="AXGroup" data-subrole="AXDescription" data-roledescription="description" class="ex">X</dd>
 </dl>
index cd9a926..10f3f71 100644 (file)
@@ -1,3 +1,44 @@
+2013-04-02  James Craig  <james@cookiecrook.com>
+
+        AXRoleDescripton for DL is "list"; should be "description list"
+        https://bugs.webkit.org/show_bug.cgi?id=111665
+
+        Reviewed by Chris Fleizach.
+
+        Defining the role and description strings, and accessors for DL.
+        This previously relied on getting the role and description from the platform API.
+
+        Updated existing test coverage.
+
+        * English.lproj/Localizable.strings:
+        * accessibility/AccessibilityObject.h:
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (createAccessibilityRoleMap):
+        (-[WebAccessibilityObjectWrapper subrole]):
+        (-[WebAccessibilityObjectWrapper roleDescription]):
+        * platform/LocalizedStrings.cpp:
+        (WebCore::AXDescriptionListText):
+        (WebCore):
+        * platform/LocalizedStrings.h:
+        (WebCore):
+        * platform/blackberry/LocalizedStringsBlackBerry.cpp:
+        (WebCore::AXDescriptionListText):
+        (WebCore):
+        * platform/chromium/LocalizedStringsChromium.cpp:
+        (WebCore::AXDescriptionListText):
+        (WebCore):
+        * platform/efl/LocalizedStringsEfl.cpp:
+        (WebCore::AXDescriptionListText):
+        (WebCore):
+        * platform/gtk/LocalizedStringsGtk.cpp:
+        (WebCore::AXDescriptionListText):
+        (WebCore):
+        * platform/qt/LocalizedStringsQt.cpp:
+        (WebCore::AXDescriptionListText):
+        (WebCore):
+
 2013-04-02  Eugene Klyuchnikov  <eustas@chromium.org>
 
         Web Inspector: [Network] Split business logic and presentation for initiator column.
index ccd7666..5525245 100644 (file)
Binary files a/Source/WebCore/English.lproj/Localizable.strings and b/Source/WebCore/English.lproj/Localizable.strings differ
index b160ec4..cdef4e2 100644 (file)
@@ -112,6 +112,7 @@ enum AccessibilityRole {
     ColumnHeaderRole,
     ComboBoxRole,
     DefinitionRole,
+    DescriptionListRole,
     DescriptionListTermRole,
     DescriptionListDetailRole,
     DirectoryRole,
index a1942bc..2057762 100644 (file)
@@ -2477,6 +2477,9 @@ AccessibilityRole AccessibilityRenderObject::determineAccessibilityRole()
     if (node && node->hasTagName(dtTag))
         return DescriptionListTermRole;
 
+    if (node && node->hasTagName(dlTag))
+        return DescriptionListRole;
+
     if (node && (node->hasTagName(rpTag) || node->hasTagName(rtTag)))
         return AnnotationRole;
 
index c20c11e..2259973 100644 (file)
@@ -1590,6 +1590,7 @@ static const AccessibilityRoleMap& createAccessibilityRoleMap()
         { DefinitionRole, NSAccessibilityGroupRole },
         { DescriptionListDetailRole, NSAccessibilityGroupRole },
         { DescriptionListTermRole, NSAccessibilityGroupRole },
+        { DescriptionListRole, NSAccessibilityListRole },
         { SliderThumbRole, NSAccessibilityValueIndicatorRole },
         { LandmarkApplicationRole, NSAccessibilityGroupRole },
         { LandmarkBannerRole, NSAccessibilityGroupRole },
@@ -1740,6 +1741,8 @@ static NSString* roleValueToNSString(AccessibilityRole value)
             return @"AXTabPanel";
         case DefinitionRole:
             return @"AXDefinition";
+        case DescriptionListRole:
+            return @"AXDescriptionList";
         case DescriptionListTermRole:
             return @"AXTerm";
         case DescriptionListDetailRole:
@@ -1876,6 +1879,14 @@ static NSString* roleValueToNSString(AccessibilityRole value)
     if (m_object->isFileUploadButton())
         return AXFileUploadButtonText();
     
+    // Only returning for DL (not UL or OL) because description changed with HTML5 from 'definition list' to
+    // superset 'description list' and does not return the same values in AX API on some OS versions. 
+    if (m_object->isList()) {
+        AccessibilityList* listObject = static_cast<AccessibilityList*>(m_object);
+        if (listObject->isDescriptionList())
+            return AXDescriptionListText();
+    }
+    
     // AppKit also returns AXTab for the role description for a tab item.
     if (m_object->isTabItem())
         return NSAccessibilityRoleDescription(@"AXTab", nil);
index 267bdba..2931b83 100644 (file)
@@ -562,6 +562,11 @@ String AXDefinitionText()
     return WEB_UI_STRING("definition", "role description of ARIA definition role");
 }
 
+String AXDescriptionListText()
+{
+    return WEB_UI_STRING("description list", "accessibility role description of a description list");
+}
+
 String AXDescriptionListTermText()
 {
     return WEB_UI_STRING("term", "term word of a description list");
index 4dbc6ee..ec4be3b 100644 (file)
@@ -153,6 +153,7 @@ namespace WebCore {
     String AXImageMapText();
     String AXHeadingText();
     String AXDefinitionText();
+    String AXDescriptionListText();
     String AXDescriptionListTermText();
     String AXDescriptionListDetailText();
     String AXFooterRoleDescriptionText();
index ea3dd0c..367f774 100644 (file)
@@ -394,6 +394,12 @@ String AXDefinitionText()
     return String();
 }
 
+String AXDescriptionListText()
+{
+    notImplemented();
+    return String();
+}
+
 String AXDescriptionListDetailText()
 {
     notImplemented();
index be898c3..ee4b91f 100644 (file)
@@ -151,6 +151,12 @@ String AXDefinitionText()
     return String("definition");
 }
 
+String AXDescriptionListText()
+{
+    notImplemented();
+    return String("description list");
+}
+
 String AXDescriptionListTermText()
 {
     notImplemented();
index 01efc55..d87ba67 100644 (file)
@@ -363,6 +363,11 @@ String AXDefinitionText()
     return String::fromUTF8("definition");
 }
 
+String AXDescriptionListText()
+{
+    return String::fromUTF8("description list");
+}
+
 String AXDescriptionListTermText()
 {
     return String::fromUTF8("term");
index fddf46a..5df6113 100644 (file)
@@ -412,6 +412,11 @@ String AXDefinitionText()
     return String::fromUTF8(_("definition"));
 }
 
+String AXDescriptionListText()
+{
+    return String::fromUTF8(_("description list"));
+}
+
 String AXDescriptionListTermText()
 {
     return String::fromUTF8(_("term"));
index 41f6939..9bce70d 100644 (file)
@@ -385,6 +385,12 @@ String AXDefinitionText()
     return String();
 }
 
+String AXDescriptionListText()
+{
+    notImplemented();
+    return String();
+}
+
 String AXDescriptionListTermText()
 {
     notImplemented();
index 735e50d..b1e8d82 100644 (file)
@@ -1,3 +1,15 @@
+2013-04-02  James Craig  <james@cookiecrook.com>
+
+        AXRoleDescripton for DL is "list"; should be "description list"
+        https://bugs.webkit.org/show_bug.cgi?id=111665
+
+        Reviewed by Chris Fleizach.
+
+        Defining the role and description strings.
+
+        * public/WebAccessibilityRole.h:
+        * src/AssertMatchingEnums.cpp:
+
 2013-04-02  Raymond Toy  <rtoy@google.com>
 
         Add support for using ARM FFT in WebAudio
index 78bbd57..035dbcb 100644 (file)
@@ -57,6 +57,7 @@ enum WebAccessibilityRole {
     WebAccessibilityRoleColumnHeader,
     WebAccessibilityRoleComboBox,
     WebAccessibilityRoleDefinition,
+    WebAccessibilityRoleDescriptionList,
     WebAccessibilityRoleDescriptionListTerm,
     WebAccessibilityRoleDescriptionListDetail,
     WebAccessibilityRoleDirectory,
index 6e9ebb4..85e0f60 100644 (file)
@@ -226,6 +226,7 @@ COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleMenuListOption, MenuListOptionR
 COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleMenuListPopup, MenuListPopupRole);
 COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTableHeaderContainer, TableHeaderContainerRole);
 COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDefinition, DefinitionRole);
+COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDescriptionList, DescriptionListRole);
 COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDescriptionListTerm, DescriptionListTermRole);
 COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDescriptionListDetail, DescriptionListDetailRole);
 COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleAnnotation, AnnotationRole);
index fa45600..add2d95 100644 (file)
@@ -1,3 +1,14 @@
+2013-04-02  James Craig  <james@cookiecrook.com>
+
+        AXRoleDescripton for DL is "list"; should be "description list"
+        https://bugs.webkit.org/show_bug.cgi?id=111665
+
+        Reviewed by Chris Fleizach.
+
+        Defining the role and description strings.
+
+        * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:
+
 2013-04-02  Roger Fong  <roger_fong@apple.com>
 
         Unreviewed. Disable running tests on Win EWS queue.
index 6dcc406..3d97627 100644 (file)
@@ -170,6 +170,8 @@ string roleToString(WebAccessibilityRole role)
         return result.append("TableHeaderContainer");
     case WebAccessibilityRoleDefinition:
         return result.append("Definition");
+    case WebAccessibilityRoleDescriptionList:
+        return result.append("DescriptionList");
     case WebAccessibilityRoleDescriptionListTerm:
         return result.append("DescriptionListTerm");
     case WebAccessibilityRoleDescriptionListDetail: