Changeset 193841 in webkit


Ignore:
Timestamp:
Dec 9, 2015 10:24:35 AM (8 years ago)
Author:
jdiggs@igalia.com
Message:

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.

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.
Location:
trunk
Files:
4 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r193838 r193841  
     12015-12-09  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        AX: [GTK] Anonymous render block flow elements should be exposed as ATK_ROLE_SECTION; not ATK_ROLE_PANEL
     4        https://bugs.webkit.org/show_bug.cgi?id=152070
     5
     6        Reviewed by Mario Sanchez Prada.
     7
     8        * platform/gtk/accessibility/deleting-iframe-destroys-axcache-expected.txt: Added.
     9        * platform/gtk/accessibility/gtk/media-controls-panel-title-expected.txt: Added.
     10        * platform/gtk/accessibility/gtk/replaced-objects-in-anonymous-blocks-expected.txt: Added.
     11        * platform/gtk/accessibility/image-link-expected.txt: Updated
     12        * platform/gtk/accessibility/image-with-alt-and-map-expected.txt: Updated.
     13        * platform/gtk/accessibility/lists-expected.txt: Updated.
     14        * platform/gtk/accessibility/media-emits-object-replacement-expected.txt: Updated.
     15
    1162015-12-09  Ryan Haddad  <ryanhaddad@apple.com>
    217
  • trunk/LayoutTests/platform/gtk/accessibility/image-link-expected.txt

    r189467 r193841  
    55
    66AXRole: AXLink
    7 AXParent: AXGroup
     7AXParent: AXSection
    88AXChildren: 1
    99AXPosition: { 8.000000, 98.000000 }
  • trunk/LayoutTests/platform/gtk/accessibility/image-with-alt-and-map-expected.txt

    r189467 r193841  
    77
    88AXRole: AXWebArea AXTitle:  AXDescription:
    9   AXRole: AXGroup AXTitle:  AXDescription:
     9  AXRole: AXSection AXTitle:  AXDescription:
    1010    AXRole: AXImageMap AXTitle: foo bar baz AXDescription: foo bar baz
    1111      AXRole: AXLink AXTitle: foo AXDescription: foo
  • trunk/LayoutTests/platform/gtk/accessibility/lists-expected.txt

    r189467 r193841  
    6666AXPlatformAttributes: tag:dl, toolkit:WebKitGtk
    6767------------
    68 AXRole: AXGroup
     68AXRole: AXSection
    6969AXParent: AXWebArea
    7070AXChildren: 0
     
    8383AXRequired: 0
    8484AXChecked: 0
    85 AXPlatformAttributes: computed-role:group, toolkit:WebKitGtk
     85AXPlatformAttributes: toolkit:WebKitGtk
    8686------------
    8787
  • trunk/LayoutTests/platform/gtk/accessibility/media-emits-object-replacement-expected.txt

    r193831 r193841  
    1010                AXRole: AXSlider
    1111                AXRole: AXTimer AXValue: 00:00
    12     AXRole: AXGroup AXValue: <\n>
     12    AXRole: AXSection AXValue: <\n>
    1313    AXRole: AXSection AXValue: a <obj> b
    1414        AXRole: AXAudio
  • trunk/Source/WebCore/ChangeLog

    r193840 r193841  
     12015-12-09  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        AX: [GTK] Anonymous render block flow elements should be exposed as ATK_ROLE_SECTION; not ATK_ROLE_PANEL
     4        https://bugs.webkit.org/show_bug.cgi?id=152070
     5
     6        Reviewed by Mario Sanchez Prada.
     7
     8        Map the element to WebCore AccessibilityRole DivRole for GTK. This is being
     9        done in the shared layer rather than in the platform layer because we want all
     10        subsequent logic to treat anonymous render block flow elements as divs.
     11
     12        No new tests. We already have sufficient test coverage. The expectations
     13        been updated accordingly.
     14
     15        * accessibility/AccessibilityRenderObject.cpp:
     16        (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
     17
    1182015-12-09  Keith Rollin  <krollin@apple.com>
    219
  • trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp

    r192173 r193841  
    26992699    if (node && node->hasTagName(footerTag) && !isDescendantOfElementType(articleTag) && !isDescendantOfElementType(sectionTag))
    27002700        return FooterRole;
    2701 
    2702     if (m_renderer->isRenderBlockFlow())
    2703         return GroupRole;
    27042701   
    27052702    // 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.
    27062703    if (supportsARIAAttributes() || canSetFocusAttribute())
    27072704        return GroupRole;
     2705
     2706    if (m_renderer->isRenderBlockFlow()) {
     2707#if PLATFORM(GTK)
     2708        // For ATK, GroupRole maps to ATK_ROLE_PANEL. Panels are most commonly found (and hence
     2709        // expected) in UI elements; not text blocks.
     2710        return m_renderer->isAnonymousBlock() ? DivRole : GroupRole;
     2711#else
     2712        return GroupRole;
     2713#endif
     2714    }
    27082715   
    27092716    // InlineRole is the final fallback before assigning UnknownRole to an object. It makes it
Note: See TracChangeset for help on using the changeset viewer.