History WebUI: Make screen readers read out that an item was deleted
Bug: 1187232 Change-Id: I69154fdfe301abbbbe28e20037cfa3bf789ab5e1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2939365 Reviewed-by: Jochen Eisinger <jochen@chromium.org> Reviewed-by: dpapad <dpapad@chromium.org> Commit-Queue: John Lee <johntlee@chromium.org> Cr-Commit-Position: refs/heads/master@{#892218}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
d4e06bf2d7
commit
5be73a804d
chrome/browser
components
@ -440,6 +440,11 @@ export class HistoryListElement extends HistoryListElementBase {
|
||||
const itemData = this.actionMenuModel_!;
|
||||
|
||||
this.deleteItems_([itemData.item]).then(() => {
|
||||
IronA11yAnnouncer.requestAvailability();
|
||||
this.fire_(
|
||||
'iron-announce',
|
||||
{text: this.i18n('deleteSuccess', itemData.item.title)});
|
||||
|
||||
// This unselect-all resets the toolbar when deleting a selected item
|
||||
// and clears selection state which can be invalid if items move
|
||||
// around during deletion.
|
||||
|
@ -65,6 +65,7 @@ content::WebUIDataSource* CreateHistoryUIHTMLSource(Profile* profile) {
|
||||
{"clearSearch", IDS_CLEAR_SEARCH},
|
||||
{"collapseSessionButton", IDS_HISTORY_OTHER_SESSIONS_COLLAPSE_SESSION},
|
||||
{"delete", IDS_HISTORY_DELETE},
|
||||
{"deleteSuccess", IDS_HISTORY_REMOVE_PAGE_SUCCESS},
|
||||
{"deleteConfirm", IDS_HISTORY_DELETE_PRIOR_VISITS_CONFIRM_BUTTON},
|
||||
{"deleteSession", IDS_HISTORY_OTHER_SESSIONS_HIDE_FOR_NOW},
|
||||
{"deleteWarning", IDS_HISTORY_DELETE_PRIOR_VISITS_WARNING},
|
||||
|
@ -83,6 +83,9 @@
|
||||
<message name="IDS_HISTORY_REMOVE_PAGE" desc="Command in the history entry drop-down menu. Removes a page from the history.">
|
||||
Remove from history
|
||||
</message>
|
||||
<message name="IDS_HISTORY_REMOVE_PAGE_SUCCESS" desc="Screen reader message that is read after user successfully removes one history item from the item's options menu. The message will reference the page's title.">
|
||||
'<ph name="PAGE_TITLE">$1<ex>Google Store - My Cart</ex></ph>' deleted
|
||||
</message>
|
||||
<message name="IDS_HISTORY_REMOVE_SELECTED_ITEMS" desc="Title of the button that allows the user to remove the selected history items">
|
||||
Remove selected items
|
||||
</message>
|
||||
|
@ -0,0 +1 @@
|
||||
44ed4c504af2df1e1cea0283462d40b76778619e
|
Reference in New Issue
Block a user