0

holdingspace: Added "Quick Files" to a11y holding space text.

Here is what is looks like: http://shortn/_KhDv3zFBbY

Bug: 1352521
Change-Id: I607a271696a8e45c7bdd8dafc3564ccfd85ad829
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3902511
Commit-Queue: David Black <dmblack@google.com>
Auto-Submit: Angel Sanchez <angelsan@google.com>
Commit-Queue: Angel Sanchez <angelsan@google.com>
Reviewed-by: David Black <dmblack@google.com>
Quick-Run: Angel Sanchez <angelsan@google.com>
Cr-Commit-Position: refs/heads/main@{#1048240}
This commit is contained in:
Angel
2022-09-16 22:16:09 +00:00
committed by Chromium LUCI CQ
parent 06570eaf63
commit 05d124a5f7
4 changed files with 38 additions and 3 deletions

@ -1312,7 +1312,7 @@ This file contains the strings for ash.
<!-- Holding space tray-->
<message name="IDS_ASH_HOLDING_SPACE_A11Y_NAME" desc="A11y name of the holding space tray and bubble.">
Tote: recent screen captures, downloads, and pinned files
<ph name="HOLDING_SPACE_TITLE">$1</ph>: recent screen captures, downloads, and pinned files
</message>
<message name="IDS_ASH_HOLDING_SPACE_TITLE" desc="Title of the holding space tray and bubble.">
Tote

@ -1 +1 @@
92b881183adeee722264758040b985931d297c76
14321b7b8cd8a7562d793ab777ec09314e7a4bdd

@ -299,7 +299,11 @@ void HoldingSpaceTray::ClickedOutsideBubble() {
}
std::u16string HoldingSpaceTray::GetAccessibleNameForTray() {
return l10n_util::GetStringUTF16(IDS_ASH_HOLDING_SPACE_A11Y_NAME);
return l10n_util::GetStringFUTF16(
IDS_ASH_HOLDING_SPACE_A11Y_NAME,
features::IsHoldingSpaceRebrandEnabled()
? l10n_util::GetStringUTF16(IDS_ASH_HOLDING_SPACE_TITLE_REBRAND)
: l10n_util::GetStringUTF16(IDS_ASH_HOLDING_SPACE_TITLE));
}
views::View* HoldingSpaceTray::GetTooltipHandlerForPoint(

@ -3582,6 +3582,37 @@ TEST_P(HoldingSpaceTraySuggestionsFeatureTest,
pinned_files_bubble));
}
// Base class for tests of the holding space accessibility text parameterized by
// a boolean for the kHoldingSpaceRebrand feature flag.
class HoldingSpaceTrayAccessibilityTest
: public HoldingSpaceTrayTestBase,
public ::testing::WithParamInterface<bool> {
public:
HoldingSpaceTrayAccessibilityTest() {
scoped_feature_list_.InitWithFeatureState(features::kHoldingSpaceRebrand,
IsHoldingSpaceRebrandEnabled());
}
bool IsHoldingSpaceRebrandEnabled() const { return GetParam(); }
private:
base::test::ScopedFeatureList scoped_feature_list_;
};
INSTANTIATE_TEST_SUITE_P(All,
HoldingSpaceTrayAccessibilityTest,
::testing::Bool());
TEST_P(HoldingSpaceTrayAccessibilityTest, CheckTrayAccessibilityText) {
StartSession(/*pre_mark_time_of_first_add=*/true);
GetTray()->FirePreviewsUpdateTimerIfRunningForTesting();
EXPECT_EQ(
GetTray()->GetAccessibleNameForTray(),
IsHoldingSpaceRebrandEnabled()
? u"Quick Files: recent screen captures, downloads, and pinned files"
: u"Tote: recent screen captures, downloads, and pinned files");
}
// Base class for tests of the holding space icon parameterized by a boolean for
// the kHoldingSpaceRebrand feature flag.
class HoldingSpaceTrayIconTest : public HoldingSpaceTrayTestBase,