Commit 114ef409 authored by Randy Rossi's avatar Randy Rossi Committed by Commit Bot

Fix ScrollToMakeVisible accessibility action

The ConvertToAXActionData() function in automation_internal_api.cc
was leaving the horizontal_scroll_alignment and vertical_scroll_alignment
fields in AXActionData to their default value of
ax::mojom::ScrollAlignment::kNone.  When the target was a blink object,
web_ax_object.cc would then use 'no scroll' values for both hidden
and partially hidden cases for its converted blink::ScrollAlignment
struct.  This was causing the SCROLLTOMAKEVISIBLE action to not scroll
the view to make the object visible.

Bug: 1015144
Test: Manual test with display assistant screen reader
Change-Id: I20dcd48587704ba42a33c7d27fb81c7d8a8a4ec6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1864824Reviewed-by: default avatarDavid Tseng <dtseng@chromium.org>
Commit-Queue: Randy Rossi <rmrossi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707377}
parent 3492eabe
......@@ -391,6 +391,10 @@ AutomationInternalPerformActionFunction::ConvertToAXActionData(
break;
case api::automation::ACTION_TYPE_SCROLLTOMAKEVISIBLE:
action->action = ax::mojom::Action::kScrollToMakeVisible;
action->horizontal_scroll_alignment =
ax::mojom::ScrollAlignment::kScrollAlignmentCenter;
action->vertical_scroll_alignment =
ax::mojom::ScrollAlignment::kScrollAlignmentCenter;
break;
case api::automation::ACTION_TYPE_SCROLLBACKWARD:
action->action = ax::mojom::Action::kScrollBackward;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment