browser/components/preferences/in-content/sync.xul
author Paolo Amadini <paolo.mozmail@amadzone.org>
Tue, 20 Nov 2018 15:14:18 +0000
changeset 506620 004331df8823ee887cc787e29ef7efe4fa4e596f
parent 484166 135c148a2aadf00d19d3403aecd90cf4329329ea
child 508687 3fe6e58ce394b8324c166123266be913bd9faa29
permissions -rwxr-xr-x
Bug 1429940 - Part 2 - Use HTML headings inside the "label" element for labeling "groupbox" elements in Preferences, instead of the "caption" element. r=MarcoZ,dao,jaws,flod This makes it possible to navigate by headings when using accessibility technology. Information labels displayed when removing the master password are also restored. Differential Revision: https://phabricator.services.mozilla.com/D11792

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

<!-- Sync panel -->

<script type="application/javascript"
        src="chrome://browser/content/preferences/in-content/sync.js"/>

<hbox id="firefoxAccountCategory"
      class="subcategory"
      hidden="true"
      data-category="paneSync">
  <label class="header-name" flex="1" data-l10n-id="pane-sync-title" />
</hbox>

<deck id="weavePrefsDeck" data-category="paneSync" hidden="true"
      data-hidden-from-search="true">
  <groupbox id="noFxaAccount">
    <hbox>
      <vbox flex="1">
        <label id="noFxaCaption"><html:h2 data-l10n-id="sync-signedout-caption"/></label>
        <description id="noFxaDescription" flex="1" data-l10n-id="sync-signedout-description"/>
      </vbox>
      <vbox>
        <image class="fxaSyncIllustration"/>
      </vbox>
    </hbox>
    <hbox id="fxaNoLoginStatus" align="center" flex="1">
      <vbox>
        <image class="fxaProfileImage"/>
      </vbox>
      <vbox flex="1">
        <hbox align="center" flex="1">
          <hbox align="center" flex="1">
            <label id="signedOutAccountBoxTitle"><html:h2 data-l10n-id="sync-signedout-account-title"/></label>
          </hbox>
          <button id="noFxaSignIn"
                  class="accessory-button"
                  data-l10n-id="sync-signedout-account-signin"/>
        </hbox>
        <hbox align="center" flex="1">
          <html:a id="noFxaSignUp"
                  class="openLink"
                  data-l10n-id="sync-signedout-account-create" />
        </hbox>
      </vbox>
    </hbox>
    <label class="fxaMobilePromo" data-l10n-id="sync-mobile-promo">
      <html:img
        src="chrome://browser/skin/preferences/in-content/logo-android.svg"
        data-l10n-name="android-icon"
        class="androidIcon"/>
      <html:a
        id="fxaMobilePromo-android"
        data-l10n-name="android-link"
        class="text-link" target="_blank"/>
      <html:img
        src="chrome://browser/skin/preferences/in-content/logo-ios.svg"
        data-l10n-name="ios-icon"
        class="iOSIcon"/>
      <html:a
        id="fxaMobilePromo-ios"
        data-l10n-name="ios-link"
        class="text-link" target="_blank"/>
    </label>
  </groupbox>

  <vbox id="hasFxaAccount">
    <hbox>
      <vbox id="fxaContentWrapper" flex="1">
        <groupbox id="fxaGroup">
          <label class="search-header" hidden="true"><html:h2 data-l10n-id="pane-sync-title"/></label>

          <deck id="fxaLoginStatus" flex="1">

            <!-- logged in and verified and all is good -->
            <hbox id="fxaLoginVerified" align="center" flex="1">
              <image class="fxaProfileImage actionable"
                     role="button"
                     onclick="gSyncPane.openChangeProfileImage(event);"
                     onkeypress="gSyncPane.openChangeProfileImage(event);"
                     data-l10n-id="sync-profile-picture"/>
              <vbox flex="1" pack="center">
                <hbox flex="1" align="baseline">
                  <label id="fxaDisplayName" hidden="true">
                    <html:h2 id="fxaDisplayNameHeading"/>
                  </label>
                  <label id="fxaEmailAddress" flex="1" crop="end"/>
                  <button id="fxaUnlinkButton"
                          class="accessory-button"
                          data-l10n-id="sync-disconnect"/>
                </hbox>
                <hbox>
                  <html:a id="verifiedManage" class="openLink"
                          data-l10n-id="sync-manage-account"
                          onkeypress="gSyncPane.openManageFirefoxAccount(event);"/>
                </hbox>
              </vbox>
            </hbox>

            <!-- logged in to an unverified account -->
            <hbox id="fxaLoginUnverified">
              <vbox>
                <image class="fxaProfileImage"/>
              </vbox>
              <vbox flex="1" pack="center">
                <hbox align="center">
                  <image class="fxaLoginRejectedWarning"/>
                  <description flex="1"
                    class="l10nArgsEmailAddress"
                    data-l10n-id="sync-signedin-unverified"
                    data-l10n-args='{"email": ""}'/>
                </hbox>
                <hbox class="fxaAccountBoxButtons">
                  <button id="verifyFxaAccount" data-l10n-id="sync-resend-verification"/>
                  <button id="unverifiedUnlinkFxaAccount" data-l10n-id="sync-remove-account"/>
                </hbox>
              </vbox>
            </hbox>

            <!-- logged in locally but server rejected credentials -->
            <hbox id="fxaLoginRejected">
              <vbox>
                <image class="fxaProfileImage"/>
              </vbox>
              <vbox flex="1" pack="center">
                <hbox align="center">
                  <image class="fxaLoginRejectedWarning"/>
                  <description flex="1"
                    class="l10nArgsEmailAddress"
                    data-l10n-id="sync-signedin-login-failure"
                    data-l10n-args='{"email": ""}'/>
                </hbox>
                <hbox class="fxaAccountBoxButtons">
                  <button id="rejectReSignIn" data-l10n-id="sync-sign-in"/>
                  <button id="rejectUnlinkFxaAccount" data-l10n-id="sync-remove-account"/>
                </hbox>
              </vbox>
            </hbox>
          </deck>
        </groupbox>
        <groupbox id="syncOptions">
          <label><html:h2 data-l10n-id="sync-signedin-settings-header"/></label>
          <description data-l10n-id="sync-signedin-settings-desc"/>
          <hbox id="fxaSyncEngines">
            <vbox flex="1">
              <!-- by design, no tooltip for bookmarks or history -->
              <checkbox data-l10n-id="sync-engine-bookmarks"
                        preference="engine.bookmarks"/>
              <checkbox data-l10n-id="sync-engine-history"
                        preference="engine.history"/>
              <checkbox data-l10n-id="sync-engine-tabs"
                        preference="engine.tabs"/>
              <checkbox data-l10n-id="sync-engine-logins"
                        preference="engine.passwords"/>
            </vbox>
            <vbox flex="1">
              <checkbox data-l10n-id="sync-engine-addresses"
                        preference="engine.addresses"/>
              <checkbox data-l10n-id="sync-engine-creditcards"
                        preference="engine.creditcards"/>
              <checkbox data-l10n-id="sync-engine-addons"
                        preference="engine.addons"/>
              <checkbox data-l10n-id="sync-engine-prefs"
                        preference="engine.prefs"/>
            </vbox>
            <spacer/>
          </hbox>
        </groupbox>
      </vbox>
    </hbox>
    <groupbox>
      <label control="fxaSyncComputerName"><html:h2 data-l10n-id="sync-device-name-header"/></label>
      <hbox id="fxaDeviceName">
        <textbox id="fxaSyncComputerName" flex="1" disabled="true"/>
        <button id="fxaChangeDeviceName"
                data-l10n-id="sync-device-name-change"/>
        <button id="fxaCancelChangeDeviceName"
                data-l10n-id="sync-device-name-cancel"
                hidden="true"/>
        <button id="fxaSaveChangeDeviceName"
                data-l10n-id="sync-device-name-save"
                hidden="true"/>
      </hbox>
    </groupbox>
    <vbox align="start">
      <label id="mobilePromo-singledevice"
             class="text-link fxaMobilePromo" data-l10n-id="sync-mobilepromo-single"/>
      <label id="mobilePromo-multidevice"
             class="text-link fxaMobilePromo" data-l10n-id="sync-mobilepromo-multi"/>
    </vbox>
    <vbox id="tosPP-small" align="start">
      <label id="tosPP-small-ToS" class="text-link" data-l10n-id="sync-tos-link"/>
      <label id="tosPP-small-PP" class="text-link" data-l10n-id="sync-fxa-privacy-notice"/>
    </vbox>
  </vbox>
</deck>