Commit 1494641f authored by Bailey Berro's avatar Bailey Berro Committed by Commit Bot

Update tooltip on user list "Remove" button in People settings

Adds the name of the user to the tooltip shown on the "Remove" button
in the "Restrict sign-in to the following users" list. If a user's name
is available, we use that. Otherwise, we use their displayEmail.

This provides additional context on the tooltip and ensures that
ChromeVox can provide enough context to users

Bug: 825943
Change-Id: I07c77d4a8a70fa76accd23a0738047f06447781c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1913050
Commit-Queue: Bailey Berro <baileyberro@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715143}
parent 8a09ec16
......@@ -4366,7 +4366,7 @@
<ph name="USER_NAME">$1<ex>John Smith</ex></ph> (owner)
</message>
<message name="IDS_SETTINGS_USERS_REMOVE_USER_TOOLTIP" desc="Tooltip for the button that removes a user from the list of restricted sign in users.">
Remove
Remove <ph name="USER_NAME">$1<ex>John Smith</ex></ph>
</message>
<message name="IDS_SETTINGS_USERS_ADD_USERS" desc="Label the dialog for adding users.">
Add user
......
......@@ -57,7 +57,7 @@
</div>
<cr-icon-button class="icon-clear"
hidden="[[shouldHideCloseButton_(disabled, item.isOwner)]]"
title="$i18n{removeUserTooltip}" on-click="removeUser_">
title="[[getRemoveUserTooltip_(item)]]" on-click="removeUser_">
</cr-icon-button>
</div>
</template>
......
......@@ -133,4 +133,13 @@ Polymer({
getTooltip_: function(user) {
return !this.shouldShowEmail_(user) ? user.displayEmail : '';
},
/**
* @param {!chrome.usersPrivate.User} user
* @return {string}
* @private
*/
getRemoveUserTooltip_: function(user) {
return this.i18n('removeUserTooltip', user.name);
},
});
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