Commit 3fcb4c52 authored by David Tseng's avatar David Tseng Committed by Commit Bot

Make toggle buttons checkable

Bug: 426139
Cq-Include-Trybots: luci.chromium.try:closure_compilation
Change-Id: Ibbd9e7f0e68856583a88ede79ca9f79d9a57cb0a
Reviewed-on: https://chromium-review.googlesource.com/1112355
Commit-Queue: David Tseng <dtseng@chromium.org>
Reviewed-by: default avatarAaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569808}
parent a005bd3d
......@@ -447,7 +447,7 @@ AutomationPredicate.shouldIgnoreNode = function(node) {
*/
AutomationPredicate.checkable = AutomationPredicate.roles([
Role.CHECK_BOX, Role.RADIO_BUTTON, Role.MENU_ITEM_CHECK_BOX,
Role.MENU_ITEM_RADIO, Role.TREE_ITEM
Role.MENU_ITEM_RADIO, Role.TOGGLE_BUTTON, Role.TREE_ITEM
]);
/**
......
......@@ -1894,8 +1894,9 @@ Output.prototype = {
if (AutomationPredicate.checkable(node))
this.format_(node, '@hint_checkable', buff);
if (AutomationPredicate.clickable(node))
else if (AutomationPredicate.clickable(node))
this.format_(node, '@hint_clickable', buff);
if (node.autoComplete == 'list' || node.autoComplete == 'both')
this.format_(node, '@hint_autocomplete_list', buff);
if (node.autoComplete == 'inline' || node.autoComplete == 'both')
......
......@@ -686,7 +686,7 @@ TEST_F('OutputE2ETest', 'ToggleButton', function() {
function(root) {
var el = root.firstChild;
var o = new Output().withSpeech(cursors.Range.fromNode(el));
assertEqualsJSON({string_: '|Subscribe|Button|Pressed|Press Search+Space to activate.',
assertEqualsJSON({string_: '|Subscribe|Button|Pressed|Press Search+Space to toggle.',
spans_: [
{value: {earconId: 'CHECK_ON'}, start: 0, end: 0},
{value: 'name', start: 1, end:10},
......
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