Bug 1487304: Add more labels/descriptions in Privacy preferences for accessibility. r=johannh,MarcoZ
authorJames Teh <jteh@mozilla.com>
Fri, 31 Aug 2018 07:57:57 +0000
changeset 491945 e67f28fac303774e424dee53737744f3fb2bf77e
parent 491944 ee3ad446328d649e05b06c51122709340552bd6e
child 491946 bc09f31ad41fb40241111822c17e0ec0fbd00f28
push id1815
push userffxbld-merge
push dateMon, 15 Oct 2018 10:40:45 +0000
treeherdermozilla-release@18d4c09e9378 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjohannh, MarcoZ
bugs1487304
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1487304: Add more labels/descriptions in Privacy preferences for accessibility. r=johannh,MarcoZ This allows screen reader users to determine the context of various controls when tabbing through them. Specific changes: 1. Describe the "Cookies and Site Data" group using the disk space indicator; e.g. "Your stored cookies, site data and cache are currently using 315 MB of disk space." 2. Associate the description for the "Content Blocking" group; i.e. "Block third-party content, like ads or code..." 3. Correct association of the label for the "Do Not Track" setting; i.e. 'Send websites a “Do Not Track” signal that you don’t want to be tracked' 4. Associate the label for the "Permissions" group. 5. Make each permission a labelled group so the user knows what the various "Settings…" buttons are for. 6. Associate the label for the "Data Collection and Use" group. Differential Revision: https://phabricator.services.mozilla.com/D4638
browser/components/preferences/in-content/privacy.xul
--- a/browser/components/preferences/in-content/privacy.xul
+++ b/browser/components/preferences/in-content/privacy.xul
@@ -157,17 +157,17 @@
                                 &itemSitePreferences.label;
                                 &itemOfflineApps.label;"/>
       </hbox>
     </vbox>
   </hbox>
 </groupbox>
 
 <!-- Site Data -->
-<groupbox id="siteDataGroup" data-category="panePrivacy" hidden="true">
+<groupbox id="siteDataGroup" data-category="panePrivacy" hidden="true" aria-describedby="totalSiteDataSize">
   <caption><label data-l10n-id="sitedata-header"/></caption>
 
   <hbox data-subcategory="sitedata" align="baseline">
     <vbox flex="1">
       <description class="description-with-side-element" flex="1">
         <html:span id="totalSiteDataSize" class="tail-with-learn-more"></html:span>
         <label id="siteDataLearnMoreLink"
           class="learnMore text-link" data-l10n-id="sitedata-learn-more"/>
@@ -274,17 +274,17 @@
             preference="browser.urlbar.suggest.bookmark"/>
   <checkbox id="openpageSuggestion" data-l10n-id="addressbar-locbar-openpage-option"
             preference="browser.urlbar.suggest.openpage"/>
   <label class="text-link" id="openSearchEnginePreferences"
          data-l10n-id="addressbar-suggestions-settings"/>
 </groupbox>
 
 <!-- Tracking / Content Blocking -->
-<groupbox id="trackingGroup" data-category="panePrivacy" hidden="true">
+<groupbox id="trackingGroup" data-category="panePrivacy" hidden="true" aria-describedby="contentBlockingDescription">
   <caption>
     <label id="trackingProtectionHeader" hidden="true" data-l10n-id="tracking-header"/>
     <label id="contentBlockingHeader" data-l10n-id="content-blocking-header"/>
   </caption>
   <vbox data-subcategory="trackingprotection">
     <hbox align="start">
       <vbox flex="1">
         <description id="trackingProtectionDescription" class="description-with-side-element" hidden="true" data-l10n-id="tracking-desc">
@@ -476,17 +476,17 @@
                   flex="1"
                   data-l10n-id="tracking-change-block-list"
                   preference="pref.privacy.disable_button.change_blocklist"
                   search-l10n-ids="blocklist-window.title, blocklist-desc, blocklist-button-cancel.label, blocklist-button-ok.label"/>
         </hbox>
       </vbox>
     </hbox>
     <vbox id="doNotTrackLearnMoreBox">
-      <label><label class="tail-with-learn-more" data-l10n-id="do-not-track-description"></label><label
+      <label><label class="tail-with-learn-more" data-l10n-id="do-not-track-description" id="doNotTrackDesc"></label><label
       class="learnMore text-link" href="https://www.mozilla.org/dnt"
       data-l10n-id="do-not-track-learn-more"></label></label>
       <radiogroup id="doNotTrackRadioGroup" aria-labelledby="doNotTrackDesc" preference="privacy.donottrackheader.enabled">
         <radio value="true" data-l10n-id="do-not-track-option-always"/>
         <radio value="false" data-l10n-id="do-not-track-option-default"/>
       </radiogroup>
     </vbox>
   </vbox>
@@ -495,26 +495,26 @@
 <hbox id="permissionsCategory"
       class="subcategory"
       hidden="true"
       data-category="panePrivacy">
   <label class="header-name" flex="1" data-l10n-id="permissions-header"/>
 </hbox>
 
 <!-- Permissions -->
-<groupbox id="permissionsGroup" data-category="panePrivacy" hidden="true" data-subcategory="permissions">
-  <caption class="search-header" hidden="true"><label data-l10n-id="permissions-header"/></caption>
+<groupbox id="permissionsGroup" data-category="panePrivacy" hidden="true" data-subcategory="permissions" aria-labelledby="permissionsGroupLabel">
+  <caption class="search-header" hidden="true"><label data-l10n-id="permissions-header" id="permissionsGroupLabel"/></caption>
 
   <grid>
     <columns>
       <column flex="1"/>
       <column/>
     </columns>
     <rows>
-      <row id="locationSettingsRow" align="center">
+      <row id="locationSettingsRow" align="center" role="group" aria-labelledby="locationPermissionsLabel">
         <description flex="1">
           <image class="geo-icon permission-icon" />
           <separator orient="vertical" class="thin"/>
           <label id="locationPermissionsLabel" data-l10n-id="permissions-location"/>
         </description>
         <hbox pack="end">
           <button id="locationSettingsButton"
                   class="accessory-button"
@@ -527,17 +527,17 @@
                     permissions-site-location-window.title,
                     permissions-site-location-desc,
                     permissions-site-location-disable-label,
                     permissions-site-location-disable-desc,
                   " />
         </hbox>
       </row>
 
-      <row id="cameraSettingsRow" align="center">
+      <row id="cameraSettingsRow" align="center" role="group" aria-labelledby="cameraPermissionsLabel">
         <description flex="1">
           <image class="camera-icon permission-icon" />
           <separator orient="vertical" class="thin"/>
           <label id="cameraPermissionsLabel" data-l10n-id="permissions-camera"/>
         </description>
         <hbox pack="end">
           <button id="cameraSettingsButton"
                   class="accessory-button"
@@ -550,17 +550,17 @@
                     permissions-site-camera-window.title,
                     permissions-site-camera-desc,
                     permissions-site-camera-disable-label,
                     permissions-site-camera-disable-desc,
                   " />
         </hbox>
       </row>
 
-      <row id="microphoneSettingsRow" align="center">
+      <row id="microphoneSettingsRow" align="center" role="group" aria-labelledby="microphonePermissionsLabel">
         <description flex="1">
           <image class="microphone-icon permission-icon" />
           <separator orient="vertical" class="thin"/>
           <label id="microphonePermissionsLabel" data-l10n-id="permissions-microphone"/>
         </description>
         <hbox pack="end">
           <button id="microphoneSettingsButton"
                   class="accessory-button"
@@ -573,17 +573,17 @@
                     permissions-site-microphone-window.title,
                     permissions-site-microphone-desc,
                     permissions-site-microphone-disable-label,
                     permissions-site-microphone-disable-desc,
                   " />
         </hbox>
       </row>
 
-      <row id="notificationSettingsRow" align="center">
+      <row id="notificationSettingsRow" align="center" role="group" aria-labelledby="notificationPermissionsLabel">
         <description flex="1">
           <image class="desktop-notification-icon permission-icon" />
           <separator orient="vertical" class="thin"/>
           <label id="notificationPermissionsLabel"
                  class="tail-with-learn-more"
                  data-l10n-id="permissions-notification"/>
           <label id="notificationPermissionsLearnMore"
                  class="learnMore text-link"
@@ -725,18 +725,18 @@
 #ifdef MOZ_DATA_REPORTING
 <hbox id="dataCollectionCategory"
       class="subcategory"
       hidden="true"
       data-category="panePrivacy">
   <label class="header-name" flex="1" data-l10n-id="collection-header"/>
 </hbox>
 
-<groupbox id="dataCollectionGroup" data-category="panePrivacy" hidden="true">
-  <caption class="search-header" hidden="true"><label data-l10n-id="collection-header"/></caption>
+<groupbox id="dataCollectionGroup" data-category="panePrivacy" hidden="true" aria-labelledby="dataCollectionGroupLabel">
+  <caption class="search-header" hidden="true"><label data-l10n-id="collection-header" id="dataCollectionGroupLabel"/></caption>
 
   <description>
     <label class="tail-with-learn-more" data-l10n-id="collection-description"/>
     <label id="dataCollectionPrivacyNotice"
            class="learnMore text-link"
            data-l10n-id="collection-privacy-notice"/>
   </description>
   <vbox data-subcategory="reports">