AX: [EFL] Anonymous render block flow elements should be exposed as ATK_ROLE_SECTION...
authorjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 13 Dec 2015 14:07:40 +0000 (14:07 +0000)
committerjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 13 Dec 2015 14:07:40 +0000 (14:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=152079

Reviewed by Chris Fleizach.

Source/WebCore:

Map the element to WebCore AccessibilityRole DivRole for EFL. As with GTK, this
is being done in the shared layer rather than in the platform layer because we
want all subsequent logic to treat anonymous render block flow elements as divs.

No new tests. We already have sufficient test coverage. The expectations
been updated accordingly.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):

LayoutTests:

* platform/efl/accessibility/deleting-iframe-destroys-axcache-expected.txt: Added.
* platform/efl/accessibility/image-link-expected.txt: Updated.
* platform/efl/accessibility/image-with-alt-and-map-expected.txt: Updated.
* platform/efl/accessibility/lists-expected.txt: Updated.
* platform/efl/accessibility/media-element-expected.txt: Updated

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

LayoutTests/ChangeLog
LayoutTests/platform/efl/accessibility/deleting-iframe-destroys-axcache-expected.txt [new file with mode: 0644]
LayoutTests/platform/efl/accessibility/image-link-expected.txt
LayoutTests/platform/efl/accessibility/image-with-alt-and-map-expected.txt
LayoutTests/platform/efl/accessibility/lists-expected.txt
LayoutTests/platform/efl/accessibility/media-element-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityRenderObject.cpp

index cf71fdd..08c1c89 100644 (file)
@@ -1,3 +1,16 @@
+2015-12-13  Joanmarie Diggs  <jdiggs@igalia.com>
+
+        AX: [EFL] Anonymous render block flow elements should be exposed as ATK_ROLE_SECTION; not ATK_ROLE_PANEL
+        https://bugs.webkit.org/show_bug.cgi?id=152079
+
+        Reviewed by Chris Fleizach.
+
+        * platform/efl/accessibility/deleting-iframe-destroys-axcache-expected.txt: Added.
+        * platform/efl/accessibility/image-link-expected.txt: Updated.
+        * platform/efl/accessibility/image-with-alt-and-map-expected.txt: Updated.
+        * platform/efl/accessibility/lists-expected.txt: Updated.
+        * platform/efl/accessibility/media-element-expected.txt: Updated
+
 2015-12-13  Brady Eidson  <beidson@apple.com>
 
         Modern IDB: TextExpectations gardening to run more tests.
diff --git a/LayoutTests/platform/efl/accessibility/deleting-iframe-destroys-axcache-expected.txt b/LayoutTests/platform/efl/accessibility/deleting-iframe-destroys-axcache-expected.txt
new file mode 100644 (file)
index 0000000..d048a8a
--- /dev/null
@@ -0,0 +1,42 @@
+Before
+
+After
+
+End of test
+
+This tests that deleting an iframe doesn't cause the accessibility cache to be destroyed and recreated.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+Before:
+AXRole: AXScrollArea 
+    AXRole: AXWebArea 
+        AXRole: AXParagraph AXValue: Before
+        AXRole: AXSection AXValue: <obj>
+            AXRole: AXGroup 
+                AXRole: AXScrollArea 
+                    AXRole: AXWebArea 
+                        AXRole: AXGroup AXValue: <obj>
+                            AXRole: AXButton 
+        AXRole: AXParagraph AXValue: After
+        AXRole: AXParagraph AXValue: End of test
+
+After:
+AXRole: AXScrollArea 
+    AXRole: AXWebArea 
+        AXRole: AXParagraph AXValue: Before
+        AXRole: AXParagraph AXValue: After
+        AXRole: AXParagraph AXValue: End of test
+
+PASS frameBodyRole == frameBody.role is false
+PASS frameGroupRole == frameGroup.role is false
+PASS frameButtonRole == frameButton.role is false
+PASS root.isEqual(newRoot) is true
+PASS body.isEqual(newBody) is true
+PASS before.isEqual(newBefore) is true
+PASS after.isEqual(newAfter) is true
+
+TEST COMPLETE
+
index 89aca30..30d7bc3 100644 (file)
@@ -4,7 +4,7 @@ This test checks that the right accessibility tree is generated for a link insid
 
 
 AXRole: AXLink
