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

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

Issue 2893683002: Selection follows focus/activedescendant in single selection containers (Closed)
Patch Set: Last test to fix we hope Created 3 years, 7 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
Index: third_party/WebKit/Source/modules/accessibility/AXListBoxOption.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXListBoxOption.cpp b/third_party/WebKit/Source/modules/accessibility/AXListBoxOption.cpp
index 9a5ee68e9f2db1f6e9603ab0fd1599a957726095..76e28f186169004c50b648ce86ecc4b483ade24c 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXListBoxOption.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXListBoxOption.cpp
@@ -116,6 +116,10 @@ bool AXListBoxOption::ComputeAccessibilityIsIgnored(
return false;
}
+bool AXListBoxOption::CanSetFocusAttribute() const {
+ return CanSetSelectedAttribute();
+}
+
bool AXListBoxOption::CanSetSelectedAttribute() const {
if (!isHTMLOptionElement(GetNode()))
return false;
@@ -124,10 +128,10 @@ bool AXListBoxOption::CanSetSelectedAttribute() const {
return false;
HTMLSelectElement* select_element = ListBoxOptionParentNode();
- if (select_element && select_element->IsDisabledFormControl())
+ if (!select_element || select_element->IsDisabledFormControl())
return false;
- return true;
+ return IsEnabled();
}
String AXListBoxOption::TextAlternative(bool recursive,

Powered by Google App Engine
This is Rietveld 408576698