Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXObject.cpp

Issue 1939303002: Enable accessible name of a control to include multiple <label> elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update expectations Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 AXObjectSet visited; 741 AXObjectSet visited;
742 AXNameFrom tmpNameFrom; 742 AXNameFrom tmpNameFrom;
743 AXRelatedObjectVector tmpRelatedObjects; 743 AXRelatedObjectVector tmpRelatedObjects;
744 String text = textAlternative(false, false, visited, tmpNameFrom, &tmpRelate dObjects, nameSources); 744 String text = textAlternative(false, false, visited, tmpNameFrom, &tmpRelate dObjects, nameSources);
745 text = text.simplifyWhiteSpace(isHTMLSpace<UChar>); 745 text = text.simplifyWhiteSpace(isHTMLSpace<UChar>);
746 return text; 746 return text;
747 } 747 }
748 748
749 String AXObject::recursiveTextAlternative(const AXObject& axObj, bool inAriaLabe lledByTraversal, AXObjectSet& visited) 749 String AXObject::recursiveTextAlternative(const AXObject& axObj, bool inAriaLabe lledByTraversal, AXObjectSet& visited)
750 { 750 {
751 if (visited.contains(&axObj) && !inAriaLabelledByTraversal)
752 return String();
753
751 AXNameFrom tmpNameFrom; 754 AXNameFrom tmpNameFrom;
752 return axObj.textAlternative(true, inAriaLabelledByTraversal, visited, tmpNa meFrom, nullptr, nullptr); 755 return axObj.textAlternative(true, inAriaLabelledByTraversal, visited, tmpNa meFrom, nullptr, nullptr);
753 } 756 }
754 757
755 bool AXObject::isHiddenForTextAlternativeCalculation() const 758 bool AXObject::isHiddenForTextAlternativeCalculation() const
756 { 759 {
757 if (equalIgnoringCase(getAttribute(aria_hiddenAttr), "false")) 760 if (equalIgnoringCase(getAttribute(aria_hiddenAttr), "false"))
758 return false; 761 return false;
759 762
760 if (getLayoutObject()) 763 if (getLayoutObject())
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
1731 1734
1732 DEFINE_TRACE(AXObject) 1735 DEFINE_TRACE(AXObject)
1733 { 1736 {
1734 visitor->trace(m_children); 1737 visitor->trace(m_children);
1735 visitor->trace(m_parent); 1738 visitor->trace(m_parent);
1736 visitor->trace(m_cachedLiveRegionRoot); 1739 visitor->trace(m_cachedLiveRegionRoot);
1737 visitor->trace(m_axObjectCache); 1740 visitor->trace(m_axObjectCache);
1738 } 1741 }
1739 1742
1740 } // namespace blink 1743 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698