Index: content/renderer/accessibility/blink_ax_enum_conversion.cc |
diff --git a/content/renderer/accessibility/blink_ax_enum_conversion.cc b/content/renderer/accessibility/blink_ax_enum_conversion.cc |
index f3a159d02ae34a93f1d9f0ecd39cd3af7ef5bcac..5e75b999523f68fe5b190fb5f1ca50134fefa85e 100644 |
--- a/content/renderer/accessibility/blink_ax_enum_conversion.cc |
+++ b/content/renderer/accessibility/blink_ax_enum_conversion.cc |
@@ -13,8 +13,13 @@ uint32 AXStateFromBlink(const blink::WebAXObject& o) { |
if (o.isChecked()) |
state |= (1 << ui::AX_STATE_CHECKED); |
- if (o.isCollapsed()) |
- state |= (1 << ui::AX_STATE_COLLAPSED); |
+ blink::WebAXExpanded expanded = o.isExpanded(); |
+ if (expanded) { |
+ if (expanded == blink::WebAXExpandedCollapsed) |
+ state |= (1 << ui::AX_STATE_COLLAPSED); |
+ else if (expanded == blink::WebAXExpandedExpanded) |
+ state |= (1 << ui::AX_STATE_EXPANDED); |
+ } |
if (o.canSetFocusAttribute()) |
state |= (1 << ui::AX_STATE_FOCUSABLE); |
@@ -23,11 +28,8 @@ uint32 AXStateFromBlink(const blink::WebAXObject& o) { |
state |= (1 << ui::AX_STATE_FOCUSED); |
if (o.role() == blink::WebAXRolePopUpButton || |
- o.ariaHasPopup()) { |
+ o.ariaHasPopup()) |
state |= (1 << ui::AX_STATE_HASPOPUP); |
- if (!o.isCollapsed()) |
- state |= (1 << ui::AX_STATE_EXPANDED); |
- } |
if (o.isHovered()) |
state |= (1 << ui::AX_STATE_HOVERED); |