AX: [ATK] Expose the blockquote element using ATK_ROLE_BLOCK_QUOTE
authorjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 16 Nov 2014 16:51:08 +0000 (16:51 +0000)
committerjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 16 Nov 2014 16:51:08 +0000 (16:51 +0000)
https://bugs.webkit.org/show_bug.cgi?id=138771

Reviewed by Chris Fleizach.

Source/WebCore:

Add BlockquoteRole and assigns it to blockquote elements. Make
corresponding changes to platform role mappings: ATK_ROLE_BLOCK_QUOTE
for GTK and EFL; AXGroup (which was being used already) for the Mac.

No new tests are required. Instead, updated the existing expectations
to reflect the new mapping.

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRole):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isBlockquote):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilityRoleMap):

Tools:

Add mapping for ATK_ROLE_BLOCK_QUOTE in roleToString()

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

LayoutTests:

Updated the expectations for GTK and EFL as there is a new role
being used. The Mac expectations were not updated because the
new role on that platform continues to be to AXGroup.

* platform/efl/accessibility/roles-exposed-expected.txt: Updated
* platform/gtk/accessibility/roles-exposed-expected.txt: Updated

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

12 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/efl/accessibility/roles-exposed-expected.txt
LayoutTests/platform/gtk/accessibility/roles-exposed-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityNodeObject.cpp
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp

index c9cb97b..d719ac8 100644 (file)
@@ -1,3 +1,17 @@
+2014-11-16  Joanmarie Diggs  <jdiggs@igalia.com>
+
+        AX: [ATK] Expose the blockquote element using ATK_ROLE_BLOCK_QUOTE
+        https://bugs.webkit.org/show_bug.cgi?id=138771
+
+        Reviewed by Chris Fleizach.
+
+        Updated the expectations for GTK and EFL as there is a new role
+        being used. The Mac expectations were not updated because the
+        new role on that platform continues to be to AXGroup.
+
+        * platform/efl/accessibility/roles-exposed-expected.txt: Updated
+        * platform/gtk/accessibility/roles-exposed-expected.txt: Updated
+
 2014-11-16  Chris Dumez  <cdumez@apple.com>
 
         Crash when setting 'alt' CSS property to inherit or initial
index 7201c49..caa9296 100644 (file)
@@ -17,7 +17,7 @@ aside
       AXRole: AXLandmarkComplementary
       
 blockquote
-      AXRole: AXGroup
+      AXRole: AXBlockquote
       
 button
       AXRole: AXButton
index 7201c49..caa9296 100644 (file)
@@ -17,7 +17,7 @@ aside
       AXRole: AXLandmarkComplementary
       
 blockquote
-      AXRole: AXGroup
+      AXRole: AXBlockquote
       
 button
       AXRole: AXButton
