Chromium Code Reviews| Index: Source/core/accessibility/AXRenderObject.cpp |
| diff --git a/Source/core/accessibility/AXRenderObject.cpp b/Source/core/accessibility/AXRenderObject.cpp |
| index 05c40804f5ff5fb854cd1445ab2f7325e8b6ff48..f1630c14bc0cad25f289b19cd43a807263ca7af3 100644 |
| --- a/Source/core/accessibility/AXRenderObject.cpp |
| +++ b/Source/core/accessibility/AXRenderObject.cpp |
| @@ -598,7 +598,7 @@ bool AXRenderObject::computeAccessibilityIsIgnored() const |
| if (roleValue() == IgnoredRole) |
| return true; |
| - if (roleValue() == PresentationalRole || inheritsPresentationalRole()) |
| + if ((roleValue() == NoneRole || roleValue() == PresentationalRole) || inheritsNoneOrPresentationalRole()) |
| return true; |
| // An ARIA tree can only have tree items and static text as children. |
| @@ -996,7 +996,7 @@ bool AXRenderObject::ariaHasPopup() const |
| return elementAttributeValue(aria_haspopupAttr); |
| } |
| -bool AXRenderObject::ariaRoleHasPresentationalChildren() const |
| +bool AXRenderObject::ariaRoleHasNoneOrPresentationalChildren() const |
|
shreeramk
2014/09/20 12:39:36
Same query as AXObject.h
|
| { |
| switch (m_ariaRole) { |
| case ButtonRole: |
| @@ -1011,11 +1011,11 @@ bool AXRenderObject::ariaRoleHasPresentationalChildren() const |
| } |
| } |
| -bool AXRenderObject::isPresentationalChildOfAriaRole() const |
| +bool AXRenderObject::isNoneOrPresentationalChildOfAriaRole() const |
| { |
| // Walk the parent chain looking for a parent that has presentational children |
| AXObject* parent; |
| - for (parent = parentObject(); parent && !parent->ariaRoleHasPresentationalChildren(); parent = parent->parentObject()) |
| + for (parent = parentObject(); parent && !parent->ariaRoleHasNoneOrPresentationalChildren(); parent = parent->parentObject()) |
| { } |
| return parent; |
| @@ -2274,14 +2274,14 @@ bool AXRenderObject::elementAttributeValue(const QualifiedName& attributeName) c |
| return equalIgnoringCase(getAttribute(attributeName), "true"); |
| } |
| -bool AXRenderObject::inheritsPresentationalRole() const |
| +bool AXRenderObject::inheritsNoneOrPresentationalRole() const |
|
shreeramk
2014/09/20 12:39:36
Same query as AXRenderObject.h
|
| { |
| - // ARIA states if an item can get focus, it should not be presentational. |
| + // ARIA states if an item can get focus, it should not be none or presentational. |
| if (canSetFocusAttribute()) |
| return false; |
| - // ARIA spec says that when a parent object is presentational, and it has required child elements, |
| - // those child elements are also presentational. For example, <li> becomes presentational from <ul>. |
| + // ARIA spec says that when a parent object is none or presentational, and it has required child elements, |
| + // those child elements are also none or presentational. For example, <li> becomes presentational from <ul>. |
| // http://www.w3.org/WAI/PF/aria/complete#presentation |
| if (roleValue() != ListItemRole && roleValue() != ListMarkerRole) |
| return false; |
| @@ -2296,7 +2296,7 @@ bool AXRenderObject::inheritsPresentationalRole() const |
| QualifiedName tagName = toElement(elementNode)->tagQName(); |
| if (tagName == ulTag || tagName == olTag || tagName == dlTag) |
| - return parent->roleValue() == PresentationalRole; |
| + return (parent->roleValue() == NoneRole || parent->roleValue() == PresentationalRole); |
| return false; |
| } |