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

Unified Diff: ui/views/accessibility/ax_widget_obj_wrapper.cc

Issue 2008773002: Begin using ChromeVox Next to read tab and window titles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a bunch of tests. Created 4 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: ui/views/accessibility/ax_widget_obj_wrapper.cc
diff --git a/ui/views/accessibility/ax_widget_obj_wrapper.cc b/ui/views/accessibility/ax_widget_obj_wrapper.cc
index 628b82fac76137d73f46c4f9648485d52f618694..adba19f7a179694be3b97ba7fe659a5741b81ec1 100644
--- a/ui/views/accessibility/ax_widget_obj_wrapper.cc
+++ b/ui/views/accessibility/ax_widget_obj_wrapper.cc
@@ -4,10 +4,12 @@
#include "ui/views/accessibility/ax_widget_obj_wrapper.h"
+#include "base/strings/utf_string_conversions.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/views/accessibility/ax_aura_obj_cache.h"
#include "ui/views/accessibility/ax_aura_obj_wrapper.h"
#include "ui/views/widget/widget.h"
+#include "ui/views/widget/widget_delegate.h"
namespace views {
@@ -39,9 +41,12 @@ void AXWidgetObjWrapper::GetChildren(
void AXWidgetObjWrapper::Serialize(ui::AXNodeData* out_node_data) {
out_node_data->id = GetID();
- out_node_data->role = ui::AX_ROLE_CLIENT;
+ out_node_data->role = widget_->widget_delegate()->GetAccessibleWindowRole();
+ out_node_data->AddStringAttribute(
+ ui::AX_ATTR_NAME,
+ base::UTF16ToUTF8(
+ widget_->widget_delegate()->GetAccessibleWindowTitle()));
out_node_data->location = widget_->GetWindowBoundsInScreen();
- // TODO(dtseng): Set better states.
out_node_data->state = 0;
}

Powered by Google App Engine
This is Rietveld 408576698