[tbb-commits] [Git][tpo/applications/tor-browser][tor-browser-115.9.0esr-13.5-1] 3 commits: fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in...

richard (@richard) git at gitlab.torproject.org
Thu Mar 14 16:42:16 UTC 2024



richard pushed to branch tor-browser-115.9.0esr-13.5-1 at The Tor Project / Applications / Tor Browser


Commits:
cdfc3cf2 by Henry Wilkes at 2024-03-14T16:38:30+00:00
fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection

Bug 42446: Improve accessible description of built-in radio options.

- - - - -
0a704bcc by Henry Wilkes at 2024-03-14T16:38:30+00:00
fixup! Tor Browser strings

Bug 42446: Add ending-punctuation to the "Current bridge" accessible
name to separate it from the rest of the built-bridge description.

- - - - -
018c552b by Henry Wilkes at 2024-03-14T16:38:30+00:00
fixup! Add TorStrings module for localization

Bug 42446: Drop old "Current bridge" string.

- - - - -


5 changed files:

- browser/components/torpreferences/content/builtinBridgeDialog.js
- browser/components/torpreferences/content/builtinBridgeDialog.xhtml
- browser/locales/en-US/browser/tor-browser.ftl
- toolkit/modules/TorStrings.sys.mjs
- toolkit/torbutton/chrome/locale/en-US/settings.properties


Changes:

=====================================
browser/components/torpreferences/content/builtinBridgeDialog.js
=====================================
@@ -57,18 +57,27 @@ const gBuiltinBridgeDialog = {
       const type = radio.value;
       optionEl.hidden = !TorSettings.builtinBridgeTypes.includes(type);
       radio.label = typeStrings[type].label;
-      optionEl.querySelector(
+      const descriptionEl = optionEl.querySelector(
         ".builtin-bridges-option-description"
-      ).textContent = typeStrings[type].descr;
-      optionEl.querySelector(
-        ".torPreferences-current-bridge-label"
-      ).textContent = TorStrings.settings.currentBridge;
-      optionEl
-        .querySelector(".bridge-status-badge")
-        .classList.toggle(
-          "bridge-status-current-built-in",
-          type === currentBuiltinType
+      );
+      descriptionEl.textContent = typeStrings[type].descr;
+      const currentBadge = optionEl.querySelector(".bridge-status-badge");
+      if (type === currentBuiltinType) {
+        const currentLabelEl = optionEl.querySelector(
+          ".torPreferences-current-bridge-label"
         );
+        // Described by both the current badge and the full description.
+        // These will be concatenated together in the screen reader output.
+        radio.setAttribute(
+          "aria-describedby",
+          `${currentLabelEl.id} ${descriptionEl.id}`
+        );
+        // Make visible.
+        currentBadge.classList.add("bridge-status-current-built-in");
+      } else {
+        // No visible badge.
+        radio.setAttribute("aria-describedby", descriptionEl.id);
+      }
     }
 
     if (currentBuiltinType) {


=====================================
browser/components/torpreferences/content/builtinBridgeDialog.xhtml
=====================================
@@ -9,6 +9,10 @@
   xmlns:html="http://www.w3.org/1999/xhtml"
 >
   <dialog id="torPreferences-builtinBridge-dialog" buttons="accept,cancel">
+    <linkset>
+      <html:link rel="localization" href="browser/tor-browser.ftl" />
+    </linkset>
+
     <script src="chrome://browser/content/torpreferences/builtinBridgeDialog.js" />
 
     <description id="torPreferences-builtinBridge-description"> </description>
@@ -18,15 +22,13 @@
           <!-- The radio option is described by both the "Current bridge" label
           - and the full description. If the "Connected" label is hidden, then
            - only the latter description should contribute. -->
-          <radio
-            aria-describedby="obfs-bridges-current obfs-bridges-description"
-            value="obfs4"
-          />
+          <radio value="obfs4" />
           <html:span class="bridge-status-badge">
             <html:div class="bridge-status-icon"></html:div>
             <html:span
               id="obfs-bridges-current"
               class="torPreferences-current-bridge-label"
+              data-l10n-id="built-in-dialog-current-bridge-label"
             >
             </html:span>
           </html:span>
@@ -39,15 +41,13 @@
       </vbox>
       <vbox class="builtin-bridges-option">
         <hbox>
-          <radio
-            aria-describedby="snowflake-bridges-current snowflake-bridges-description"
-            value="snowflake"
-          />
+          <radio value="snowflake" />
           <html:span class="bridge-status-badge">
             <html:div class="bridge-status-icon"></html:div>
             <html:span
               id="snowflake-bridges-current"
               class="torPreferences-current-bridge-label"
+              data-l10n-id="built-in-dialog-current-bridge-label"
             >
             </html:span>
           </html:span>
@@ -60,15 +60,13 @@
       </vbox>
       <vbox class="builtin-bridges-option">
         <hbox>
-          <radio
-            aria-describedby="meek-bridges-current meek-bridges-description"
-            value="meek-azure"
-          />
+          <radio value="meek-azure" />
           <html:span class="bridge-status-badge">
             <html:div class="bridge-status-icon"></html:div>
             <html:span
               id="meek-bridges-current"
               class="torPreferences-current-bridge-label"
+              data-l10n-id="built-in-dialog-current-bridge-label"
             >
             </html:span>
           </html:span>


=====================================
browser/locales/en-US/browser/tor-browser.ftl
=====================================
@@ -297,3 +297,10 @@ user-provide-bridge-dialog-result-invite = The following bridges were shared wit
 user-provide-bridge-dialog-result-addresses = The following bridges were entered by you.
 user-provide-bridge-dialog-next-button =
     .label = Next
+
+## Built-in bridges dialog.
+
+# Label attached to the built-in bridge option that is already in use.
+# The "aria-label" should use the same text, but include some ending punctuation to separate it from the sentence that follows. This is used for screen reader users.
+built-in-dialog-current-bridge-label = Current bridge
+    .aria-label = Current bridge.


=====================================
toolkit/modules/TorStrings.sys.mjs
=====================================
@@ -98,7 +98,6 @@ const Loader = {
       bridgeLocationFrequent: "Frequently selected locations",
       bridgeLocationOther: "Other locations",
       bridgeChooseForMe: "Choose a Bridge For Me…",
-      currentBridge: "Current bridge",
       remove: "Remove",
       bridgeDisableBuiltIn: "Disable built-in bridges",
       copied: "Copied!",


=====================================
toolkit/torbutton/chrome/locale/en-US/settings.properties
=====================================
@@ -33,7 +33,6 @@ settings.bridgeLocationFrequent=Frequently selected locations
 settings.bridgeLocationOther=Other locations
 settings.bridgeChooseForMe=Choose a Bridge For Me…
 
-settings.currentBridge=Current bridge
 settings.remove=Remove
 settings.bridgeDisableBuiltIn=Disable built-in bridges
 settings.copied=Copied!



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/788a92e2ef9341f8e0d4b84ae74fbe6ef39d80a9...018c552bf646b23afca9734b448b8172ecaba6f3

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/788a92e2ef9341f8e0d4b84ae74fbe6ef39d80a9...018c552bf646b23afca9734b448b8172ecaba6f3
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20240314/3858feb6/attachment-0001.htm>


More information about the tbb-commits mailing list