Commit 04e464e8 authored by Wei Li's avatar Wei Li Committed by Commit Bot

Change expand button to be focusable by default

Prior to this change, expand button inherits ToggleImageButton's default
focus behavior which is ACCESSIBLE_ONLY. This button should be focusable
by default as user can navigate/toggle the button using a keyboard.

Bug: 1001103
Change-Id: Ic698f3865ddcb8cc66b962292831c3d5a73fc29f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2510729Reviewed-by: default avatarMarijn Kruisselbrink <mek@chromium.org>
Commit-Queue: Wei Li <weili@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823662}
parent ae4c476e
......@@ -39,6 +39,7 @@
#include "ui/views/controls/scroll_view.h"
#include "ui/views/controls/table/table_view.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/style/platform_style.h"
namespace {
......@@ -167,6 +168,9 @@ class CollapsibleListView : public views::View {
l10n_util::GetStringUTF16(IDS_NATIVE_FILE_SYSTEM_USAGE_EXPAND));
button->SetToggledTooltipText(
l10n_util::GetStringUTF16(IDS_NATIVE_FILE_SYSTEM_USAGE_COLLAPSE));
// TODO(weili): remove this once ToggleImageButton has the default platform
// focus behavior.
button->SetFocusBehavior(views::PlatformStyle::DefaultFocusBehavior());
expand_collapse_button_ = label_container->AddChildView(std::move(button));
if (model->RowCount() < 3)
expand_collapse_button_->SetVisible(false);
......
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