index cf0a826..c269cde 100644 (file)
@@ -1,3 +1,29 @@
+2014-11-16  Joanmarie Diggs  <jdiggs@igalia.com>
+
+        AX: [ATK] Expose the blockquote element using ATK_ROLE_BLOCK_QUOTE
+        https://bugs.webkit.org/show_bug.cgi?id=138771
+
+        Reviewed by Chris Fleizach.
+
+        Add BlockquoteRole and assigns it to blockquote elements. Make
+        corresponding changes to platform role mappings: ATK_ROLE_BLOCK_QUOTE
+        for GTK and EFL; AXGroup (which was being used already) for the Mac.
+
+        No new tests are required. Instead, updated the existing expectations
+        to reflect the new mapping.
+
+        * accessibility/AccessibilityNodeObject.cpp:
+        (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
+        * accessibility/AccessibilityObject.cpp:
+        (WebCore::AccessibilityObject::isBlockquote):
+        * accessibility/AccessibilityObject.h:
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
+        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
+        (atkRole):
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (createAccessibilityRoleMap):
+
 2014-11-16  Chris Dumez  <cdumez@apple.com>
 
         Crash when setting 'alt' CSS property to inherit or initial
index a7318dc..a61582b 100644 (file)
@@ -319,6 +319,8 @@ AccessibilityRole AccessibilityNodeObject::determineAccessibilityRole()
         return TextAreaRole;
     if (headingLevel())
         return HeadingRole;
+    if (node()->hasTagName(blockquoteTag))
+        return BlockquoteRole;
     if (node()->hasTagName(divTag))
         return DivRole;
     if (node()->hasTagName(pTag))
index 63af7dd..8ca8e12 100644 (file)
@@ -367,7 +367,7 @@ String AccessibilityObject::computedLabel()
 
 bool AccessibilityObject::isBlockquote() const
 {
-    return node() && node()->hasTagName(blockquoteTag);
+    return roleValue() == BlockquoteRole;
 }
 
 bool AccessibilityObject::isTextControl() const
index aedaee1..3d0869c 100644 (file)
@@ -102,6 +102,7 @@ enum AccessibilityRole {
     ApplicationStatusRole,
     ApplicationTimerRole,
     AudioRole,
+    BlockquoteRole,
     BrowserRole,
     BusyIndicatorRole,
     ButtonRole,
index f1f9067..81c2345 100644 (file)
@@ -2611,6 +2611,9 @@ AccessibilityRole AccessibilityRenderObject::determineAccessibilityRole()
     if (node && node->hasTagName(addressTag))
         return LandmarkContentInfoRole;
 
+    if (node && node->hasTagName(blockquoteTag))
+        return BlockquoteRole;
+
 #if ENABLE(VIDEO)
     if (is<HTMLVideoElement>(node))
         return VideoRole;
index 0d0bccd..5235091 100644 (file)
@@ -705,6 +705,10 @@ static AtkRole atkRole(AccessibilityObject* coreObject)
     case LabelRole:
     case LegendRole:
         return ATK_ROLE_LABEL;
+    case BlockquoteRole:
+#if ATK_CHECK_VERSION(2, 11, 3)
+        return ATK_ROLE_BLOCK_QUOTE;
+#endif
     case DivRole:
         return ATK_ROLE_SECTION;
     case FooterRole:
index b3c65b5..1d38df6 100644 (file)
@@ -1943,7 +1943,8 @@ static const AccessibilityRoleMap& createAccessibilityRoleMap()
         { MathElementRole, NSAccessibilityGroupRole },
         { AudioRole, NSAccessibilityGroupRole },
         { VideoRole, NSAccessibilityGroupRole },
-        { HorizontalRuleRole, NSAccessibilitySplitterRole }
+        { HorizontalRuleRole, NSAccessibilitySplitterRole },
+        { BlockquoteRole, NSAccessibilityGroupRole }
     };
     AccessibilityRoleMap& roleMap = *new AccessibilityRoleMap;
     
index 67da14e..a3f83f0 100644 (file)
@@ -1,3 +1,14 @@
+2014-11-16  Joanmarie Diggs  <jdiggs@igalia.com>
+
+        AX: [ATK] Expose the blockquote element using ATK_ROLE_BLOCK_QUOTE
+        https://bugs.webkit.org/show_bug.cgi?id=138771
+
+        Reviewed by Chris Fleizach.
+
+        Add mapping for ATK_ROLE_BLOCK_QUOTE in roleToString()
+
+        * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+
 2014-11-15  Joanmarie Diggs  <jdiggs@igalia.com>
 
         AX: [ATK] Video and audio elements should be exposed using ATK's video and audio roles.
index 7a64fa7..7ce0d61 100644 (file)
@@ -456,6 +456,8 @@ const gchar* roleToString(AtkObject* object)
         return "AXArticle";
     case ATK_ROLE_AUDIO:
         return "AXAudio";
+    case ATK_ROLE_BLOCK_QUOTE:
+        return "AXBlockquote";
     case ATK_ROLE_DEFINITION:
         return "AXDefinition";
     case ATK_ROLE_LOG: