Changeset 207647 in webkit
- Timestamp:
- Oct 20, 2016 6:15:21 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r207642 r207647 1 2016-10-20 Nan Wang <n_wang@apple.com> 2 3 AX: VoiceOver is not detecting ARIA treeview if it contains role="presentation" 4 https://bugs.webkit.org/show_bug.cgi?id=163763 5 6 Reviewed by Chris Fleizach. 7 8 * accessibility/mac/aria-tree-with-presentation-role-expected.txt: Added. 9 * accessibility/mac/aria-tree-with-presentation-role.html: Added. 10 1 11 2016-10-19 Myles C. Maxfield <mmaxfield@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r207644 r207647 1 2016-10-20 Nan Wang <n_wang@apple.com> 2 3 AX: VoiceOver is not detecting ARIA treeview if it contains role="presentation" 4 https://bugs.webkit.org/show_bug.cgi?id=163763 5 6 Reviewed by Chris Fleizach. 7 8 Test: accessibility/mac/aria-tree-with-presentation-role.html 9 10 Web authors sometimes use presentation role in the aria tree to hide elements. We should 11 consider this a valid case if they specify tree items and groups correctly. 12 13 * accessibility/AccessibilityNodeObject.cpp: 14 (WebCore::AccessibilityNodeObject::hierarchicalLevel): 15 * accessibility/AccessibilityTree.cpp: 16 (WebCore::AccessibilityTree::nodeHasTreeItemChild): 17 (WebCore::AccessibilityTree::isTreeValid): 18 * accessibility/AccessibilityTree.h: 19 1 20 2016-10-20 Myles C. Maxfield <mmaxfield@apple.com> 2 21 -
trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp
r207429 r207647 1616 1616 unsigned level = 1; 1617 1617 for (AccessibilityObject* parent = parentObject(); parent; parent = parent->parentObject()) { 1618 AccessibilityRole parentRole = parent-> roleValue();1618 AccessibilityRole parentRole = parent->ariaRoleAttribute(); 1619 1619 if (parentRole == GroupRole) 1620 1620 level++; -
trunk/Source/WebCore/accessibility/AccessibilityTree.cpp
r191002 r207647 68 68 } 69 69 70 bool AccessibilityTree::nodeHasTreeItemChild(Node& node) const 71 { 72 for (auto* child = node.firstChild(); child; child = child->nextSibling()) { 73 if (nodeHasRole(child, "treeitem")) 74 return true; 75 } 76 return false; 77 } 78 70 79 bool AccessibilityTree::isTreeValid() const 71 80 { … … 88 97 if (nodeHasRole(child, "treeitem")) 89 98 continue; 99 if (nodeHasRole(child, "presentation")) { 100 if (!nodeHasTreeItemChild(*child)) 101 return false; 102 continue; 103 } 90 104 if (!nodeHasRole(child, "group")) 91 105 return false; -
trunk/Source/WebCore/accessibility/AccessibilityTree.h
r197563 r207647 45 45 AccessibilityRole determineAccessibilityRole() override; 46 46 bool isTreeValid() const; 47 bool nodeHasTreeItemChild(Node&) const; 47 48 }; 48 49
Note: See TracChangeset
for help on using the changeset viewer.