Commit 49e90aaa authored by Bailey Berro's avatar Bailey Berro Committed by Commit Bot

Remove unnecessary stop on Settings networking subpages

All networking sub-pages have an unnecessary navigation stop on
the enabled-state of the feature. This is particularly bad on the wi-fi
sub page because the enabled-state text and the toggle are separated by
the add network button.

Fixed: 1024597, 1007058
Change-Id: I12d6233090dc3c5ff1b37526be9bf67211f78886
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1914827
Commit-Queue: Bailey Berro <baileyberro@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Auto-Submit: Bailey Berro <baileyberro@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715404}
parent 3681d6a8
......@@ -41,7 +41,7 @@
<div class="settings-box first" actionable on-click="onEnableTap_">
<div id="onOff" class="start settings-box-text"
on$="[[bluetoothToggleState]]">
on$="[[bluetoothToggleState]]" aria-hidden="true">
[[getOnOffString_(bluetoothToggleState,
'$i18nPolymer{deviceOn}', '$i18nPolymer{deviceOff}')]]
</div>
......
......@@ -355,6 +355,9 @@ Polymer({
* @private
*/
getOnOffString_: function(enabled, onstr, offstr) {
// If these strings are changed to convey more information other than "On"
// and "Off" in the future, revisit the a11y implementation to ensure no
// meaningful information is skipped.
return enabled ? onstr : offstr;
},
......
......@@ -87,7 +87,8 @@
<template is="dom-if" if="[[enableToggleIsVisible_(deviceState)]]">
<div class="settings-box first">
<div id="onOff" class="start" on$="[[deviceIsEnabled_(deviceState)]]">
<div id="onOff" class="start" on$="[[deviceIsEnabled_(deviceState)]]"
aria-hidden="true">
[[getOffOnString_(deviceState,
'$i18nPolymer{deviceOn}', '$i18nPolymer{deviceOff}')]]
</div>
......
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