Only focus the about:torconnect buttons under certain circumstances
Merge Info
Issues
Resolves
Related
Merging
Target Branches
-
tor-browser-!fixupstotor-browser-specific commits, new features, security backports -
base-browserandmullvad-browser-!fixupstobase-browser-specific commits, new features to be shared withmullvad-browser, and security backports-
⚠️ IMPORTANT: Please list thebase-browser-specific commits which need to be cherry-picked to thebase-browserandmullvad-browserbranches here
-
Target Channels
-
Alpha: esr128-14.5 -
Stable: esr128-14.0 -
Legacy: esr115-13.5
Backporting
Timeline
-
No Backport (preferred): patchset for the next major stable -
Immediate: patchset needed as soon as possible (fixes CVEs, 0-days, etc) -
Next Minor Stable Release: patchset that needs to be verified in nightly before backport -
Eventually: patchset that needs to be verified in alpha before backport
(Optional) Justification
-
Security update: patchset contains a security fix (be sure to select the correct item in Timeline) -
Censorship event: patchset enables censorship circumvention -
Critical bug-fix: patchset fixes a bug in core-functionality -
Consistency: patchset which would make development easier if it were in both the alpha and release branches; developer tools, build system changes, etc -
Sponsor required: patchset required for sponsor -
Localization: typos and other localization changes that should be also in the release branch -
Other: please explain
Upstream
-
Patchset is a candidate for uplift to Firefox -
Patchset is a backport from Firefox - Bugzilla link:
- Upstream commit:
Issue Tracking
-
Link resolved issues with appropriate Release Prep issue for changelog generation
Review
Request Reviewer
-
Request review from an applications developer depending on modified system: -
NOTE: if the MR modifies multiple areas, please
/ccall the relevant reviewers (since Gitlab only allows 1 reviewer) - accessibility : henry
- android : clairehurst, dan
- build system : boklm
- extensions : ma1
- firefox internals (XUL/JS/XPCOM) : jwilde, ma1
- fonts : pierov
- frontend (implementation) : henry
- frontend (review) : donuts, morgan
- localization : henry, pierov
- macOS : clairehurst, dan
- nightly builds : boklm
- rebases/release-prep : dan, ma1, pierov, morgan
- security : jwilde, ma1
- signing : boklm, morgan
- updater : pierov
- windows : jwilde, morgan
- misc/other : pierov, morgan
-
NOTE: if the MR modifies multiple areas, please
Change Description
By default, when switching stages we move the focus back to the stage heading. This is because we want to lead the user back to the top of the page to show them the new context. This should help improve the experience when using a screen reader.
If we are in the bootstrapping stage we instead move the focus to the "Cancel" button since it is likely that the user wants to use this control.
If the user presses the "Cancel" button we return the focus to the "Connect" or "Try a bridge" button. I.e. we restore the prior focus. This allows to user to easily re-try without having to re-read the page they just saw.
We do a similar thing when the user cancels the automatic startup
bootstrapping using a new TorConnect.stage.isQuickstart property.
Finally, on page load we will focus the "Connect" button if the user has previously interacted with it. We record this interaction in a preference that persists between sessions.
We also separate out the "Loading" stage from the "Start" stage. It is
unexpected for about:torconnect to be opened whilst in the "Loading"
stage, but if it does happen it would be safer to keep the page blank.
The way this is implemented also ensures that the initial page is blank
prior to "get-init-args" resolving.
How Tested
For a new profile, focus starts at the heading when about:torconnect is first loaded. Pressing "Enter" won't do anything.
Clicking the "Connect" urlbar button will not set the torbrowser.about_torconnect.user_has_ever_clicked_connect preference.
If the user clicks "Connect" the focus moves to the "Cancel" button. When clicking "Cancel" the focus returns to the "Connect" button.
If the user restarts the browser, the initial focus will now be on the "Connect" button.
If the user cancels a bootstrap in a different about:torconnect tab and return, the focus will be reset to the heading rather than the "Connect" button. Setting
TorConnect.simulateBootstrapOptions.simulateCensorship = true;
TorConnect.simulateBootstrapOptions.simulateDelay = 1000000;
helps delay the bootstrap so you don't have to rush as much.
If the bootstrap gets cancelled by a change in bridge settings, the focus will be reset to the heading.
If the user selects "Connect automatically" and restarts the browser the initial focus will be on the "Cancel" button. If they cancel (with "Escape" or the button) the focus will move to the "Connect" button.
Setting torbrowser.debug.censorship_level to 3. At each failed attempt the focus resets to the heading. If the user cancels one of these auto bootstraps the focus returns to the "Try a bridge" button.