Commit e0328f8f authored by Aga Wronska's avatar Aga Wronska Committed by Commit Bot

Make parent access view labels focusable only in accessibility mode

Test: ParentAccessViewTest
Bug: 999384, 999391
Change-Id: I22f5a4bf109401822bc4492efd55f0e4d77630d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1793636Reviewed-by: default avatarToni Baržić <tbarzic@chromium.org>
Commit-Queue: Aga Wronska <agawronska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695208}
parent 8c21c9fd
...@@ -617,7 +617,7 @@ ParentAccessView::ParentAccessView(const AccountId& account_id, ...@@ -617,7 +617,7 @@ ParentAccessView::ParentAccessView(const AccountId& account_id,
label->SetSubpixelRenderingEnabled(false); label->SetSubpixelRenderingEnabled(false);
label->SetAutoColorReadabilityEnabled(false); label->SetAutoColorReadabilityEnabled(false);
label->SetEnabledColor(kTextColor); label->SetEnabledColor(kTextColor);
label->SetFocusBehavior(FocusBehavior::ALWAYS); label->SetFocusBehavior(FocusBehavior::ACCESSIBLE_ONLY);
}; };
// Main view title. // Main view title.
......
...@@ -506,12 +506,6 @@ TEST_F(ParentAccessViewTest, TabKeyTraversal) { ...@@ -506,12 +506,6 @@ TEST_F(ParentAccessViewTest, TabKeyTraversal) {
generator->PressKey(ui::KeyboardCode::VKEY_TAB, ui::EF_NONE); generator->PressKey(ui::KeyboardCode::VKEY_TAB, ui::EF_NONE);
EXPECT_TRUE(test_api.back_button()->HasFocus()); EXPECT_TRUE(test_api.back_button()->HasFocus());
generator->PressKey(ui::KeyboardCode::VKEY_TAB, ui::EF_NONE);
EXPECT_TRUE(test_api.title_label()->HasFocus());
generator->PressKey(ui::KeyboardCode::VKEY_TAB, ui::EF_NONE);
EXPECT_TRUE(test_api.description_label()->HasFocus());
generator->PressKey(ui::KeyboardCode::VKEY_TAB, ui::EF_NONE); generator->PressKey(ui::KeyboardCode::VKEY_TAB, ui::EF_NONE);
EXPECT_TRUE(HasFocusInAnyChildView(test_api.access_code_view())); EXPECT_TRUE(HasFocusInAnyChildView(test_api.access_code_view()));
...@@ -538,12 +532,6 @@ TEST_F(ParentAccessViewTest, BackwardTabKeyTraversal) { ...@@ -538,12 +532,6 @@ TEST_F(ParentAccessViewTest, BackwardTabKeyTraversal) {
generator->PressKey(ui::KeyboardCode::VKEY_TAB, ui::EF_SHIFT_DOWN); generator->PressKey(ui::KeyboardCode::VKEY_TAB, ui::EF_SHIFT_DOWN);
EXPECT_TRUE(HasFocusInAnyChildView(test_api.access_code_view())); EXPECT_TRUE(HasFocusInAnyChildView(test_api.access_code_view()));
generator->PressKey(ui::KeyboardCode::VKEY_TAB, ui::EF_SHIFT_DOWN);
EXPECT_TRUE(test_api.description_label()->HasFocus());
generator->PressKey(ui::KeyboardCode::VKEY_TAB, ui::EF_SHIFT_DOWN);
EXPECT_TRUE(test_api.title_label()->HasFocus());
generator->PressKey(ui::KeyboardCode::VKEY_TAB, ui::EF_SHIFT_DOWN); generator->PressKey(ui::KeyboardCode::VKEY_TAB, ui::EF_SHIFT_DOWN);
EXPECT_TRUE(test_api.back_button()->HasFocus()); EXPECT_TRUE(test_api.back_button()->HasFocus());
......
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