Changeset 200240 in webkit


Ignore:
Timestamp:
Apr 29, 2016 6:08:03 AM (8 years ago)
Author:
jdiggs@igalia.com
Message:

AX: [ATK] Expose elements with ARIA's "text" role
https://bugs.webkit.org/show_bug.cgi?id=157160

Reviewed by Chris Fleizach.

Source/WebCore:

WebCore Accessibility's StaticTextRole is used for exposed RenderText
objects and for the ARIA "text" role. The former should be folded into
the parent element; the latter should not be, but was. Now we check to
see which type we have when building the accessibility tree. Also map
the "text" role to ATK_ROLE_STATIC.

We already have sufficient test coverage. Three previously-failing tests
are now passing.

  • accessibility/atk/AccessibilityObjectAtk.cpp:

(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(atkRole):

LayoutTests:

  • accessibility/aria-text-role.html: Modified to do platform-specific role checks.
  • platform/gtk/TestExpectations: Unskipped three previously-failing tests.
  • platform/gtk/accessibility/roles-computedRoleString-expected.txt: Updated for new behavior.
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r200234 r200240  
     12016-04-29  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        AX: [ATK] Expose elements with ARIA's "text" role
     4        https://bugs.webkit.org/show_bug.cgi?id=157160
     5
     6        Reviewed by Chris Fleizach.
     7
     8        * accessibility/aria-text-role.html: Modified to do platform-specific role checks.
     9        * platform/gtk/TestExpectations: Unskipped three previously-failing tests.
     10        * platform/gtk/accessibility/roles-computedRoleString-expected.txt: Updated for new behavior.
     11
    1122016-04-29  Ryosuke Niwa  <rniwa@webkit.org>
    213
  • trunk/LayoutTests/accessibility/aria-text-role.html

    r155274 r200240  
    2323        document.getElementById("textrole").focus();
    2424        var textrole = accessibilityController.focusedElement;
    25         shouldBe("textrole.role", "'AXRole: AXStaticText'");
     25        if (accessibilityController.platformName == "atk")
     26            shouldBe("textrole.role", "'AXRole: AXStatic'");
     27        else
     28            shouldBe("textrole.role", "'AXRole: AXStaticText'");
    2629        shouldBe("textrole.stringValue", "'AXValue: all at once'");
    2730
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r200126 r200240  
    18421842
    18431843webkit.org/b/98357 accessibility/aria-readonly.html [ Failure ]
    1844 webkit.org/b/98359 accessibility/aria-text-role.html [ Failure ]
    18451844webkit.org/b/98363 accessibility/canvas-fallback-content-2.html [ Failure ]
    18461845webkit.org/b/98372 accessibility/onclick-handlers.html [ Failure ]
     
    18481847webkit.org/b/98380 accessibility/th-as-title-ui.html [ Failure ]
    18491848webkit.org/b/98382 accessibility/visible-elements.html [ Failure ]
    1850 
    1851 webkit.org/b/125506 accessibility/alt-tag-on-image-with-nonimage-role.html [ Failure ]
    18521849
    18531850# Blur and focus events are not received for the following tests.
     
    20932090
    20942091webkit.org/b/116806 fast/css/text-overflow-ellipsis-behind-floats.html [ ImageOnlyFailure ]
    2095 
    2096 webkit.org/b/117581 accessibility/text-role-with-aria-hidden-inside.html [ Failure ]
    20972092
    20982093webkit.org/b/117582 fast/flexbox/clear-overflow-before-scroll-update.html [ Failure ]
  • trunk/LayoutTests/platform/gtk/accessibility/roles-computedRoleString-expected.txt

    r200222 r200240  
    175175PASS: img[role="foo     
    176176bar"] -> img.
     177PASS: img[role="text"] -> text.
     178PASS: img[role="text img"] -> text.
    177179PASS: img[role="img text"] -> img.
    178180PASS: img[role="presentation"][aria-label] -> img.
  • trunk/Source/WebCore/ChangeLog

    r200237 r200240  
     12016-04-29  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        AX: [ATK] Expose elements with ARIA's "text" role
     4        https://bugs.webkit.org/show_bug.cgi?id=157160
     5
     6        Reviewed by Chris Fleizach.
     7
     8        WebCore Accessibility's StaticTextRole is used for exposed RenderText
     9        objects and for the ARIA "text" role. The former should be folded into
     10        the parent element; the latter should not be, but was. Now we check to
     11        see which type we have when building the accessibility tree. Also map
     12        the "text" role to ATK_ROLE_STATIC.
     13
     14        We already have sufficient test coverage. Three previously-failing tests
     15        are now passing.
     16
     17        * accessibility/atk/AccessibilityObjectAtk.cpp:
     18        (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
     19        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
     20        (atkRole):
     21
    1222016-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>
    223
  • trunk/Source/WebCore/accessibility/atk/AccessibilityObjectAtk.cpp

    r200188 r200240  
    6565
    6666    // The object containing the text should implement AtkText itself.
     67    // However, WebCore also maps ARIA's "text" role to the StaticTextRole.
    6768    if (role == StaticTextRole)
    68         return IgnoreObject;
     69        return ariaRoleAttribute() != UnknownRole ? DefaultBehavior : IgnoreObject;
    6970
    7071    // Include all list items, regardless they have or not inline children
  • trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp

    r200222 r200240  
    533533        return ATK_ROLE_ENTRY;
    534534    case StaticTextRole:
     535#if ATK_CHECK_VERSION(2, 15, 2)
     536        return ATK_ROLE_STATIC;
     537#else
    535538        return ATK_ROLE_TEXT;
     539#endif
    536540    case OutlineRole:
    537541    case TreeRole:
Note: See TracChangeset for help on using the changeset viewer.