Title: [148484] trunk
Revision
148484
Author
commit-qu...@webkit.org
Date
2013-04-15 18:34:20 -0700 (Mon, 15 Apr 2013)

Log Message

WebKit should not expose AXSubrole:AXDescriptionList on Mountain Lion as it causes a regression in VoiceOver behavior
https://bugs.webkit.org/show_bug.cgi?id=113975

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

Serve NSAccessibilityDescriptionListSubrole or NSAccessibilityDefinitionListSubrole
depending on platform. Updated existing test coverage.

Source/WebCore:

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper subrole]):

LayoutTests:

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

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (148483 => 148484)


--- trunk/LayoutTests/ChangeLog	2013-04-16 01:20:31 UTC (rev 148483)
+++ trunk/LayoutTests/ChangeLog	2013-04-16 01:34:20 UTC (rev 148484)
@@ -1,3 +1,17 @@
+2013-04-15  James Craig  <ja...@cookiecrook.com>
+
+        WebKit should not expose AXSubrole:AXDescriptionList on Mountain Lion as it causes a regression in VoiceOver behavior
+        https://bugs.webkit.org/show_bug.cgi?id=113975
+
+        Reviewed by Chris Fleizach.
+
+        Serve NSAccessibilityDescriptionListSubrole or NSAccessibilityDefinitionListSubrole
+        depending on platform. Updated existing test coverage.
+
+        * platform/mac/accessibility/lists-expected.txt:
+        * platform/mac/accessibility/role-subrole-roledescription-expected.txt:
+        * platform/mac/accessibility/role-subrole-roledescription.html:
+
 2013-04-15  Anders Carlsson  <ander...@apple.com>
 
         plugins/get-url-beforeunload-destroys-plugin.html crashes in WebKit1

Modified: trunk/LayoutTests/platform/mac/accessibility/lists-expected.txt (148483 => 148484)


--- trunk/LayoutTests/platform/mac/accessibility/lists-expected.txt	2013-04-16 01:20:31 UTC (rev 148483)
+++ trunk/LayoutTests/platform/mac/accessibility/lists-expected.txt	2013-04-16 01:34:20 UTC (rev 148484)
@@ -68,7 +68,7 @@
 
 ------------
 AXRole: AXList
-AXSubrole: AXDescriptionList
+AXSubrole: AXDefinitionList
 AXRoleDescription: description list
 AXChildren: <array of size 5>
 AXHelp: 

Modified: trunk/LayoutTests/platform/mac/accessibility/role-subrole-roledescription-expected.txt (148483 => 148484)


--- trunk/LayoutTests/platform/mac/accessibility/role-subrole-roledescription-expected.txt	2013-04-16 01:20:31 UTC (rev 148483)
+++ trunk/LayoutTests/platform/mac/accessibility/role-subrole-roledescription-expected.txt	2013-04-16 01:34:20 UTC (rev 148484)
@@ -86,7 +86,7 @@
       
 PASS: dl
       AXRole: AXList
-      AXSubrole: AXDescriptionList
+      AXSubrole: AXDefinitionList
       AXRoleDescription: description list
       
 PASS: dt

Modified: trunk/LayoutTests/platform/mac/accessibility/role-subrole-roledescription.html (148483 => 148484)


--- trunk/LayoutTests/platform/mac/accessibility/role-subrole-roledescription.html	2013-04-16 01:20:31 UTC (rev 148483)
+++ trunk/LayoutTests/platform/mac/accessibility/role-subrole-roledescription.html	2013-04-16 01:34:20 UTC (rev 148484)
@@ -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="description list" class="ex">
+<dl data-role="AXList" data-subrole="AXDescriptionList" data-alternatesubrole="AXDefinitionList" 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>
@@ -310,13 +310,16 @@
         output += subrole + indent;
         output += roleDescription + indent;
 
-        expectation = el.getAttribute('data-role') +"/"+ el.getAttribute('data-subrole') +"/"+ el.getAttribute('data-roledescription');
+        expectation = el.getAttribute('data-role') + "/";
+        expectation += el.getAttribute('data-subrole');
+        if (el.getAttribute('data-alternatesubrole')) expectation += " or " + el.getAttribute('data-alternatesubrole');
+        expectation += "/" + el.getAttribute('data-roledescription');
 
         result = document.getElementById('console');
         
         // Test AXRole, AXSubrole, and AXRoleDescription.
         if (role.replace('AXRole: ','') == el.getAttribute('data-role')
-            && subrole.replace('AXSubrole: ','') == el.getAttribute('data-subrole')
+            && (subrole.replace('AXSubrole: ','') == el.getAttribute('data-subrole') || subrole.replace('AXSubrole: ','') == el.getAttribute('data-alternatesubrole'))
             && roleDescription.replace('AXRoleDescription: ','') == el.getAttribute('data-roledescription')) {
             result.innerText += "PASS: " + output + "\n";
         } else {

Modified: trunk/Source/WebCore/ChangeLog (148483 => 148484)


--- trunk/Source/WebCore/ChangeLog	2013-04-16 01:20:31 UTC (rev 148483)
+++ trunk/Source/WebCore/ChangeLog	2013-04-16 01:34:20 UTC (rev 148484)
@@ -1,3 +1,16 @@
+2013-04-15  James Craig  <ja...@cookiecrook.com>
+
+        WebKit should not expose AXSubrole:AXDescriptionList on Mountain Lion as it causes a regression in VoiceOver behavior
+        https://bugs.webkit.org/show_bug.cgi?id=113975
+
+        Reviewed by Chris Fleizach.
+
+        Serve NSAccessibilityDescriptionListSubrole or NSAccessibilityDefinitionListSubrole
+        depending on platform. Updated existing test coverage.
+
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (-[WebAccessibilityObjectWrapper subrole]):
+
 2013-04-15  Dean Jackson  <d...@apple.com>
 
         Plugins that resize might need to be snapshotted.

Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (148483 => 148484)


--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm	2013-04-16 01:20:31 UTC (rev 148483)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm	2013-04-16 01:34:20 UTC (rev 148484)
@@ -111,6 +111,10 @@
 #define NSAccessibilityContentListSubrole @"AXContentList"
 #endif
 
+#ifndef NSAccessibilityDefinitionListSubrole
+#define NSAccessibilityDefinitionListSubrole @"AXDefinitionList"
+#endif
+
 #ifndef NSAccessibilityDescriptionListSubrole
 #define NSAccessibilityDescriptionListSubrole @"AXDescriptionList"
 #endif
@@ -1751,8 +1755,13 @@
         AccessibilityList* listObject = toAccessibilityList(m_object);
         if (listObject->isUnorderedList() || listObject->isOrderedList())
             return NSAccessibilityContentListSubrole;
-        if (listObject->isDescriptionList())
+        if (listObject->isDescriptionList()) {
+#if __MAC_OS_X_VERSION_MIN_REQUIRED < 1090
+            return NSAccessibilityDefinitionListSubrole;
+#else
             return NSAccessibilityDescriptionListSubrole;
+#endif
+        }
     }
     
     // ARIA content subroles.
@@ -1803,8 +1812,6 @@
             return @"AXTabPanel";
         case DefinitionRole:
             return @"AXDefinition";
-        case DescriptionListRole:
-            return @"AXDescriptionList";
         case DescriptionListTermRole:
             return @"AXTerm";
         case DescriptionListDetailRole:
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to