Commit 2f00155d authored by Xiaohui Chen's avatar Xiaohui Chen Committed by Commit Bot

assistant: notify screen reader to read query result

Bug: 113734839
Test: "tell me a joke" reads the joke out through screen reader
Change-Id: I92832ff6e7eea298b59aec660763b0d1a4854eef
Reviewed-on: https://chromium-review.googlesource.com/1217751
Commit-Queue: Xiaohui Chen <xiaohuic@chromium.org>
Reviewed-by: default avatarMuyuan Li <muyuanli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590541}
parent b64bf310
......@@ -4,6 +4,8 @@
#include "ash/assistant/ui/main_stage/ui_element_container_view.h"
#include <string>
#include "ash/assistant/assistant_controller.h"
#include "ash/assistant/assistant_interaction_controller.h"
#include "ash/assistant/model/assistant_response.h"
......@@ -363,6 +365,11 @@ void UiElementContainerView::OnAllUiElementsAdded() {
kUiElementAnimationFadeInDelay),
CreateOpacityElement(1.f, kUiElementAnimationFadeInDuration)));
}
// Let screen reader read the query result.
// NOTE: this won't read webview result, which will be triggered with HTML
// ARIA.
NotifyAccessibilityEvent(ax::mojom::Event::kAlert, true);
}
bool UiElementContainerView::OnAllUiElementsExitAnimationEnded(
......
......@@ -7,6 +7,7 @@
#include <deque>
#include <memory>
#include <utility>
#include <vector>
#include "ash/assistant/model/assistant_interaction_model_observer.h"
......
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