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

Unified Diff: third_party/WebKit/Source/modules/accessibility/AXMenuListOption.cpp

Issue 1561533003: AXMenuListOption should respect role attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/modules/accessibility/AXMenuListOption.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 79b691f1f1450eaeb933717b28af9b6846cd699a..f8b18a716f713697c9a8bce941f6c15ddedd977b 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXMenuListOption.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXMenuListOption.cpp
@@ -49,6 +49,18 @@ void AXMenuListOption::detach()
AXMockObject::detach();
}
+AccessibilityRole AXMenuListOption::roleValue() const
+{
+ const AtomicString& ariaRole = getAttribute(roleAttr);
+ if (ariaRole.isEmpty())
+ return MenuListOptionRole;
+
+ AccessibilityRole role = ariaRoleToWebCoreRole(ariaRole);
+ if (role)
+ return role;
+ return MenuListOptionRole;
+}
+
Element* AXMenuListOption::actionElement() const
{
return m_element;
« no previous file with comments | « third_party/WebKit/Source/modules/accessibility/AXMenuListOption.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698