Skip to content
Permalink
Browse files
AX: [GTK] Anonymous render block flow elements should be exposed as A…
…TK_ROLE_SECTION; not ATK_ROLE_PANEL

https://bugs.webkit.org/show_bug.cgi?id=152070

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Map the element to WebCore AccessibilityRole DivRole for 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/gtk/accessibility/deleting-iframe-destroys-axcache-expected.txt: Added.
* platform/gtk/accessibility/gtk/media-controls-panel-title-expected.txt: Added.
* platform/gtk/accessibility/gtk/replaced-objects-in-anonymous-blocks-expected.txt: Added.
* platform/gtk/accessibility/image-link-expected.txt: Updated
* platform/gtk/accessibility/image-with-alt-and-map-expected.txt: Updated.
* platform/gtk/accessibility/lists-expected.txt: Updated.
* platform/gtk/accessibility/media-emits-object-replacement-expected.txt: Updated.


Canonical link: https://commits.webkit.org/170214@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@193841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
joanmarie committed Dec 9, 2015
1 parent 66eda84 commit 571d123f44064c6e3e95cda10af98e12e6dac001
@@ -1,3 +1,18 @@
2015-12-09 Joanmarie Diggs <jdiggs@igalia.com>

AX: [GTK] Anonymous render block flow elements should be exposed as ATK_ROLE_SECTION; not ATK_ROLE_PANEL
https://bugs.webkit.org/show_bug.cgi?id=152070

Reviewed by Mario Sanchez Prada.

* platform/gtk/accessibility/deleting-iframe-destroys-axcache-expected.txt: Added.
* platform/gtk/accessibility/gtk/media-controls-panel-title-expected.txt: Added.
* platform/gtk/accessibility/gtk/replaced-objects-in-anonymous-blocks-expected.txt: Added.
* platform/gtk/accessibility/image-link-expected.txt: Updated
* platform/gtk/accessibility/image-with-alt-and-map-expected.txt: Updated.
* platform/gtk/accessibility/lists-expected.txt: Updated.
* platform/gtk/accessibility/media-emits-object-replacement-expected.txt: Updated.

2015-12-09 Ryan Haddad <ryanhaddad@apple.com>

Replacing Yosemite flag with Release flag for two flaky xmlhttprequest tests.
@@ -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

@@ -0,0 +1,20 @@

This tests that the media controls panel has the correct name and role

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


FAIL mainBlock.role should be AXRole: AXGroup. Was AXRole: AXSection.
PASS mainBlock.title is 'AXTitle: '
PASS element.role is 'AXRole: AXVideo'
PASS element.title is 'AXTitle: '
PASS element.role is 'AXRole: AXToolbar'
PASS element.title is 'AXTitle: Video Playback'
PASS element.role is 'AXRole: AXAudio'
PASS element.title is 'AXTitle: '
PASS element.role is 'AXRole: AXToolbar'
PASS element.title is 'AXTitle: Audio Playback'
PASS successfullyParsed is true

TEST COMPLETE

@@ -0,0 +1,37 @@
Paragraph

button


Div
button
Heading
button


End of test
AXRole: AXWebArea
AXRole: AXParagraph AXValue: Paragraph
AXRole: AXSection AXValue: <obj>
AXRole: AXButton
AXRole: AXSection AXValue: <obj>
AXRole: AXGroup
AXRole: AXScrollArea
AXRole: AXWebArea
AXRole: AXSection AXValue: <obj>
AXRole: AXTextField AXValue: text area
AXRole: AXSection AXValue: Div<\n><obj>
AXRole: AXButton
AXRole: AXHeading AXValue: Heading<\n><obj><\n><obj>
AXRole: AXButton
AXRole: AXImage
AXRole: AXSection AXValue: End of test
This tests that the text associated with replaced objects in an anonymous block is correct.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS successfullyParsed is true

TEST COMPLETE

@@ -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: { 8.000000, 98.000000 }
AXSize: { 280.000000, 213.000000 }
@@ -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
@@ -65,7 +65,7 @@ AXRequired: 0
AXChecked: 0
AXPlatformAttributes: tag:dl, toolkit:WebKitGtk
------------
AXRole: AXGroup
AXRole: AXSection
AXParent: AXWebArea
AXChildren: 0
AXPosition: { 8.000000, 217.000000 }
@@ -82,7 +82,7 @@ AXEnabled: 1
AXExpanded: 0
AXRequired: 0
AXChecked: 0
AXPlatformAttributes: computed-role:group, toolkit:WebKitGtk
AXPlatformAttributes: toolkit:WebKitGtk
------------


@@ -9,7 +9,7 @@ AXRole: AXWebArea
AXRole: AXButton
AXRole: AXSlider
AXRole: AXTimer AXValue: 00:00
AXRole: AXGroup AXValue: <\n>
AXRole: AXSection AXValue: <\n>
AXRole: AXSection AXValue: a <obj> b
AXRole: AXAudio
AXRole: AXToolbar
@@ -1,3 +1,20 @@
2015-12-09 Joanmarie Diggs <jdiggs@igalia.com>

AX: [GTK] Anonymous render block flow elements should be exposed as ATK_ROLE_SECTION; not ATK_ROLE_PANEL
https://bugs.webkit.org/show_bug.cgi?id=152070

Reviewed by Mario Sanchez Prada.

Map the element to WebCore AccessibilityRole DivRole for 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-09 Keith Rollin <krollin@apple.com>

form.elements should reflect the element ordering after the HTML tree builder algorithm
@@ -2698,13 +2698,20 @@ AccessibilityRole AccessibilityRenderObject::determineAccessibilityRole()
return LandmarkBannerRole;
if (node && node->hasTagName(footerTag) && !isDescendantOfElementType(articleTag) && !isDescendantOfElementType(sectionTag))
return FooterRole;

if (m_renderer->isRenderBlockFlow())
return GroupRole;

// If the element does not have role, but it has ARIA attributes, or accepts tab focus, accessibility should fallback to exposing it as a group.
if (supportsARIAAttributes() || canSetFocusAttribute())
return GroupRole;

if (m_renderer->isRenderBlockFlow()) {
#if PLATFORM(GTK)
// 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;
#else
return GroupRole;
#endif
}

// InlineRole is the final fallback before assigning UnknownRole to an object. It makes it
// possible to distinguish truly unknown objects from non-focusable inline text elements

0 comments on commit 571d123

Please sign in to comment.