Commit bd7d50d1 authored by David Tseng's avatar David Tseng Committed by Commit Bot

Change toggle button output

Bug: b:69899077
Change-Id: I84c1083869ce6fc7f4579ae22271ea2a344e459c
Reviewed-on: https://chromium-review.googlesource.com/c/1283478
Commit-Queue: David Tseng <dtseng@chromium.org>
Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601004}
parent da82bcce
...@@ -782,17 +782,17 @@ TEST_F('BackgroundTest', 'ToggleButton', function() { ...@@ -782,17 +782,17 @@ TEST_F('BackgroundTest', 'ToggleButton', function() {
var move = doCmd('nextObject'); var move = doCmd('nextObject');
mockFeedback.call(move) mockFeedback.call(move)
.expectSpeech('boldface') .expectSpeech('boldface')
.expectSpeech('Button') .expectSpeech('Toggle Button')
.expectSpeech('Partially pressed') .expectSpeech('Partially pressed')
.call(move) .call(move)
.expectSpeech('ok') .expectSpeech('ok')
.expectSpeech('Button') .expectSpeech('Toggle Button')
.expectSpeech('Pressed') .expectSpeech('Pressed')
.call(move) .call(move)
.expectSpeech('cancel') .expectSpeech('cancel')
.expectSpeech('Button') .expectSpeech('Toggle Button')
.expectSpeech('Not pressed') .expectSpeech('Not pressed')
.call(move) .call(move)
......
...@@ -281,7 +281,7 @@ Output.ROLE_INFO_ = { ...@@ -281,7 +281,7 @@ Output.ROLE_INFO_ = {
time: {msgId: 'tag_time', inherits: 'abstractContainer'}, time: {msgId: 'tag_time', inherits: 'abstractContainer'},
timer: {msgId: 'role_timer', inherits: 'abstractNameFromContents'}, timer: {msgId: 'role_timer', inherits: 'abstractNameFromContents'},
toolbar: {msgId: 'role_toolbar', ignoreAncestry: true}, toolbar: {msgId: 'role_toolbar', ignoreAncestry: true},
toggleButton: {msgId: 'role_button', inherits: 'checkBox'}, toggleButton: {msgId: 'role_toggle_button', inherits: 'checkBox'},
tree: {msgId: 'role_tree'}, tree: {msgId: 'role_tree'},
treeItem: {msgId: 'role_treeitem'}, treeItem: {msgId: 'role_treeitem'},
window: {ignoreAncestry: true} window: {ignoreAncestry: true}
......
...@@ -688,13 +688,15 @@ TEST_F('OutputE2ETest', 'ToggleButton', function() { ...@@ -688,13 +688,15 @@ TEST_F('OutputE2ETest', 'ToggleButton', function() {
<div role="button" aria-pressed="true">Subscribe</div>*/}, <div role="button" aria-pressed="true">Subscribe</div>*/},
function(root) { function(root) {
var el = root.firstChild; var el = root.firstChild;
var o = new Output().withSpeech(cursors.Range.fromNode(el)); var o = new Output().withSpeechAndBraille(cursors.Range.fromNode(el));
assertEqualsJSON({string_: '|Subscribe|Button|Pressed|Press Search+Space to toggle.', assertEqualsJSON({string_:
'|Subscribe|Toggle Button|Pressed|Press Search+Space to toggle.',
spans_: [ spans_: [
{value: {earconId: 'CHECK_ON'}, start: 0, end: 0}, {value: {earconId: 'CHECK_ON'}, start: 0, end: 0},
{value: 'name', start: 1, end:10}, {value: 'name', start: 1, end:10},
{value: 'role', start: 11, end: 17} {value: 'role', start: 11, end: 24}
]}, o.speechOutputForTest); ]}, o.speechOutputForTest);
assertEquals('Subscribe tgl btn =', o.brailleOutputForTest.string_);
}); });
}); });
......
...@@ -2263,6 +2263,12 @@ ...@@ -2263,6 +2263,12 @@
<message desc="Describes nodes or anything describing them as a landmark." name="IDS_CHROMEVOX_ROLE_LANDMARK"> <message desc="Describes nodes or anything describing them as a landmark." name="IDS_CHROMEVOX_ROLE_LANDMARK">
Landmark Landmark
</message> </message>
<message desc="Describes a button that can be pressed/toggled." name="IDS_CHROMEVOX_ROLE_TOGGLE_BUTTON">
Toggle Button
</message>
<message desc="Brailles a button that can be pressed/toggled." name="IDS_CHROMEVOX_ROLE_TOGGLE_BUTTON_BRL">
tgl btn
</message>
<message desc="Spoken when user types invalid keys into the modifier selection field." name="IDS_CHROMEVOX_MODIFIER_ENTRY_ERROR"> <message desc="Spoken when user types invalid keys into the modifier selection field." name="IDS_CHROMEVOX_MODIFIER_ENTRY_ERROR">
No modifier pressed; please press and hold one or more modifiers; lift your fingers once done and you will hear the keys set. Tab to exit. No modifier pressed; please press and hold one or more modifiers; lift your fingers once done and you will hear the keys set. Tab to exit.
</message> </message>
......
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