Commit e609d761 authored by James Vecore's avatar James Vecore Committed by Commit Bot

[Multidevice] Add title to multidevice setup dialog

The multidevice setup dialog is run in a separate window with a new
html head/body as a non-modal dialog/window. The <head> element did
not have a <title> element which caused ChromeVox to read "Web
Content" as the page title. This CL adds a localized dialog title as a
<title> element to the <head> element. The ARIA spec does not allow
using something like role="dialog" on <title>, <head>, or <body> so we
have no easy way to make accessibility announce the window as a
dialog. To work around this, we explicitly add "- Dialog" to the title
to give a pause and read like it would for an in-window dialog. This
is done based on related advice here:

https://groups.google.com/a/google.com/g/cros-system-services/c/2YRC80T875M

Fixed: 1005994
Change-Id: I4e7c6963961711449c83374482b37430c57b818d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1914902Reviewed-by: default avatarScott Violet <sky@chromium.org>
Reviewed-by: default avatarRyan Hansberry <hansberry@chromium.org>
Commit-Queue: James Vecore <vecore@google.com>
Cr-Commit-Position: refs/heads/master@{#715541}
parent df3c143f
...@@ -153,6 +153,9 @@ ...@@ -153,6 +153,9 @@
<message name="IDS_MULTIDEVICE_SETUP_SETUP_SUCCEEDED_PAGE_MESSAGE" desc="Message for successful setup page."> <message name="IDS_MULTIDEVICE_SETUP_SETUP_SUCCEEDED_PAGE_MESSAGE" desc="Message for successful setup page.">
Go to <ph name="LINK_BEGIN">&lt;a id="settings-link"&gt;</ph>Settings<ph name="LINK_END">&lt;/a&gt;</ph> to see options for your connected phone Go to <ph name="LINK_BEGIN">&lt;a id="settings-link"&gt;</ph>Settings<ph name="LINK_END">&lt;/a&gt;</ph> to see options for your connected phone
</message> </message>
<message name="IDS_MULTIDEVICE_SETUP_DIALOG_ACCESSIBILITY_TITLE" desc="Accessibility title for the multidevice setup dialog with a '- Dialog' appended to inform screen reader users they are in a dialog. This is a work around to deal with the fact that we cannot annotate the window's role as a dialog another way.">
Connect to your phone - Dialog
</message>
<message name="IDS_MULTIDEVICE_SETUP_START_SETUP_PAGE_HEADER" desc="Header for welcome page."> <message name="IDS_MULTIDEVICE_SETUP_START_SETUP_PAGE_HEADER" desc="Header for welcome page.">
Connect to your phone Connect to your phone
</message> </message>
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<head> <head>
<meta charset="utf8"> <meta charset="utf8">
<base href="chrome://multidevice-setup"> <base href="chrome://multidevice-setup">
<title>$i18n{dialogAccessibilityTitle}</title>
<style> <style>
html, html,
body { body {
......
...@@ -58,6 +58,8 @@ constexpr LocalizedString kLocalizedStringsWithoutPlaceholders[] = { ...@@ -58,6 +58,8 @@ constexpr LocalizedString kLocalizedStringsWithoutPlaceholders[] = {
IDS_MULTIDEVICE_SETUP_SETUP_SUCCEEDED_PAGE_MESSAGE}, IDS_MULTIDEVICE_SETUP_SETUP_SUCCEEDED_PAGE_MESSAGE},
{"startSetupPageHeader", IDS_MULTIDEVICE_SETUP_START_SETUP_PAGE_HEADER}, {"startSetupPageHeader", IDS_MULTIDEVICE_SETUP_START_SETUP_PAGE_HEADER},
{"tryAgain", IDS_MULTIDEVICE_SETUP_TRY_AGAIN_LABEL}, {"tryAgain", IDS_MULTIDEVICE_SETUP_TRY_AGAIN_LABEL},
{"dialogAccessibilityTitle",
IDS_MULTIDEVICE_SETUP_DIALOG_ACCESSIBILITY_TITLE},
}; };
struct LocalizedStringWithName { struct LocalizedStringWithName {
......
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