Changeset 169631 in webkit


Ignore:
Timestamp:
Jun 5, 2014 4:53:17 PM (10 years ago)
Author:
jdiggs@igalia.com
Message:

AX: [ATK] Children of tables and lists with role='presentation' should each be exposed as if they were div elements
https://bugs.webkit.org/show_bug.cgi?id=133133

Reviewed by Chris Fleizach.

Source/WebCore:
When a table or list has role='presentation', accessibility is "ignored"
for that element, but not for the required children. The default roles
for the children (CellRole and ListItemRole) do not make sense without
the parent, therefore map them to DivRole in ATK if they inherit the
presentational role.

Test: accessibility/aria-inherits-presentational.html

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityObject::inheritsPresentationalRole):

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::inheritsPresentationalRole):

  • accessibility/AccessibilityRenderObject.h:
  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(atkRole):

LayoutTests:
Added a new test with platform-specific expectations due to differences
in accessible hierarchies.

  • accessibility/aria-inherits-presentational.html: Added.
  • platform/gtk/accessibility/aria-inherits-presentational-expected.txt: Added.
  • platform/mac/accessibility/aria-inherits-presentational-expected.txt: Added.
Location:
trunk
Files:
3 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r169629 r169631  
     12014-06-05  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        AX: [ATK] Children of tables and lists with role='presentation' should each be exposed as if they were div elements
     4        https://bugs.webkit.org/show_bug.cgi?id=133133
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Added a new test with platform-specific expectations due to differences
     9        in accessible hierarchies.
     10
     11        * accessibility/aria-inherits-presentational.html: Added.
     12        * platform/gtk/accessibility/aria-inherits-presentational-expected.txt: Added.
     13        * platform/mac/accessibility/aria-inherits-presentational-expected.txt: Added.
     14
    1152014-06-05  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
    216
  • trunk/Source/WebCore/ChangeLog

    r169630 r169631  
     12014-06-05  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        AX: [ATK] Children of tables and lists with role='presentation' should each be exposed as if they were div elements
     4        https://bugs.webkit.org/show_bug.cgi?id=133133
     5
     6        Reviewed by Chris Fleizach.
     7
     8        When a table or list has role='presentation', accessibility is "ignored"
     9        for that element, but not for the required children. The default roles
     10        for the children (CellRole and ListItemRole) do not make sense without
     11        the parent, therefore map them to DivRole in ATK if they inherit the
     12        presentational role.
     13
     14        Test: accessibility/aria-inherits-presentational.html
     15
     16        * accessibility/AccessibilityObject.h:
     17        (WebCore::AccessibilityObject::inheritsPresentationalRole):
     18        * accessibility/AccessibilityRenderObject.cpp:
     19        (WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
     20        * accessibility/AccessibilityRenderObject.h:
     21        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
     22        (atkRole):
     23
    1242014-06-05  Brent Fulgham  <bfulgham@apple.com>
    225
  • trunk/Source/WebCore/accessibility/AccessibilityObject.h

    r168427 r169631  
    644644    virtual bool isPresentationalChildOfAriaRole() const { return false; }
    645645    virtual bool ariaRoleHasPresentationalChildren() const { return false; }
     646    virtual bool inheritsPresentationalRole() const { return false; }
    646647
    647648    // Accessibility Text
  • trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp

    r168432 r169631  
    26522652    // http://www.w3.org/WAI/PF/aria/complete#presentation
    26532653    static NeverDestroyed<HashSet<QualifiedName>> listItemParents;
     2654    static NeverDestroyed<HashSet<QualifiedName>> tableCellParents;
    26542655
    26552656    HashSet<QualifiedName>* possibleParentTagNames = 0;
     
    26632664        }
    26642665        possibleParentTagNames = &listItemParents.get();
     2666        break;
     2667    case CellRole:
     2668        if (tableCellParents.get().isEmpty())
     2669            tableCellParents.get().add(tableTag);
     2670        possibleParentTagNames = &tableCellParents.get();
    26652671        break;
    26662672    default:
  • trunk/Source/WebCore/accessibility/AccessibilityRenderObject.h

    r168042 r169631  
    284284    virtual bool ariaLiveRegionBusy() const override;
    285285
    286     bool inheritsPresentationalRole() const;
     286    virtual bool inheritsPresentationalRole() const override;
    287287
    288288#if ENABLE(MATHML)
  • trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp

    r167011 r169631  
    682682    case ColumnHeaderRole: // Column headers are cells after all.
    683683    case CellRole:
    684         return ATK_ROLE_TABLE_CELL;
     684        return coreObject->inheritsPresentationalRole() ? ATK_ROLE_SECTION : ATK_ROLE_TABLE_CELL;
    685685    case LinkRole:
    686686    case WebCoreLinkRole:
     
    705705        return ATK_ROLE_LIST;
    706706    case ListItemRole:
     707        return coreObject->inheritsPresentationalRole() ? ATK_ROLE_SECTION : ATK_ROLE_LIST_ITEM;
    707708    case ListBoxOptionRole:
    708709        return ATK_ROLE_LIST_ITEM;
Note: See TracChangeset for help on using the changeset viewer.