Commit b537f40d authored by Rainhard Findling's avatar Rainhard Findling Committed by Commit Bot

Safety check UI: a11y: focus parent element label without tabstop

* When the user clicks the run safety check button, the parent element
  is focused, without it having a tabstop. This prevents the focus from
  getting lost and is part of a11y for safety check.
* This is a follow-up and improvement to crrev.com/c/2106089.
* DD: http://shortn/_uEauSbBMVy

Bug: 1015841
Change-Id: I5f7f418769c6908e3c7bcc3c81fe8c497ac1edb7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2107988
Commit-Queue: Rainhard Findling <rainhard@chromium.org>
Reviewed-by: default avatardpapad <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#752046}
parent e122e6f1
......@@ -52,7 +52,8 @@
}
}
</style>
<div id="safetyCheckParent" class="settings-box first two-line">
<div id="safetyCheckParent" class="settings-box first two-line"
tabindex="-1">
<iron-icon icon="settings20:safety-check" aria-hidden="true">
</iron-icon>
<div class="start settings-box-text" no-search>
......
......@@ -324,10 +324,14 @@ Polymer({
settings.HatsBrowserProxyImpl.getInstance().tryShowSurvey();
this.runSafetyCheck_();
this.focusParent_();
},
// TODO(crbug.com/1015841): Prevent the focus from getting lost, once it
// has been decided which element to focus after the safety check
// parent button got clicked, and, as a result, disappeared.
/** @private */
focusParent_() {
const parent =
/** @type {!Element} */ (this.$$('#safetyCheckParent'));
parent.focus();
},
/**
......
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