Commit 57473cfb authored by Akihiro Ota's avatar Akihiro Ota Committed by Commit Bot

ChromeVox: Add data for battery and rich text hotkeys to command store

This change adds metadata for the battery and rich text hotkeys so that
they appear in the ChromeVox menu, where the user can find details on
how to activate them. It also renames the commands so the internal
and external naming is consistent.

Change-Id: I3e5f53a40660eb7bd83b55c0e180457b3be69f12
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1817154Reviewed-by: default avatarDavid Tseng <dtseng@chromium.org>
Commit-Queue: Akihiro Ota <akihiroota@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699512}
parent 7a33788d
......@@ -998,7 +998,7 @@
}
},
{
"command": "getBatteryDescription",
"command": "announceBatteryDescription",
"sequence": {
"cvoxModifier": true,
"keys": {
......@@ -1007,7 +1007,7 @@
}
},
{
"command": "getRichTextDescription",
"command": "announceRichTextDescription",
"sequence": {
"cvoxModifier": true,
"keys": {
......
......@@ -816,6 +816,16 @@ cvox.CommandStore.CMD_WHITELIST = {
'pauseAllMedia':
{announce: false, msgId: 'pause_all_media', category: 'information'},
'announceBatteryDescription': {
announce: true,
msgId: 'announce_battery_description',
category: 'information'
},
'announceRichTextDescription': {
announce: true,
msgId: 'announce_rich_text_description',
category: 'information'
},
'readPhoneticPronunciation': {
announce: true,
msgId: 'read_phonetic_pronunciation',
......
......@@ -866,7 +866,7 @@ CommandHandler.onCommand = function(command) {
}
cvox.ChromeVox.tts.speak(announce, cvox.QueueMode.FLUSH);
return false;
case 'getBatteryDescription':
case 'announceBatteryDescription':
chrome.accessibilityPrivate.getBatteryDescription(function(
batteryDescription) {
new Output()
......@@ -875,7 +875,7 @@ CommandHandler.onCommand = function(command) {
.go();
});
break;
case 'getRichTextDescription':
case 'announceRichTextDescription':
var node = ChromeVoxState.instance.currentRange.start.node;
var optSubs = [];
node.fontSize ? optSubs.push('font size: ' + node.fontSize) :
......
......@@ -3730,6 +3730,12 @@ If you're done with the tutorial, use ChromeVox to navigate to the Close button
<message desc="Spoken to inform the user that the node's name is empty" name="IDS_CHROMEVOX_EMPTY_NAME">
No available text for this item
</message>
<message desc="The description of the announceBatteryDescription key. Displayed in the ChromeVox menu." name="IDS_CHROMEVOX_ANNOUNCE_BATTERY_DESCRIPTION">
Announce current battery status
</message>
<message desc="The description of the announceRichTextDescription key. Displayed in the ChromeVox menu." name="IDS_CHROMEVOX_ANNOUNCE_RICH_TEXT_DESCRIPTION">
Announce formatting for current item
</message>
</messages>
</release>
</grit>
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