| Index: third_party/WebKit/Source/modules/accessibility/AXMenuListOption.cpp
|
| diff --git a/third_party/WebKit/Source/modules/accessibility/AXMenuListOption.cpp b/third_party/WebKit/Source/modules/accessibility/AXMenuListOption.cpp
|
| index cf362a18ea410f477e09df6fe3612e0af72b8dab..76e9b9305f995ad56067dc9f24ae38cfcc80dc12 100644
|
| --- a/third_party/WebKit/Source/modules/accessibility/AXMenuListOption.cpp
|
| +++ b/third_party/WebKit/Source/modules/accessibility/AXMenuListOption.cpp
|
| @@ -119,9 +119,30 @@ LayoutRect AXMenuListOption::elementRect() const
|
| return grandparent->elementRect();
|
| }
|
|
|
| -String AXMenuListOption::stringValue() const
|
| +String AXMenuListOption::textAlternative(bool recursive, bool inAriaLabelledByTraversal, AXObjectSet& visited, AXNameFrom& nameFrom, AXRelatedObjectVector* relatedObjects, NameSources* nameSources) const
|
| {
|
| - return m_element ? m_element->displayLabel() : String();
|
| + if (!m_element)
|
| + return String();
|
| +
|
| + const AtomicString& ariaLabel = getAttribute(aria_labelAttr);
|
| + if (!ariaLabel.isEmpty()) {
|
| + nameFrom = AXNameFromAttribute;
|
| + if (nameSources) {
|
| + nameSources->append(NameSource(false, aria_labelAttr));
|
| + nameSources->last().type = nameFrom;
|
| + nameSources->last().text = ariaLabel;
|
| + }
|
| + return ariaLabel;
|
| + }
|
| +
|
| + nameFrom = AXNameFromContents;
|
| + if (nameSources) {
|
| + nameSources->append(NameSource(false));
|
| + nameSources->last().type = nameFrom;
|
| + nameSources->last().text = m_element->displayLabel();
|
| + }
|
| +
|
| + return m_element->displayLabel();
|
| }
|
|
|
| DEFINE_TRACE(AXMenuListOption)
|
|
|