Changeset 183111 in webkit


Ignore:
Timestamp:
Apr 22, 2015 10:36:44 AM (9 years ago)
Author:
commit-queue@webkit.org
Message:

AX: WebKit does not expose text fields inside tree views.
https://bugs.webkit.org/show_bug.cgi?id=142196

Patch by Nan Wang <nanwang1101@yahoo.com> on 2015-04-22
Reviewed by Chris Fleizach.

Source/WebCore:

The problem is that any object in a tree which is not a static text
or treeitem will be ignored. Fixed it by exposing the children of treeitem.

Test: accessibility/treeitem-child-exposed.html

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::isAllowedChildOfTree):

LayoutTests:

Tests for treeitem’s children’s accessibility.
Also fixed the search predicate test for treeitem,
the static text is the second child of treeitem and
list marker is the first child.

  • accessibility/treeitem-child-exposed-expected.txt: Added.
  • accessibility/treeitem-child-exposed.html: Added.
  • platform/mac/accessibility/search-predicate-expected.txt:
  • platform/mac/accessibility/search-predicate.html:
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r183107 r183111  
     12015-04-22  Nan Wang  <nanwang1101@yahoo.com>
     2
     3        AX: WebKit does not expose text fields inside tree views.
     4        https://bugs.webkit.org/show_bug.cgi?id=142196
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Tests for treeitem’s children’s accessibility.
     9        Also fixed the search predicate test for treeitem,
     10        the static text is the second child of treeitem and
     11        list marker is the first child.
     12
     13        * accessibility/treeitem-child-exposed-expected.txt: Added.
     14        * accessibility/treeitem-child-exposed.html: Added.
     15        * platform/mac/accessibility/search-predicate-expected.txt:
     16        * platform/mac/accessibility/search-predicate.html:
     17
    1182015-04-22  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
    219
  • trunk/LayoutTests/platform/mac/accessibility/search-predicate-expected.txt

    r164685 r183111  
    9898PASS resultElement.stringAttributeValue('AXARIALive') is 'polite'
    9999PASS resultElement.role is 'AXRole: AXOutline'
    100 PASS resultElement.childAtIndex(0).childAtIndex(0).stringValue is 'AXValue: tree item'
     100PASS resultElement.childAtIndex(0).childAtIndex(1).stringValue is 'AXValue: tree item'
    101101PASS resultElement.role is 'AXRole: AXStaticText'
    102102PASS resultElement.stringValue is 'AXValue: first blockquote level 1'
  • trunk/LayoutTests/platform/mac/accessibility/search-predicate.html

    r164685 r183111  
    216216        resultElement = containerElement.uiElementForSearchPredicate(startElement, true, "AXOutlineSearchKey", "", false);
    217217        shouldBe("resultElement.role", "'AXRole: AXOutline'");
    218         shouldBe("resultElement.childAtIndex(0).childAtIndex(0).stringValue", "'AXValue: tree item'");
     218        shouldBe("resultElement.childAtIndex(0).childAtIndex(1).stringValue", "'AXValue: tree item'");
    219219       
    220220        // Plain text.
  • trunk/Source/WebCore/ChangeLog

    r183107 r183111  
     12015-04-22  Nan Wang  <nanwang1101@yahoo.com>
     2
     3        AX: WebKit does not expose text fields inside tree views.
     4        https://bugs.webkit.org/show_bug.cgi?id=142196
     5
     6        Reviewed by Chris Fleizach.
     7
     8        The problem is that any object in a tree which is not a static text
     9        or treeitem will be ignored. Fixed it by exposing the children of treeitem.
     10
     11        Test: accessibility/treeitem-child-exposed.html
     12
     13        * accessibility/AccessibilityRenderObject.cpp:
     14        (WebCore::AccessibilityRenderObject::isAllowedChildOfTree):
     15
    1162015-04-22  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
    217
  • trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp

    r180621 r183111  
    11121112    AccessibilityObject* axObj = parentObject();
    11131113    bool isInTree = false;
     1114    bool isTreeItemDescendant = false;
    11141115    while (axObj) {
     1116        if (axObj->roleValue() == TreeItemRole)
     1117            isTreeItemDescendant = true;
    11151118        if (axObj->isTree()) {
    11161119            isInTree = true;
     
    11231126    if (isInTree) {
    11241127        AccessibilityRole role = roleValue();
    1125         if (role != TreeItemRole && role != StaticTextRole)
     1128        if (role != TreeItemRole && role != StaticTextRole && !isTreeItemDescendant)
    11261129            return false;
    11271130    }
Note: See TracChangeset for help on using the changeset viewer.