Commit 1a49710c authored by Aaron Leventhal's avatar Aaron Leventhal Committed by Commit Bot

Accessible name for nameless window selector textfield

This is split out from the CL to test all widgets and views for nameless
focusable objects. See crrev.com/c/951933.

Bug: 819350
Change-Id: I4eb266d06d6468657b2cf00873a601efb976166c
Reviewed-on: https://chromium-review.googlesource.com/952327Reviewed-by: default avatarRobert Flack <flackr@chromium.org>
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542245}
parent df21c223
......@@ -535,6 +535,11 @@ This file contains the strings for ash.
No recent items
</message>
<!-- Window Selector -->
<message name="IDS_ASH_WINDOW_SELECTOR_INPUT_FILTER_ACCESSIBLE_NAME" desc="The accessible name for the window selector filter search input box.">
Type the name of an app or document
</message>
<!-- Status tray charging strings. -->
<message name="IDS_ASH_STATUS_TRAY_LOW_POWER_CHARGER_TITLE" desc="The title of a notification indicating that a low-current USB charger has been connected.">
Low-power charger connected
......
......@@ -18,6 +18,7 @@
#include "ash/screen_util.h"
#include "ash/shelf/shelf.h"
#include "ash/shell.h"
#include "ash/strings/grit/ash_strings.h"
#include "ash/wm/mru_window_tracker.h"
#include "ash/wm/overview/overview_utils.h"
#include "ash/wm/overview/overview_window_drag_controller.h"
......@@ -37,6 +38,8 @@
#include "base/metrics/user_metrics.h"
#include "base/threading/thread_task_runner_handle.h"
#include "components/vector_icons/vector_icons.h"
#include "ui/accessibility/ax_enums.mojom.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/scoped_layer_animation_settings.h"
#include "ui/display/screen.h"
......@@ -45,6 +48,7 @@
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/gfx/skia_util.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/border.h"
#include "ui/views/controls/image_view.h"
#include "ui/views/controls/textfield/textfield.h"
......@@ -194,6 +198,8 @@ views::Widget* CreateTextFilter(views::TextfieldController* controller,
textfield->SetTextColor(IsNewOverviewUi() ? kTextFilterTextColor
: kOldTextFilterTextColor);
textfield->SetFontList(font_list);
textfield->SetAccessibleName(l10n_util::GetStringUTF16(
IDS_ASH_WINDOW_SELECTOR_INPUT_FILTER_ACCESSIBLE_NAME));
views::ImageView* image_view = new views::ImageView();
image_view->SetImage(image);
......
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