Commit 6d0a8336 authored by estade's avatar estade Committed by Commit bot

Get rid of some <label for> misuse in browser_options.html

Two main cases:
1. <label> not wrapping input + span
2. for accessibility -- for=<selector-id> should instead use aria-labelledby

BUG=409938

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

Cr-Commit-Position: refs/heads/master@{#293215}
parent 8ecc3071
...@@ -54,19 +54,16 @@ ...@@ -54,19 +54,16 @@
<button id="themes-reset" i18n-content="themesReset"></button> <button id="themes-reset" i18n-content="themesReset"></button>
</if> </if>
</div> </div>
<div class="checkbox" guest-visibility="disabled"> <div class="checkbox controlled-setting-with-label"
<span class="controlled-setting-with-label"> guest-visibility="disabled">
<input id="show-home-button" type="checkbox" <label>
<input type="checkbox"
pref="browser.show_home_button" pref="browser.show_home_button"
metric="Options_Homepage_HomeButton"> metric="Options_Homepage_HomeButton">
<span> <span i18n-content="homePageShowHomeButton"></span>
<label for="show-home-button" i18n-content="homePageShowHomeButton">
</label> </label>
<span class="controlled-setting-indicator" <span class="controlled-setting-indicator"
pref="browser.show_home_button"> pref="browser.show_home_button"></span>
</span>
</span>
</span>
</div> </div>
<div id="change-home-page-section" hidden> <div id="change-home-page-section" hidden>
<div id="change-home-page-section-container" guest-visibility="disabled"> <div id="change-home-page-section-container" guest-visibility="disabled">
...@@ -78,20 +75,17 @@ ...@@ -78,20 +75,17 @@
<div id="extension-controlled-container"></div> <div id="extension-controlled-container"></div>
</div> </div>
</div> </div>
<div class="checkbox" guest-visibility="disabled"> <div class="checkbox controlled-setting-with-label"
<span class="controlled-setting-with-label"> guest-visibility="disabled">
<input id="show-bookmark-bars" type="checkbox" <label>
<input type="checkbox"
pref="bookmark_bar.show_on_all_tabs" pref="bookmark_bar.show_on_all_tabs"
metric="Options_ShowBookmarksBar"> metric="Options_ShowBookmarksBar">
<span> <span i18n-content="toolbarShowBookmarksBar"></span>
<label for="show-bookmark-bars"
i18n-content="toolbarShowBookmarksBar">
</label> </label>
<span class="controlled-setting-indicator" <span class="controlled-setting-indicator"
pref="bookmark_bar.show_on_all_tabs"> pref="bookmark_bar.show_on_all_tabs">
</span> </span>
</span>
</span>
</div> </div>
<if expr="is_posix and not chromeos and not is_macosx"> <if expr="is_posix and not chromeos and not is_macosx">
<div class="checkbox"><label> <div class="checkbox"><label>
...@@ -137,11 +131,11 @@ ...@@ -137,11 +131,11 @@
<section> <section>
<h3 i18n-content="sectionTitleSearch"></h3> <h3 i18n-content="sectionTitleSearch"></h3>
<div id="search-section-content"> <div id="search-section-content">
<label for="default-search-engine" class="settings-row" <span id="default-search-engine-label"
i18n-values=".innerHTML:defaultSearchGroupLabel"> i18n-values=".innerHTML:defaultSearchGroupLabel"></span>
</label>
<div class="settings-row"> <div class="settings-row">
<select id="default-search-engine" class="weakrtl"></select> <select id="default-search-engine" class="weakrtl"
aria-labelledby="default-search-engine-label"></select>
<span class="controlled-setting-indicator" <span class="controlled-setting-indicator"
pref="default_search_provider_data.template_url_data"> pref="default_search_provider_data.template_url_data">
</span> </span>
...@@ -155,29 +149,19 @@ ...@@ -155,29 +149,19 @@
<h3 id="voice-section-title" i18n-content="sectionTitleVoice" hidden></h3> <h3 id="voice-section-title" i18n-content="sectionTitleVoice" hidden></h3>
<div id="voice-section-content"> <div id="voice-section-content">
<div id="hotword-always-on-search" hidden> <div id="hotword-always-on-search" hidden>
<div class="checkbox"> <div class="checkbox controlled-setting-with-label">
<span class="controlled-setting-with-label"> <label>
<input id="hotword-always-on-search-enable" <input pref="hotword.always_on_search_enabled" type="checkbox">
pref="hotword.always_on_search_enabled" type="checkbox"> <span i18n-content="hotwordAlwaysOnSearchEnable"></span>
<span>
<label for="hotword-always-on-search-enable"
i18n-content="hotwordAlwaysOnSearchEnable">
</label> </label>
</span>
</span>
</div> </div>
</div> </div>
<div id="audio-logging" hidden> <div id="audio-logging" hidden>
<div class="checkbox"> <div class="checkbox controlled-setting-with-label">
<span class="controlled-setting-with-label"> <label>
<input id="audio-logging-enable" <input pref="hotword.audio_logging_enabled" type="checkbox">
pref="hotword.audio_logging_enabled" type="checkbox"> <span i18n-content="hotwordAudioHistoryEnable"></span>
<span>
<label for="audio-logging-enable"
i18n-content="hotwordAudioHistoryEnable">
</label> </label>
</span>
</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -236,13 +220,13 @@ ...@@ -236,13 +220,13 @@
<h3 i18n-content="datetimeTitle"></h3> <h3 i18n-content="datetimeTitle"></h3>
<div class="option-control-table"> <div class="option-control-table">
<div guest-visibility="disabled"> <div guest-visibility="disabled">
<label for="timezone-select" class="option-name" <span id="timezone-value-label" class="option-name"
i18n-content="timezone"></label> i18n-content="timezone"></span>
<div id="timezone-value"> <div id="timezone-value">
<select id="timezone-select" class="control" <select class="control"
i18n-options="timezoneList" data-type="string" i18n-options="timezoneList" data-type="string"
pref="cros.system.timezone"> pref="cros.system.timezone"
</select> aria-labelledby="timezone-value-label"></select>
</div> </div>
</div> </div>
<div class="checkbox settings-row"> <div class="checkbox settings-row">
...@@ -291,112 +275,90 @@ ...@@ -291,112 +275,90 @@
<a target="_blank" i18n-content="learnMore" <a target="_blank" i18n-content="learnMore"
i18n-values="href:privacyLearnMoreURL"></a> i18n-values="href:privacyLearnMoreURL"></a>
</p> </p>
<div class="checkbox"> <div class="checkbox controlled-setting-with-label">
<span class="controlled-setting-with-label"> <label>
<input id="alternateErrorPagesEnabled" <input id="alternateErrorPagesEnabled"
pref="alternate_error_pages.enabled" pref="alternate_error_pages.enabled"
metric="Options_LinkDoctorCheckbox" type="checkbox"> metric="Options_LinkDoctorCheckbox" type="checkbox">
<span> <span i18n-content="linkDoctorPref"></span>
<label for="alternateErrorPagesEnabled"
i18n-content="linkDoctorPref">
</label> </label>
<span class="controlled-setting-indicator" <span class="controlled-setting-indicator"
pref="alternate_error_pages.enabled"> pref="alternate_error_pages.enabled">
</span> </span>
</span>
</span>
</div> </div>
<div class="checkbox" guest-visibility="disabled"> <div class="checkbox controlled-setting-with-label"
<span class="controlled-setting-with-label"> guest-visibility="disabled">
<input id="searchSuggestEnabled" pref="search.suggest_enabled" <label>
<input pref="search.suggest_enabled"
metric="Options_UseSuggestCheckbox" type="checkbox"> metric="Options_UseSuggestCheckbox" type="checkbox">
<span> <span i18n-content="suggestPref"></span>
<label for="searchSuggestEnabled" i18n-content="suggestPref">
</label> </label>
<span class="controlled-setting-indicator" <span class="controlled-setting-indicator"
pref="search.suggest_enabled"> pref="search.suggest_enabled">
</span> </span>
</span>
</span>
</div> </div>
<div class="checkbox" guest-visibility="disabled"> <div class="checkbox" guest-visibility="disabled">
<span class="controlled-setting-with-label"> <span class="controlled-setting-with-label">
<label>
<input id="networkPredictionOptions" <input id="networkPredictionOptions"
metric="Options_DnsPrefetchCheckbox" type="checkbox"> metric="Options_DnsPrefetchCheckbox" type="checkbox">
<span> <span i18n-content="networkPredictionEnabledDescription"></span>
<label for="networkPredictionOptions"
i18n-content="networkPredictionEnabledDescription">
</label> </label>
<span class="controlled-setting-indicator" <span class="controlled-setting-indicator"
pref="net.network_prediction_options"> pref="net.network_prediction_options"></span>
</span>
</span>
</span> </span>
</div> </div>
<div class="checkbox"> <div class="checkbox controlled-setting-with-label">
<span class="controlled-setting-with-label"> <label>
<input id="safe-browsing-extended-reporting-enabled" <input
metric="Options_SafeBrowsingExtendedReportingCheckbox" metric="Options_SafeBrowsingExtendedReportingCheckbox"
pref="safebrowsing.extended_reporting_enabled" pref="safebrowsing.extended_reporting_enabled"
type="checkbox"> type="checkbox">
<span> <span i18n-content="safeBrowsingEnableExtendedReporting"></span>
<label for="safe-browsing-extended-reporting-enabled"
i18n-content="safeBrowsingEnableExtendedReporting">
</label> </label>
<span class="controlled-setting-indicator" <span class="controlled-setting-indicator"
pref="safebrowsing.extended_reporting_enabled"> pref="safebrowsing.extended_reporting_enabled">
</span> </span>
</span>
</span>
</div> </div>
<div class="checkbox"> <div class="checkbox controlled-setting-with-label">
<span class="controlled-setting-with-label"> <label>
<input id="safeBrowsingEnabled" pref="safebrowsing.enabled" <input pref="safebrowsing.enabled"
metric="Options_SafeBrowsingCheckbox" type="checkbox"> metric="Options_SafeBrowsingCheckbox" type="checkbox">
<span> <span i18n-content="safeBrowsingEnableProtection"></span>
<label for="safeBrowsingEnabled"
i18n-content="safeBrowsingEnableProtection">
</label> </label>
<span class="controlled-setting-indicator" <span class="controlled-setting-indicator"
pref="safebrowsing.enabled"> pref="safebrowsing.enabled">
</span> </span>
</span>
</span>
</div> </div>
<if expr="_google_chrome"> <if expr="_google_chrome">
<div class="checkbox"> <div class="checkbox controlled-setting-with-label">
<span class="controlled-setting-with-label"> <label>
<input id="spelling-enabled-control" type="checkbox" <input id="spelling-enabled-control" type="checkbox"
metric="Options_SpellingServiceCheckbox" metric="Options_SpellingServiceCheckbox"
pref="spellcheck.use_spelling_service" dialog-pref> pref="spellcheck.use_spelling_service" dialog-pref>
<span> <span i18n-content="spellingPref"></span>
<label for="spelling-enabled-control" i18n-content="spellingPref">
</label> </label>
<span id="spelling-enabled-indicator" <span id="spelling-enabled-indicator"
class="controlled-setting-indicator" class="controlled-setting-indicator"
pref="spellcheck.use_spelling_service" dialog-pref> pref="spellcheck.use_spelling_service" dialog-pref>
</span> </span>
</span>
</span>
</div> </div>
<div id="metricsReportingSetting" class="checkbox"> <div id="metricsReportingSetting"
<span class="controlled-setting-with-label"> class="checkbox controlled-setting-with-label">
<if expr="chromeos"> <if expr="chromeos">
<label>
<input id="metricsReportingEnabled" <input id="metricsReportingEnabled"
pref="cros.metrics.reportingEnabled" type="checkbox"> pref="cros.metrics.reportingEnabled" type="checkbox">
<span> <span i18n-content="enableLogging"></span>
<label for="metricsReportingEnabled" i18n-content="enableLogging">
</label> </label>
<span class="controlled-setting-indicator" <span class="controlled-setting-indicator"
pref="cros.metrics.reportingEnabled"> pref="cros.metrics.reportingEnabled"></span>
</span>
</span>
</if> </if>
<if expr="not chromeos"> <if expr="not chromeos">
<label>
<input id="metricsReportingEnabled" <input id="metricsReportingEnabled"
pref="user_experience_metrics.reporting_enabled" type="checkbox"> pref="user_experience_metrics.reporting_enabled" type="checkbox">
<span> <span i18n-content="enableLogging">
<label for="metricsReportingEnabled" i18n-content="enableLogging">
</label> </label>
<span class="controlled-setting-indicator" <span class="controlled-setting-indicator"
pref="user_experience_metrics.reporting_enabled"> pref="user_experience_metrics.reporting_enabled">
...@@ -406,9 +368,7 @@ ...@@ -406,9 +368,7 @@
<span></span><button class= <span></span><button class=
"link-button standalone-link-button"></button><span></span> "link-button standalone-link-button"></button><span></span>
</span> </span>
</span>
</if> </if>
</span>
</div> </div>
</if> <!-- _google_chrome --> </if> <!-- _google_chrome -->
<div class="checkbox"> <div class="checkbox">
...@@ -419,13 +379,11 @@ ...@@ -419,13 +379,11 @@
</label> </label>
</div> </div>
<if expr="chromeos"> <if expr="chromeos">
<div class="checkbox"> <div class="checkbox controlled-setting-with-label">
<span class="controlled-setting-with-label"> <label>
<input id="content-protection-attestation-enabled" type="checkbox" <input id="content-protection-attestation-enabled" type="checkbox"
pref="cros.device.attestation_for_content_protection_enabled"> pref="cros.device.attestation_for_content_protection_enabled">
<span> <span i18n-content="enableContentProtectionAttestation"></span>
<label for="content-protection-attestation-enabled"
i18n-content="enableContentProtectionAttestation">
</label> </label>
<a target="_blank" i18n-content="learnMore" <a target="_blank" i18n-content="learnMore"
i18n-values="href:contentProtectionAttestationLearnMoreURL"> i18n-values="href:contentProtectionAttestationLearnMoreURL">
...@@ -433,24 +391,18 @@ ...@@ -433,24 +391,18 @@
<span class="controlled-setting-indicator" <span class="controlled-setting-indicator"
pref="cros.device.attestation_for_content_protection_enabled"> pref="cros.device.attestation_for_content_protection_enabled">
</span> </span>
</span>
</span>
</div> </div>
</if> </if>
<div id="hotword-search" hidden> <div id="hotword-search" hidden>
<div class="checkbox"> <div class="checkbox controlled-setting-with-label">
<span class="controlled-setting-with-label"> <label>
<input id="hotword-search-enable" pref="hotword.search_enabled_2" <input id="hotword-search-enable" pref="hotword.search_enabled_2"
metric="Options_HotwordCheckbox" type="checkbox" dialog-pref> metric="Options_HotwordCheckbox" type="checkbox" dialog-pref>
<span> <span i18n-values=".innerHTML:hotwordSearchEnable"></span>
<label for="hotword-search-enable"
i18n-values=".innerHTML:hotwordSearchEnable">
</label> </label>
<span id="hotword-search-setting-indicator" <span id="hotword-search-setting-indicator"
pref="hotword.search_enabled_2" dialog-pref> pref="hotword.search_enabled_2" dialog-pref>
</span> </span>
</span>
</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -485,37 +437,30 @@ ...@@ -485,37 +437,30 @@
</if> <!-- chromeos --> </if> <!-- chromeos -->
<section id="passwords-and-autofill-section"> <section id="passwords-and-autofill-section">
<h3 i18n-content="passwordsAndAutofillGroupName"></h3> <h3 i18n-content="passwordsAndAutofillGroupName"></h3>
<div class="checkbox"> <div class="checkbox controlled-setting-with-label">
<span class="controlled-setting-with-label"> <label>
<input id="autofill-enabled" pref="autofill.enabled" <input id="autofill-enabled" pref="autofill.enabled"
metric="Options_FormAutofill" type="checkbox"> metric="Options_FormAutofill" type="checkbox">
<span> <span i18n-content="autofillEnabled"></span>
<label for="autofill-enabled" i18n-content="autofillEnabled"></label>
<span class="controlled-setting-indicator" pref="autofill.enabled"> <span class="controlled-setting-indicator" pref="autofill.enabled">
</span> </span>
</label>
<button id="autofill-settings" class="link-button" <button id="autofill-settings" class="link-button"
i18n-content="manageAutofillSettings"> i18n-content="manageAutofillSettings">
</button> </button>
</span>
</span>
</div> </div>
<div class="checkbox"> <div class="checkbox controlled-setting-with-label">
<span class="controlled-setting-with-label"> <label>
<input id="password-manager-enabled" <input id="password-manager-enabled"
pref="profile.password_manager_enabled" pref="profile.password_manager_enabled"
metric="Options_PasswordManager" type="checkbox"> metric="Options_PasswordManager" type="checkbox">
<span> <span i18n-content="passwordManagerEnabled"></span>
<label for="password-manager-enabled"
i18n-content="passwordManagerEnabled">
</label>
<span class="controlled-setting-indicator" <span class="controlled-setting-indicator"
pref="profile.password_manager_enabled"> pref="profile.password_manager_enabled"></span>
</span> </span>
</label>
<button id="manage-passwords" class="link-button" <button id="manage-passwords" class="link-button"
i18n-content="managePasswords"> i18n-content="managePasswords"></button>
</button>
</span>
</span>
</div> </div>
<if expr="is_macosx"> <if expr="is_macosx">
<div id="mac-passwords-warning" i18n-content="macPasswordsWarning" hidden> <div id="mac-passwords-warning" i18n-content="macPasswordsWarning" hidden>
...@@ -613,19 +558,16 @@ ...@@ -613,19 +558,16 @@
<button id="language-button" <button id="language-button"
i18n-content="languageAndSpellCheckSettingsButton"></button> i18n-content="languageAndSpellCheckSettingsButton"></button>
</div> </div>
<div class="checkbox"> <div class="checkbox controlled-setting-with-label">
<span class="controlled-setting-with-label"> <label>
<input id="enableTranslate" pref="translate.enabled" <input pref="translate.enabled"
metric="Options_Translate" type="checkbox"> metric="Options_Translate" type="checkbox">
<span> <span i18n-content="translateEnableTranslate"></span>
<label for="enableTranslate" i18n-content="translateEnableTranslate">
</label> </label>
<span class="controlled-setting-indicator" pref="translate.enabled"> <span class="controlled-setting-indicator" pref="translate.enabled">
</span> </span>
<button id="manage-languages" class="link-button" <button id="manage-languages" class="link-button"
i18n-content="manageLanguages"></button> i18n-content="manageLanguages"></button>
</span>
</span>
</div> </div>
</section> </section>
<section id="downloads-section"> <section id="downloads-section">
...@@ -646,33 +588,27 @@ ...@@ -646,33 +588,27 @@
pref="download.default_directory"> pref="download.default_directory">
</span> </span>
</div> </div>
<div class="checkbox"> <div class="checkbox controlled-setting-with-label">
<span class="controlled-setting-with-label"> <label>
<input id="prompt-for-download" type="checkbox" <input type="checkbox"
pref="download.prompt_for_download" pref="download.prompt_for_download"
metric="Options_AskForSaveLocation"> metric="Options_AskForSaveLocation">
<span> <span i18n-content="downloadLocationAskForSaveLocation"></span>
<label for="prompt-for-download"
i18n-content="downloadLocationAskForSaveLocation">
</label> </label>
<span class="controlled-setting-indicator" <span class="controlled-setting-indicator"
pref="download.prompt_for_download"> pref="download.prompt_for_download"></span>
</span>
</span>
</span>
</div> </div>
<if expr="chromeos"> <if expr="chromeos">
<div class="checkbox" id="disable-drive-row" guest-visibility="disabled"> <div class="checkbox controlled-setting-with-label"
<span class="controlled-setting-with-label"> id="disable-drive-row" guest-visibility="disabled">
<input id="drive-disabled" type="checkbox" <label>
<input type="checkbox"
pref="gdata.disabled" pref="gdata.disabled"
metric="Options_DisableGData"> metric="Options_DisableGData">
<span> <span i18n-content="disableGData"></span>
<label for="drive-disabled" i18n-content="disableGData"></label> </label>
<span class="controlled-setting-indicator" pref="gdata.disabled"> <span class="controlled-setting-indicator" pref="gdata.disabled">
</span> </span>
</span>
</span>
</div> </div>
</if> </if>
<div id="auto-open-file-types-section" hidden> <div id="auto-open-file-types-section" hidden>
...@@ -710,22 +646,17 @@ ...@@ -710,22 +646,17 @@
i18n-content="cloudPrintDevicesPageButton"> i18n-content="cloudPrintDevicesPageButton">
</button> </button>
<div class="checkbox" <div class="checkbox controlled-setting-with-label"
i18n-values=".hidden: cloudPrintHideNotificationsCheckbox"> i18n-values=".hidden: cloudPrintHideNotificationsCheckbox">
<span class="controlled-setting-with-label"> <label>
<input id="local-discovery-notifications-enabled" <input id="local-discovery-notifications-enabled"
pref="local_discovery.notifications_enabled" pref="local_discovery.notifications_enabled"
type="checkbox" type="checkbox"
metric="LocalDiscoveryNotificationsDisabled_Settings"> metric="LocalDiscoveryNotificationsDisabled_Settings">
<span> <span i18n-content="cloudPrintEnableNotificationsLabel"></span>
<label for="local-discovery-notifications-enabled"
i18n-content="cloudPrintEnableNotificationsLabel">
</label> </label>
<span class="controlled-setting-indicator" <span class="controlled-setting-indicator"
pref="local_discovery.notifications_enabled"> pref="local_discovery.notifications_enabled"></span>
</span>
</span>
</span>
</div> </div>
</section> </section>
</if> </if>
...@@ -741,87 +672,66 @@ ...@@ -741,87 +672,66 @@
i18n-content="learnMore"></a> i18n-content="learnMore"></a>
</p> </p>
<div class="option-name"> <div class="option-name">
<div class="checkbox"> <div class="checkbox controlled-setting-with-label">
<span class="controlled-setting-with-label"> <label>
<input id="accessibility-should-always-show-menu" <input
pref="settings.a11y.enable_menu" type="checkbox" pref="settings.a11y.enable_menu" type="checkbox"
metric="Options_AccessibilitySystemMenu"> metric="Options_AccessibilitySystemMenu">
<span> <span i18n-content="accessibilityAlwaysShowMenu"></span>
<label for="accessibility-should-always-show-menu"
i18n-content="accessibilityAlwaysShowMenu">
</label> </label>
<span class="controlled-setting-indicator" <span class="controlled-setting-indicator"
pref="settings.a11y.enable_menu"> pref="settings.a11y.enable_menu"></span>
</span>
</span>
</div> </div>
</div> </div>
<div class="option-name"> <div class="option-name">
<div class="checkbox"> <div class="checkbox controlled-setting-with-label">
<span class="controlled-setting-with-label"> <label>
<input id="accessibility-large-cursor-check" <input
pref="settings.a11y.large_cursor_enabled" type="checkbox" pref="settings.a11y.large_cursor_enabled" type="checkbox"
metric="Options_AccessibilityLargeMouseCursor"> metric="Options_AccessibilityLargeMouseCursor">
<span> <span i18n-content="accessibilityLargeCursor"></span>
<label for="accessibility-large-cursor-check"
i18n-content="accessibilityLargeCursor">
</label> </label>
<span class="controlled-setting-indicator" <span class="controlled-setting-indicator"
pref="settings.a11y.large_cursor_enabled"> pref="settings.a11y.large_cursor_enabled"></span>
</span>
</span>
</span>
</div> </div>
</div> </div>
<div class="option-name"> <div class="option-name">
<div class="checkbox"> <div class="checkbox controlled-setting-with-label">
<span class="controlled-setting-with-label"> <label>
<input id="accessibility-high-contrast-check" <input id="accessibility-high-contrast-check"
pref="settings.a11y.high_contrast_enabled" type="checkbox" pref="settings.a11y.high_contrast_enabled" type="checkbox"
metric="Options_AccessibilityHighContrastMode"> metric="Options_AccessibilityHighContrastMode">
<span> <span i18n-content="accessibilityHighContrast"></span>
<label for="accessibility-high-contrast-check"
i18n-content="accessibilityHighContrast">
</label> </label>
<span class="controlled-setting-indicator" <span class="controlled-setting-indicator"
pref="settings.a11y.high_contrast_enabled"> pref="settings.a11y.high_contrast_enabled">
</span> </span>
</span>
</span>
</div> </div>
</div> </div>
<div id="accessibility-sticky-keys" class="option-name"> <div id="accessibility-sticky-keys" class="option-name">
<div class="checkbox"> <div class="checkbox controlled-setting-with-label">
<span class="controlled-setting-with-label"> <label>
<input id="accessibility-sticky-keys-check" <input id="accessibility-sticky-keys-check"
pref="settings.a11y.sticky_keys_enabled" type="checkbox" pref="settings.a11y.sticky_keys_enabled" type="checkbox"
metric="Options_AccessibilityStickyKeys"> metric="Options_AccessibilityStickyKeys">
<span> <span i18n-content="accessibilityStickyKeys"></span>
<label for="accessibility-sticky-keys-check"
i18n-content="accessibilityStickyKeys">
</label> </label>
<span class="controlled-setting-indicator" <span class="controlled-setting-indicator"
pref="settings.a11y.sticky_keys_enabled"> pref="settings.a11y.sticky_keys_enabled"></span>
</span>
</span>
</span> </span>
</div> </div>
</div> </div>
<div class="option-name"> <div class="option-name">
<div class="checkbox"> <div class="checkbox controlled-setting-with-label">
<span class="controlled-setting-with-label"> <label>
<input id="accessibility-spoken-feedback-check" <input id="accessibility-spoken-feedback-check"
pref="settings.accessibility" type="checkbox" pref="settings.accessibility" type="checkbox"
metric="Options_AccessibilitySpokenFeedback"> metric="Options_AccessibilitySpokenFeedback">
<span> <span i18n-content="accessibilitySpokenFeedback"></span>
<label for="accessibility-spoken-feedback-check"
i18n-content="accessibilitySpokenFeedback">
</label> </label>
<span class="controlled-setting-indicator" <span class="controlled-setting-indicator"
pref="settings.accessibility"> pref="settings.accessibility">
</span> </span>
</span>
</span>
<div id="accessibility-settings" hidden> <div id="accessibility-settings" hidden>
<button id="accessibility-settings-button" <button id="accessibility-settings-button"
i18n-content="accessibilitySettings"></button> i18n-content="accessibilitySettings"></button>
...@@ -829,20 +739,14 @@ ...@@ -829,20 +739,14 @@
</div> </div>
</div> </div>
<div class="option-name"> <div class="option-name">
<div class="checkbox"> <div class="checkbox controlled-setting-with-label">
<span class="controlled-setting-with-label"> <input
<input id="accessibility-screen-magnifier-check"
pref="settings.a11y.screen_magnifier" type="checkbox" pref="settings.a11y.screen_magnifier" type="checkbox"
metric="Options_AccessibilityScreenMagnifier"> metric="Options_AccessibilityScreenMagnifier">
<span> <span i18n-content="accessibilityScreenMagnifier"></span>
<label for="accessibility-screen-magnifier-check"
i18n-content="accessibilityScreenMagnifier">
</label> </label>
<span class="controlled-setting-indicator" <span class="controlled-setting-indicator"
pref="settings.a11y.screen_magnifier"> pref="settings.a11y.screen_magnifier"></span>
</span>
</span>
</span>
</div> </div>
</div> </div>
<div class="option-name" id="accessibility-tap-dragging"> <div class="option-name" id="accessibility-tap-dragging">
...@@ -881,8 +785,10 @@ ...@@ -881,8 +785,10 @@
i18n-content="autoclickDelayExtremelyShort"></option> i18n-content="autoclickDelayExtremelyShort"></option>
<option value="400" <option value="400"
i18n-content="autoclickDelayVeryShort"></option> i18n-content="autoclickDelayVeryShort"></option>
<option value="600" i18n-content="autoclickDelayShort"></option> <option value="600" i18n-content="autoclickDelayShort">
<option value="800" i18n-content="autoclickDelayLong"></option> </option>
<option value="800" i18n-content="autoclickDelayLong">
</option>
<option value="1000" <option value="1000"
i18n-content="autoclickDelayVeryLong"></option> i18n-content="autoclickDelayVeryLong"></option>
</select> </select>
...@@ -896,20 +802,15 @@ ...@@ -896,20 +802,15 @@
</div> </div>
</div> </div>
<div class="option_name" id="accessibility_onscreen_keyboard"> <div class="option_name" id="accessibility_onscreen_keyboard">
<div class="checkbox"> <div class="checkbox controlled-setting-with-label">
<span class="controlled-setting-with-label"> <label>
<input id="accessibility-virtual-keyboard-check" <input pref="settings.a11y.virtual_keyboard" type="checkbox"
pref="settings.a11y.virtual_keyboard" type="checkbox"
metric="Options_AccessibilityOnScreenKeyboard"> metric="Options_AccessibilityOnScreenKeyboard">
<span> <span i18n-content="accessibilityVirtualKeyboard"></span>
<label for="accessibility-virtual-keyboard-check"
i18n-content="accessibilityVirtualKeyboard">
</label> </label>
<span class="controlled-setting-indicator" <span class="controlled-setting-indicator"
pref="settings.a11y.virtual_keyboard"> pref="settings.a11y.virtual_keyboard">
</span> </span>
</span>
</span>
</div> </div>
</div> </div>
</section> </section>
...@@ -930,34 +831,24 @@ ...@@ -930,34 +831,24 @@
<section id="system-section"> <section id="system-section">
<h3 i18n-content="advancedSectionTitleSystem"></h3> <h3 i18n-content="advancedSectionTitleSystem"></h3>
<if expr="not is_macosx"> <if expr="not is_macosx">
<div class="checkbox"> <div class="checkbox controlled-setting-with-label">
<span class="controlled-setting-with-label"> <label>
<input id="backgroundModeCheckbox" pref="background_mode.enabled" <input pref="background_mode.enabled"
type="checkbox"> type="checkbox">
<span> <span i18n-content="backgroundModeCheckbox"></span>
<label for="backgroundModeCheckbox"
i18n-content="backgroundModeCheckbox">
</label> </label>
<span class="controlled-setting-indicator" <span class="controlled-setting-indicator"
pref="background_mode.enabled"> pref="background_mode.enabled"></span>
</span>
</span>
</span>
</div> </div>
</if> </if>
<div class="checkbox"> <div class="checkbox controlled-setting-with-label">
<span class="controlled-setting-with-label"> <label>
<input id="gpu-mode-checkbox" <input id="gpu-mode-checkbox"
pref="hardware_acceleration_mode.enabled" type="checkbox"> pref="hardware_acceleration_mode.enabled" type="checkbox">
<span> <span i18n-content="gpuModeCheckbox">
<label for="gpu-mode-checkbox"
i18n-content="gpuModeCheckbox">
</label> </label>
<span id="gpu-mode-reset-restart" <span id="gpu-mode-reset-restart"
i18n-values=".innerHTML:gpuModeResetRestart"> i18n-values=".innerHTML:gpuModeResetRestart"></span>
</span>
</span>
</span>
</div> </div>
</section> </section>
</if> </if>
......
...@@ -120,8 +120,8 @@ cr.define('options', function() { ...@@ -120,8 +120,8 @@ cr.define('options', function() {
if (buttonId != '') { if (buttonId != '') {
var button = document.createElement('button'); var button = document.createElement('button');
button.setAttribute('id', buttonId); button.id = buttonId;
button.setAttribute('class', 'link-button'); button.className = 'link-button';
button.textContent = footerFragments[i + 1]; button.textContent = footerFragments[i + 1];
footer.appendChild(button); footer.appendChild(button);
i += 3; i += 3;
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
-webkit-box-align: center; -webkit-box-align: center;
-webkit-box-flex: 1; -webkit-box-flex: 1;
-webkit-margin-start: 0.6em; -webkit-margin-start: 0.6em;
-webkit-user-select: none;
display: -webkit-box; display: -webkit-box;
} }
......
...@@ -158,8 +158,8 @@ class SharedOptionsTest : public LoginManagerTest { ...@@ -158,8 +158,8 @@ class SharedOptionsTest : public LoginManagerTest {
"var success = false;" "var success = false;"
"if (input) {" "if (input) {"
" success = input.disabled == %d;" " success = input.disabled == %d;"
" var indicator = document.querySelector(input.tagName +" " var indicator = input.parentNode.parentNode.querySelector("
" prefSelector + ' + span span.controlled-setting-indicator');" " '.controlled-setting-indicator');"
" if (controlledBy) {" " if (controlledBy) {"
" success = success && indicator &&" " success = success && indicator &&"
" indicator.getAttribute('controlled-by') == controlledBy;" " indicator.getAttribute('controlled-by') == controlledBy;"
......
...@@ -99,7 +99,8 @@ GEN('#endif // defined(OS_MACOSX)'); ...@@ -99,7 +99,8 @@ GEN('#endif // defined(OS_MACOSX)');
TEST_F('OptionsWebUITest', 'MAYBE_testSetBooleanPrefTriggers', function() { TEST_F('OptionsWebUITest', 'MAYBE_testSetBooleanPrefTriggers', function() {
// TODO(dtseng): make generic to click all buttons. // TODO(dtseng): make generic to click all buttons.
var showHomeButton = $('show-home-button'); var showHomeButton =
document.querySelector('input[pref="browser.show_home_button"]');
var trueListValue = [ var trueListValue = [
'browser.show_home_button', 'browser.show_home_button',
true, true,
......
...@@ -256,7 +256,7 @@ input:disabled:-webkit-any([type='password'], ...@@ -256,7 +256,7 @@ input:disabled:-webkit-any([type='password'],
* Resolve this by using 'inherit'. */ * Resolve this by using 'inherit'. */
font: inherit; font: inherit;
margin: 0; margin: 0;
padding: 0 4px; padding: 0;
} }
.link-button:hover { .link-button:hover {
...@@ -295,7 +295,9 @@ input:disabled:-webkit-any([type='password'], ...@@ -295,7 +295,9 @@ input:disabled:-webkit-any([type='password'],
} }
:-webkit-any(.checkbox, .radio) label input ~ span { :-webkit-any(.checkbox, .radio) label input ~ span {
-webkit-margin-end: 0.3em;
-webkit-margin-start: 0.6em; -webkit-margin-start: 0.6em;
-webkit-user-select: none;
/* Make sure long spans wrap at the same horizontal position they start. */ /* Make sure long spans wrap at the same horizontal position they start. */
display: block; display: block;
} }
......
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