Commit f1df20df authored by kcarattini's avatar kcarattini Committed by Commit bot

Hotword: Make the opt-in flow tab ordering more intuitive

Makes the primary buttons first in tab order.

BUG=466390

Review URL: https://codereview.chromium.org/1011283003

Cr-Commit-Position: refs/heads/master@{#321501}
parent 771d3a91
...@@ -545,12 +545,15 @@ ...@@ -545,12 +545,15 @@
/** /**
* Displays the current step. If the current step is not the first step, * Displays the current step. If the current step is not the first step,
* also hides the previous step. * also hides the previous step. Focuses the current step's first button.
* @private * @private
*/ */
Flow.prototype.showStep_ = function() { Flow.prototype.showStep_ = function() {
var currentStep = this.currentFlow_[this.currentStepIndex_]; var currentStepId = this.currentFlow_[this.currentStepIndex_];
document.getElementById(currentStep).hidden = false; var currentStep = document.getElementById(currentStepId);
currentStep.hidden = false;
cr.ui.setInitialFocus(currentStep);
var previousStep = null; var previousStep = null;
if (this.currentStepIndex_ > 0) if (this.currentStepIndex_ > 0)
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
<link rel="stylesheet" href="chrome://resources/css/text_defaults.css"> <link rel="stylesheet" href="chrome://resources/css/text_defaults.css">
<link type="text/css" rel="stylesheet" href="style.css"> <link type="text/css" rel="stylesheet" href="style.css">
<script src="chrome://resources/js/action_link.js"></script> <script src="chrome://resources/js/action_link.js"></script>
<script src="chrome://resources/js/cr.js"></script>
<script src="chrome://resources/js/cr/ui/node_utils.js"></script>
<script src="chrome://resources/js/load_time_data.js"></script> <script src="chrome://resources/js/load_time_data.js"></script>
<script src="chrome://resources/js/util.js"></script> <script src="chrome://resources/js/util.js"></script>
<script src="chrome://resources/js/i18n_template_no_process.js"></script> <script src="chrome://resources/js/i18n_template_no_process.js"></script>
......
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