Update a11y label for quick settings VPN add connection button
The button tooltip is "Add connection", which is fine for users who can see the label with the VPN provider name. However, Chromevox users need to hear the provider name when the button is focused, otherwise all the "Add connection" buttons sound the same. Bug: b:280673293 Change-Id: I10f30905b94d03e0f07562acca760d23bbf017ad Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4501349 Commit-Queue: James Cook <jamescook@chromium.org> Reviewed-by: Jiaming Cheng <jiamingc@chromium.org> Cr-Commit-Position: refs/heads/main@{#1139312}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
28648b0f97
commit
29a5205989
ash
@ -3181,6 +3181,9 @@ Connect your device to power.
|
||||
<message name="IDS_ASH_STATUS_TRAY_ADD_CONNECTION" desc="Title for control to add a new network connection." >
|
||||
Add connection
|
||||
</message>
|
||||
<message name="IDS_ASH_STATUS_TRAY_ADD_VPN_CONNECTION_WITH" desc="Accessibility label for a button that adds a new VPN connection using a company's VPN provider software." >
|
||||
Add connection with <ph name="PROVIDER">$1<ex>Pulse Secure</ex></ph>
|
||||
</message>
|
||||
<message name="IDS_ASH_STATUS_TRAY_NETWORK_MONITORED_WARNING" desc="The label used in the tray popup to warn users their network may be monitored." >
|
||||
Network may be monitored
|
||||
</message>
|
||||
|
@ -0,0 +1 @@
|
||||
95522800243b01105d0ea99197b08d3ecafb2061
|
@ -292,6 +292,11 @@ class VPNListProviderEntryRevamp : public ActionableView {
|
||||
? static_cast<ui::ColorId>(cros_tokens::kCrosSysDisabled)
|
||||
: kColorAshButtonIconDisabledColor));
|
||||
|
||||
// The tooltip says "Add connection" which is fine for users who can see the
|
||||
// label with the provider name, but ChromeVox users need to hear the name.
|
||||
add_vpn_button->SetAccessibleName(l10n_util::GetStringFUTF16(
|
||||
IDS_ASH_STATUS_TRAY_ADD_VPN_CONNECTION_WITH, base::UTF8ToUTF16(name)));
|
||||
|
||||
// Update enabled state for the whole row and the button.
|
||||
bool add_vpn_enabled =
|
||||
enabled && CanAddVpnButtonBeEnabled(
|
||||
|
Reference in New Issue
Block a user