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
-
0a704bcc
by Henry Wilkes at 2024-03-14T16:38:30+00:00
-
018c552b
by Henry Wilkes at 2024-03-14T16:38:30+00:00
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:
... | ... | @@ -57,18 +57,27 @@ const gBuiltinBridgeDialog = { |
57 | 57 | const type = radio.value;
|
58 | 58 | optionEl.hidden = !TorSettings.builtinBridgeTypes.includes(type);
|
59 | 59 | radio.label = typeStrings[type].label;
|
60 | - optionEl.querySelector(
|
|
60 | + const descriptionEl = optionEl.querySelector(
|
|
61 | 61 | ".builtin-bridges-option-description"
|
62 | - ).textContent = typeStrings[type].descr;
|
|
63 | - optionEl.querySelector(
|
|
64 | - ".torPreferences-current-bridge-label"
|
|
65 | - ).textContent = TorStrings.settings.currentBridge;
|
|
66 | - optionEl
|
|
67 | - .querySelector(".bridge-status-badge")
|
|
68 | - .classList.toggle(
|
|
69 | - "bridge-status-current-built-in",
|
|
70 | - type === currentBuiltinType
|
|
62 | + );
|
|
63 | + descriptionEl.textContent = typeStrings[type].descr;
|
|
64 | + const currentBadge = optionEl.querySelector(".bridge-status-badge");
|
|
65 | + if (type === currentBuiltinType) {
|
|
66 | + const currentLabelEl = optionEl.querySelector(
|
|
67 | + ".torPreferences-current-bridge-label"
|
|
71 | 68 | );
|
69 | + // Described by both the current badge and the full description.
|
|
70 | + // These will be concatenated together in the screen reader output.
|
|
71 | + radio.setAttribute(
|
|
72 | + "aria-describedby",
|
|
73 | + `${currentLabelEl.id} ${descriptionEl.id}`
|
|
74 | + );
|
|
75 | + // Make visible.
|
|
76 | + currentBadge.classList.add("bridge-status-current-built-in");
|
|
77 | + } else {
|
|
78 | + // No visible badge.
|
|
79 | + radio.setAttribute("aria-describedby", descriptionEl.id);
|
|
80 | + }
|
|
72 | 81 | }
|
73 | 82 | |
74 | 83 | if (currentBuiltinType) {
|
... | ... | @@ -9,6 +9,10 @@ |
9 | 9 | xmlns:html="http://www.w3.org/1999/xhtml"
|
10 | 10 | >
|
11 | 11 | <dialog id="torPreferences-builtinBridge-dialog" buttons="accept,cancel">
|
12 | + <linkset>
|
|
13 | + <html:link rel="localization" href="">"browser/tor-browser.ftl" />
|
|
14 | + </linkset>
|
|
15 | + |
|
12 | 16 | <script src="">"chrome://browser/content/torpreferences/builtinBridgeDialog.js" />
|
13 | 17 | |
14 | 18 | <description id="torPreferences-builtinBridge-description"> </description>
|
... | ... | @@ -18,15 +22,13 @@ |
18 | 22 | <!-- The radio option is described by both the "Current bridge" label
|
19 | 23 | - and the full description. If the "Connected" label is hidden, then
|
20 | 24 | - only the latter description should contribute. -->
|
21 | - <radio
|
|
22 | - aria-describedby="obfs-bridges-current obfs-bridges-description"
|
|
23 | - value="obfs4"
|
|
24 | - />
|
|
25 | + <radio value="obfs4" />
|
|
25 | 26 | <html:span class="bridge-status-badge">
|
26 | 27 | <html:div class="bridge-status-icon"></html:div>
|
27 | 28 | <html:span
|
28 | 29 | id="obfs-bridges-current"
|
29 | 30 | class="torPreferences-current-bridge-label"
|
31 | + data-l10n-id="built-in-dialog-current-bridge-label"
|
|
30 | 32 | >
|
31 | 33 | </html:span>
|
32 | 34 | </html:span>
|
... | ... | @@ -39,15 +41,13 @@ |
39 | 41 | </vbox>
|
40 | 42 | <vbox class="builtin-bridges-option">
|
41 | 43 | <hbox>
|
42 | - <radio
|
|
43 | - aria-describedby="snowflake-bridges-current snowflake-bridges-description"
|
|
44 | - value="snowflake"
|
|
45 | - />
|
|
44 | + <radio value="snowflake" />
|
|
46 | 45 | <html:span class="bridge-status-badge">
|
47 | 46 | <html:div class="bridge-status-icon"></html:div>
|
48 | 47 | <html:span
|
49 | 48 | id="snowflake-bridges-current"
|
50 | 49 | class="torPreferences-current-bridge-label"
|
50 | + data-l10n-id="built-in-dialog-current-bridge-label"
|
|
51 | 51 | >
|
52 | 52 | </html:span>
|
53 | 53 | </html:span>
|
... | ... | @@ -60,15 +60,13 @@ |
60 | 60 | </vbox>
|
61 | 61 | <vbox class="builtin-bridges-option">
|
62 | 62 | <hbox>
|
63 | - <radio
|
|
64 | - aria-describedby="meek-bridges-current meek-bridges-description"
|
|
65 | - value="meek-azure"
|
|
66 | - />
|
|
63 | + <radio value="meek-azure" />
|
|
67 | 64 | <html:span class="bridge-status-badge">
|
68 | 65 | <html:div class="bridge-status-icon"></html:div>
|
69 | 66 | <html:span
|
70 | 67 | id="meek-bridges-current"
|
71 | 68 | class="torPreferences-current-bridge-label"
|
69 | + data-l10n-id="built-in-dialog-current-bridge-label"
|
|
72 | 70 | >
|
73 | 71 | </html:span>
|
74 | 72 | </html:span>
|
... | ... | @@ -297,3 +297,10 @@ user-provide-bridge-dialog-result-invite = The following bridges were shared wit |
297 | 297 | user-provide-bridge-dialog-result-addresses = The following bridges were entered by you.
|
298 | 298 | user-provide-bridge-dialog-next-button =
|
299 | 299 | .label = Next
|
300 | + |
|
301 | +## Built-in bridges dialog.
|
|
302 | + |
|
303 | +# Label attached to the built-in bridge option that is already in use.
|
|
304 | +# 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.
|
|
305 | +built-in-dialog-current-bridge-label = Current bridge
|
|
306 | + .aria-label = Current bridge. |
... | ... | @@ -98,7 +98,6 @@ const Loader = { |
98 | 98 | bridgeLocationFrequent: "Frequently selected locations",
|
99 | 99 | bridgeLocationOther: "Other locations",
|
100 | 100 | bridgeChooseForMe: "Choose a Bridge For Me…",
|
101 | - currentBridge: "Current bridge",
|
|
102 | 101 | remove: "Remove",
|
103 | 102 | bridgeDisableBuiltIn: "Disable built-in bridges",
|
104 | 103 | copied: "Copied!",
|
... | ... | @@ -33,7 +33,6 @@ settings.bridgeLocationFrequent=Frequently selected locations |
33 | 33 | settings.bridgeLocationOther=Other locations
|
34 | 34 | settings.bridgeChooseForMe=Choose a Bridge For Me…
|
35 | 35 | |
36 | -settings.currentBridge=Current bridge
|
|
37 | 36 | settings.remove=Remove
|
38 | 37 | settings.bridgeDisableBuiltIn=Disable built-in bridges
|
39 | 38 | settings.copied=Copied!
|