Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(522)

Side by Side Diff: chrome/browser/resources/settings/controls/settings_toggle_button.html

Issue 2743063004: MD Settings: use the subLabel of <settings-toggle-button>s for the aria (Closed)
Patch Set: merge Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_in dicator.html"> 1 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_in dicator.html">
2 <link rel="import" href="chrome://resources/html/polymer.html"> 2 <link rel="import" href="chrome://resources/html/polymer.html">
3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-toggle-button/pap er-toggle-button.html"> 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-toggle-button/pap er-toggle-button.html">
4 <link rel="import" href="settings_boolean_control_behavior.html"> 4 <link rel="import" href="settings_boolean_control_behavior.html">
5 <link rel="import" href="../settings_shared_css.html"> 5 <link rel="import" href="../settings_shared_css.html">
6 6
7 <dom-module id="settings-toggle-button"> 7 <dom-module id="settings-toggle-button">
8 <template> 8 <template>
9 <style include="settings-shared"> 9 <style include="settings-shared">
10 :host([elide-label]), 10 :host([elide-label]),
(...skipping 21 matching lines...) Expand all
32 ::content .more-actions, 32 ::content .more-actions,
33 cr-policy-pref-indicator { 33 cr-policy-pref-indicator {
34 -webkit-margin-start: var(--settings-control-spacing); 34 -webkit-margin-start: var(--settings-control-spacing);
35 } 35 }
36 </style> 36 </style>
37 <div id="outerRow" noSubLabel$="[[!subLabel]]"> 37 <div id="outerRow" noSubLabel$="[[!subLabel]]">
38 <div class="flex" id="labelWrapper" on-tap="onLabelWrapperTap_" 38 <div class="flex" id="labelWrapper" on-tap="onLabelWrapperTap_"
39 actionable$="[[!controlDisabled_(disabled, pref.*)]]" 39 actionable$="[[!controlDisabled_(disabled, pref.*)]]"
40 hidden="[[!label]]"> 40 hidden="[[!label]]">
41 <div id="label" class="label">[[label]]</div> 41 <div id="label" class="label">[[label]]</div>
42 <div class="secondary label">[[subLabel]]</div> 42 <div id="subLabel" class="secondary label">[[subLabel]]</div>
43 </div> 43 </div>
44 <content select=".more-actions"></content> 44 <content select=".more-actions"></content>
45 <template is="dom-if" if="[[hasPrefPolicyIndicator(pref.*)]]"> 45 <template is="dom-if" if="[[hasPrefPolicyIndicator(pref.*)]]">
46 <cr-policy-pref-indicator pref="[[pref]]" icon-aria-label="[[label]]"> 46 <cr-policy-pref-indicator pref="[[pref]]" icon-aria-label="[[label]]">
47 </cr-policy-pref-indicator> 47 </cr-policy-pref-indicator>
48 </template> 48 </template>
49 <paper-toggle-button id="control" checked="{{checked}}" 49 <paper-toggle-button id="control" checked="{{checked}}"
50 on-change="notifyChangedByUserInteraction" aria-labelledby="label" 50 on-change="notifyChangedByUserInteraction" aria-labelledby="label"
51 aria-describedby="subLabel"
51 disabled="[[controlDisabled_(disabled, pref)]]"> 52 disabled="[[controlDisabled_(disabled, pref)]]">
52 </paper-toggle-button> 53 </paper-toggle-button>
53 </div> 54 </div>
54 </template> 55 </template>
55 <script src="settings_toggle_button.js"></script> 56 <script src="settings_toggle_button.js"></script>
56 </dom-module> 57 </dom-module>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698