Commit d72cc142 authored by Joe DeBlasio's avatar Joe DeBlasio Committed by Chromium LUCI CQ

[MIX-DL] Make notification announce itself to screen readers.

This CL is a small change to announce the arrival of a MIX-DL alert to
accessibility devices.

We don't have testing infrastructure for accessibility in the downloads
shelf right now, and this is a trivial change, so it's submitted without
tests. I manually verified that this works as expected on Mac OS.

Fixed: 1131084
Change-Id: Ie68a4f6ed5f71a25553deb2a776a7dcd3adf30a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2606669Reviewed-by: default avatarXing Liu <xingliu@chromium.org>
Commit-Queue: Joe DeBlasio <jdeblasio@chromium.org>
Cr-Commit-Position: refs/heads/master@{#840772}
parent cb7e492f
...@@ -2053,6 +2053,20 @@ are declared in tools/grit/grit_rule.gni. ...@@ -2053,6 +2053,20 @@ are declared in tools/grit/grit_rule.gni.
desc="The title of a download notification inidcating that the file may be malicious, and the Advanced Protection Program recommends sending the file to Google. This message is for screen reader users"> desc="The title of a download notification inidcating that the file may be malicious, and the Advanced Protection Program recommends sending the file to Google. This message is for screen reader users">
<ph name="FILE_NAME">$1<ex>file.exe</ex></ph> is being scanned. <ph name="FILE_NAME">$1<ex>file.exe</ex></ph> is being scanned.
</message> </message>
<if expr="is_macosx">
<then>
<message name="IDS_PROMPT_DOWNLOAD_MIXED_CONTENT_BLOCKED_ACCESSIBLE_ALERT"
desc="The title of a download notification inidcating that the download was delivered insecurely. This message is for screen reader users">
<ph name="FILE_NAME">$1<ex>file.exe</ex></ph> can't be downloaded securely.
</message>
</then>
<else>
<message name="IDS_PROMPT_DOWNLOAD_MIXED_CONTENT_BLOCKED_ACCESSIBLE_ALERT"
desc="The title of a download notification inidcating that the download was delivered insecurely. This message is for screen reader users">
<ph name="FILE_NAME">$1<ex>file.exe</ex></ph> can't be downloaded securely. Press Shift+F6 to cycle to the downloads bar area.
</message>
</else>
</if>
<!-- Download Notification Labels --> <!-- Download Notification Labels -->
<message name="IDS_DOWNLOAD_NOTIFICATION_COPY_TO_CLIPBOARD" <message name="IDS_DOWNLOAD_NOTIFICATION_COPY_TO_CLIPBOARD"
......
...@@ -696,6 +696,11 @@ void DownloadItemView::UpdateMode(Mode mode) { ...@@ -696,6 +696,11 @@ void DownloadItemView::UpdateMode(Mode mode) {
UpdateAccessibleAlert(model_->GetWarningText(unelided_filename, &ignore)); UpdateAccessibleAlert(model_->GetWarningText(unelided_filename, &ignore));
accessible_alert_timer_.Stop(); accessible_alert_timer_.Stop();
} }
} else if (is_mixed_content(mode_)) {
announce_accessible_alert_soon_ = true;
UpdateAccessibleAlert(l10n_util::GetStringFUTF16(
IDS_PROMPT_DOWNLOAD_MIXED_CONTENT_BLOCKED_ACCESSIBLE_ALERT,
unelided_filename));
} else if (mode_ == Mode::kDeepScanning) { } else if (mode_ == Mode::kDeepScanning) {
UpdateAccessibleAlert(l10n_util::GetStringFUTF16( UpdateAccessibleAlert(l10n_util::GetStringFUTF16(
IDS_DEEP_SCANNING_ACCESSIBLE_ALERT, unelided_filename)); IDS_DEEP_SCANNING_ACCESSIBLE_ALERT, unelided_filename));
......
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