Commits:
-
e4243a7f
by Henry Wilkes at 2024-11-25T22:15:46+00:00
fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection
Bug 43314: Show initial focus for the connection settings dialog.
-
76241a15
by Henry Wilkes at 2024-11-25T22:15:46+00:00
fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection
Bug 43314: Use <description> instead of <h3> for dialog introduction
text.
This keeps the style and semantics consistent with other dialogs.
-
535b9be0
by Henry Wilkes at 2024-11-25T22:15:46+00:00
fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection
Bug 43314: Add control attributes to the xul:label elements in the
connection settings.
These associate the form controls with their labels, giving them an
accessible name and an additional click target.
5 changed files:
Changes:
browser/components/torpreferences/content/connectionSettingsDialog.js
| ... |
... |
@@ -317,6 +317,16 @@ const gConnectionSettingsDialog = { |
|
317
|
317
|
},
|
|
318
|
318
|
};
|
|
319
|
319
|
|
|
|
320
|
+// Initial focus is not visible, even if opened with a keyboard. We avoid the
|
|
|
321
|
+// default handler and manage the focus ourselves, which will paint the focus
|
|
|
322
|
+// ring by default.
|
|
|
323
|
+// NOTE: A side effect is that the focus ring will show even if the user opened
|
|
|
324
|
+// with a mouse event.
|
|
|
325
|
+// TODO: Remove this once bugzilla bug 1708261 is resolved.
|
|
|
326
|
+document.subDialogSetDefaultFocus = () => {
|
|
|
327
|
+ document.getElementById("torPreferences-connection-toggleProxy").focus();
|
|
|
328
|
+};
|
|
|
329
|
+
|
|
320
|
330
|
window.addEventListener(
|
|
321
|
331
|
"DOMContentLoaded",
|
|
322
|
332
|
() => {
|
browser/components/torpreferences/content/connectionSettingsDialog.xhtml
| ... |
... |
@@ -24,10 +24,10 @@ |
|
24
|
24
|
|
|
25
|
25
|
<script src="">"chrome://browser/content/torpreferences/connectionSettingsDialog.js" />
|
|
26
|
26
|
|
|
27
|
|
- <html:h3
|
|
|
27
|
+ <description
|
|
28
|
28
|
id="torPreferences-connection-header"
|
|
29
|
29
|
data-l10n-id="tor-advanced-dialog-introduction"
|
|
30
|
|
- ></html:h3>
|
|
|
30
|
+ ></description>
|
|
31
|
31
|
<!-- Local Proxy -->
|
|
32
|
32
|
<checkbox
|
|
33
|
33
|
id="torPreferences-connection-toggleProxy"
|
| ... |
... |
@@ -38,6 +38,7 @@ |
|
38
|
38
|
<label
|
|
39
|
39
|
id="torPreferences-localProxy-type"
|
|
40
|
40
|
data-l10n-id="tor-advanced-dialog-proxy-type-selector-label"
|
|
|
41
|
+ control="torPreferences-localProxy-builtinList"
|
|
41
|
42
|
/>
|
|
42
|
43
|
</hbox>
|
|
43
|
44
|
<hbox align="center">
|
| ... |
... |
@@ -53,6 +54,7 @@ |
|
53
|
54
|
<label
|
|
54
|
55
|
id="torPreferences-localProxy-address"
|
|
55
|
56
|
data-l10n-id="tor-advanced-dialog-proxy-address-input-label"
|
|
|
57
|
+ control="torPreferences-localProxy-textboxAddress"
|
|
56
|
58
|
/>
|
|
57
|
59
|
</hbox>
|
|
58
|
60
|
<hbox align="center">
|
| ... |
... |
@@ -65,6 +67,7 @@ |
|
65
|
67
|
<label
|
|
66
|
68
|
id="torPreferences-localProxy-port"
|
|
67
|
69
|
data-l10n-id="tor-advanced-dialog-proxy-port-input-label"
|
|
|
70
|
+ control="torPreferences-localProxy-textboxPort"
|
|
68
|
71
|
/>
|
|
69
|
72
|
<!-- proxy-port-input class style pulled from preferences.css and used in the vanilla proxy setup menu -->
|
|
70
|
73
|
<html:input
|
| ... |
... |
@@ -81,6 +84,7 @@ |
|
81
|
84
|
<label
|
|
82
|
85
|
id="torPreferences-localProxy-username"
|
|
83
|
86
|
data-l10n-id="tor-advanced-dialog-proxy-username-input-label"
|
|
|
87
|
+ control="torPreferences-localProxy-textboxUsername"
|
|
84
|
88
|
/>
|
|
85
|
89
|
</hbox>
|
|
86
|
90
|
<hbox align="center">
|
| ... |
... |
@@ -93,6 +97,7 @@ |
|
93
|
97
|
<label
|
|
94
|
98
|
id="torPreferences-localProxy-password"
|
|
95
|
99
|
data-l10n-id="tor-advanced-dialog-proxy-password-input-label"
|
|
|
100
|
+ control="torPreferences-localProxy-textboxPassword"
|
|
96
|
101
|
/>
|
|
97
|
102
|
<html:input
|
|
98
|
103
|
id="torPreferences-localProxy-textboxPassword"
|
| ... |
... |
@@ -112,6 +117,7 @@ |
|
112
|
117
|
<label
|
|
113
|
118
|
id="torPreferences-connection-allowedPorts"
|
|
114
|
119
|
data-l10n-id="tor-advanced-dialog-firewall-ports-input-label"
|
|
|
120
|
+ control="torPreferences-connection-textboxAllowedPorts"
|
|
115
|
121
|
/>
|
|
116
|
122
|
</hbox>
|
|
117
|
123
|
<hbox id="torPreferences-connection-hboxAllowedPorts" align="center">
|
browser/components/torpreferences/content/requestBridgeDialog.js
| ... |
... |
@@ -15,7 +15,7 @@ const log = console.createInstance({ |
|
15
|
15
|
|
|
16
|
16
|
const gRequestBridgeDialog = {
|
|
17
|
17
|
selectors: {
|
|
18
|
|
- dialogHeader: "h3#torPreferences-requestBridge-header",
|
|
|
18
|
+ dialogHeader: "#torPreferences-requestBridge-header",
|
|
19
|
19
|
captchaImage: "image#torPreferences-requestBridge-captchaImage",
|
|
20
|
20
|
captchaEntryTextbox: "input#torPreferences-requestBridge-captchaTextbox",
|
|
21
|
21
|
refreshCaptchaButton:
|
browser/components/torpreferences/content/requestBridgeDialog.xhtml
| ... |
... |
@@ -23,10 +23,10 @@ |
|
23
|
23
|
|
|
24
|
24
|
<script src="">"chrome://browser/content/torpreferences/requestBridgeDialog.js" />
|
|
25
|
25
|
|
|
26
|
|
- <html:h3
|
|
|
26
|
+ <description
|
|
27
|
27
|
id="torPreferences-requestBridge-header"
|
|
28
|
28
|
data-l10n-id="request-bridge-dialog-top-solve"
|
|
29
|
|
- ></html:h3>
|
|
|
29
|
+ ></description>
|
|
30
|
30
|
<!-- init to transparent 400x125 png -->
|
|
31
|
31
|
<image id="torPreferences-requestBridge-captchaImage" flex="1" />
|
|
32
|
32
|
<hbox id="torPreferences-requestBridge-inputHbox">
|
browser/components/torpreferences/content/torPreferences.css
| ... |
... |
@@ -793,11 +793,7 @@ button.spoof-button-disabled { |
|
793
|
793
|
font-weight: 700;
|
|
794
|
794
|
}
|
|
795
|
795
|
|
|
796
|
|
-/* Advanced Settings */
|
|
797
|
|
-
|
|
798
|
|
-h3#torPreferences-requestBridge-header {
|
|
799
|
|
- margin: 0;
|
|
800
|
|
-}
|
|
|
796
|
+/* Request bridges */
|
|
801
|
797
|
|
|
802
|
798
|
image#torPreferences-requestBridge-captchaImage {
|
|
803
|
799
|
margin: 16px 0 8px 0;
|
|