morgan pushed to branch tor-browser-128.5.0esr-14.5-1 at The Tor Project / Applications / Tor Browser
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:
- browser/components/torpreferences/content/connectionSettingsDialog.js - browser/components/torpreferences/content/connectionSettingsDialog.xhtml - browser/components/torpreferences/content/requestBridgeDialog.js - browser/components/torpreferences/content/requestBridgeDialog.xhtml - browser/components/torpreferences/content/torPreferences.css
Changes:
===================================== browser/components/torpreferences/content/connectionSettingsDialog.js ===================================== @@ -317,6 +317,16 @@ const gConnectionSettingsDialog = { }, };
+// Initial focus is not visible, even if opened with a keyboard. We avoid the +// default handler and manage the focus ourselves, which will paint the focus +// ring by default. +// NOTE: A side effect is that the focus ring will show even if the user opened +// with a mouse event. +// TODO: Remove this once bugzilla bug 1708261 is resolved. +document.subDialogSetDefaultFocus = () => { + document.getElementById("torPreferences-connection-toggleProxy").focus(); +}; + window.addEventListener( "DOMContentLoaded", () => {
===================================== browser/components/torpreferences/content/connectionSettingsDialog.xhtml ===================================== @@ -24,10 +24,10 @@
<script src="chrome://browser/content/torpreferences/connectionSettingsDialog.js" />
- <html:h3 + <description id="torPreferences-connection-header" data-l10n-id="tor-advanced-dialog-introduction" - ></html:h3> + ></description> <!-- Local Proxy --> <checkbox id="torPreferences-connection-toggleProxy" @@ -38,6 +38,7 @@ <label id="torPreferences-localProxy-type" data-l10n-id="tor-advanced-dialog-proxy-type-selector-label" + control="torPreferences-localProxy-builtinList" /> </hbox> <hbox align="center"> @@ -53,6 +54,7 @@ <label id="torPreferences-localProxy-address" data-l10n-id="tor-advanced-dialog-proxy-address-input-label" + control="torPreferences-localProxy-textboxAddress" /> </hbox> <hbox align="center"> @@ -65,6 +67,7 @@ <label id="torPreferences-localProxy-port" data-l10n-id="tor-advanced-dialog-proxy-port-input-label" + control="torPreferences-localProxy-textboxPort" /> <!-- proxy-port-input class style pulled from preferences.css and used in the vanilla proxy setup menu --> <html:input @@ -81,6 +84,7 @@ <label id="torPreferences-localProxy-username" data-l10n-id="tor-advanced-dialog-proxy-username-input-label" + control="torPreferences-localProxy-textboxUsername" /> </hbox> <hbox align="center"> @@ -93,6 +97,7 @@ <label id="torPreferences-localProxy-password" data-l10n-id="tor-advanced-dialog-proxy-password-input-label" + control="torPreferences-localProxy-textboxPassword" /> <html:input id="torPreferences-localProxy-textboxPassword" @@ -112,6 +117,7 @@ <label id="torPreferences-connection-allowedPorts" data-l10n-id="tor-advanced-dialog-firewall-ports-input-label" + control="torPreferences-connection-textboxAllowedPorts" /> </hbox> <hbox id="torPreferences-connection-hboxAllowedPorts" align="center">
===================================== browser/components/torpreferences/content/requestBridgeDialog.js ===================================== @@ -15,7 +15,7 @@ const log = console.createInstance({
const gRequestBridgeDialog = { selectors: { - dialogHeader: "h3#torPreferences-requestBridge-header", + dialogHeader: "#torPreferences-requestBridge-header", captchaImage: "image#torPreferences-requestBridge-captchaImage", captchaEntryTextbox: "input#torPreferences-requestBridge-captchaTextbox", refreshCaptchaButton:
===================================== browser/components/torpreferences/content/requestBridgeDialog.xhtml ===================================== @@ -23,10 +23,10 @@
<script src="chrome://browser/content/torpreferences/requestBridgeDialog.js" />
- <html:h3 + <description id="torPreferences-requestBridge-header" data-l10n-id="request-bridge-dialog-top-solve" - ></html:h3> + ></description> <!-- init to transparent 400x125 png --> <image id="torPreferences-requestBridge-captchaImage" flex="1" /> <hbox id="torPreferences-requestBridge-inputHbox">
===================================== browser/components/torpreferences/content/torPreferences.css ===================================== @@ -793,11 +793,7 @@ button.spoof-button-disabled { font-weight: 700; }
-/* Advanced Settings */ - -h3#torPreferences-requestBridge-header { - margin: 0; -} +/* Request bridges */
image#torPreferences-requestBridge-captchaImage { margin: 16px 0 8px 0;
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/38bb69b...