-AXParent: AXGroup
+AXParent: AXSection
 AXChildren: 1
 AXPosition: { 0.000000, 0.000000 }
 AXSize: { 280.000000, 213.000000 }
index 95b6c7c..1e76380 100644 (file)
@@ -6,7 +6,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 AXRole: AXWebArea AXTitle:  AXDescription: 
-  AXRole: AXGroup AXTitle:  AXDescription: 
+  AXRole: AXSection AXTitle:  AXDescription: 
     AXRole: AXImageMap AXTitle: foo bar baz AXDescription: foo bar baz
       AXRole: AXLink AXTitle: foo AXDescription: foo
       AXRole: AXLink AXTitle: bar AXDescription: bar
index 8bea4e1..62add61 100644 (file)
@@ -65,7 +65,7 @@ AXRequired: 0
 AXChecked: 0
 AXPlatformAttributes: tag:dl, toolkit:WebKitEfl
 ------------
-AXRole: AXGroup
+AXRole: AXSection
 AXParent: AXWebArea
 AXChildren: 0
 AXPosition: { 0.000000, 0.000000 }
@@ -82,7 +82,7 @@ AXEnabled: 1
 AXExpanded: 0
 AXRequired: 0
 AXChecked: 0
-AXPlatformAttributes: computed-role:group, toolkit:WebKitEfl
+AXPlatformAttributes: toolkit:WebKitEfl
 ------------
 
 
index e050c0e..206d1f7 100644 (file)
@@ -26,7 +26,7 @@ State at 'canplaythrough' event:
 
 
                 description: AXDescription: 
-                role: AXRole: AXGroup
+                role: AXRole: AXSection
 
 
             description: AXDescription: Duration
@@ -38,7 +38,7 @@ State at 'canplaythrough' event:
 
 
                 description: AXDescription: 
-                role: AXRole: AXGroup
+                role: AXRole: AXSection
 
 
             description: AXDescription: Volume
index db5c5a4..9d03a26 100644 (file)
@@ -1,3 +1,20 @@
+2015-12-13  Joanmarie Diggs  <jdiggs@igalia.com>
+
+        AX: [EFL] Anonymous render block flow elements should be exposed as ATK_ROLE_SECTION; not ATK_ROLE_PANEL
+        https://bugs.webkit.org/show_bug.cgi?id=152079
+
+        Reviewed by Chris Fleizach.
+
+        Map the element to WebCore AccessibilityRole DivRole for EFL. As with GTK, this
+        is being done in the shared layer rather than in the platform layer because we
+        want all subsequent logic to treat anonymous render block flow elements as divs.
+
+        No new tests. We already have sufficient test coverage. The expectations
+        been updated accordingly.
+
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
+
 2015-12-12  Brady Eidson  <beidson@apple.com>
 
         Modern IDB: storage/indexeddb/index-duplicate-keypaths.html fails.
index e4eb377..b844c25 100644 (file)
@@ -2704,7 +2704,7 @@ AccessibilityRole AccessibilityRenderObject::determineAccessibilityRole()
         return GroupRole;
 
     if (m_renderer->isRenderBlockFlow()) {
-#if PLATFORM(GTK)
+#if PLATFORM(GTK) || PLATFORM(EFL)
         // For ATK, GroupRole maps to ATK_ROLE_PANEL. Panels are most commonly found (and hence
         // expected) in UI elements; not text blocks.
         return m_renderer->isAnonymousBlock() ? DivRole : GroupRole;