Closed Bug 1833161 Opened 1 year ago Closed 1 year ago

Pressing the Tab key no longer shifts the focus out of the "Thank you" message after dismissing the weather result using the keyboard navigation

Categories

(Firefox :: Address Bar, defect, P1)

Desktop
All
defect

Tracking

()

VERIFIED FIXED
115 Branch
Tracking Status
firefox114 --- verified
firefox115 --- verified

People

(Reporter: cfat, Assigned: adw)

References

Details

Attachments

(2 files)

[Affected versions]:

  • Firefox Nightly 115.0a1 (Build ID: 20230515094256)
  • Firefox Beta 114.0b4 (Build ID: 20230514175823)

[Affected Platforms]:

  • Windows 10 x64
  • Linux Ubuntu 20.04 x64
  • macOS 12.4

[Prerequisites]:

  • Have a VPN client connected to a US server ( make sure the browser.search.region pref is set accordingly).
  • Have the Firefox Nightly 115.0a1 or Beta 114.0b4 installed.
  • Set the following prefs:
    browser.urlbar.weather.featureGate = true
    (Windows only) browser.urlbar.weather.ignoreVPN = true

[Steps to reproduce]:

  1. Open the browser from the prerequisites.
  2. Type the “weather” string in the Address Bar.
  3. Press the “Tab” key twice in order to focus the “Feedback” menu button.
  4. Press the “Enter” key.
  5. Press the “Down” arrow key 3 times in order to focus the “Don’t show this” option.
  6. Press the “Enter” key in order to open the sub-menu.
  7. Press the “Enter” key again in order to remove the weather result.
  8. Press the “Tab” key several times.
  9. Observe the behavior.

[Expected result]:

  • The focus shifts over the results (and menu buttons if applicable) of the Address Bar drop down.

[Actual result]:

  • Nothing happens, the focus remains on the "Thank you" message.

[Notes]:

  • The focus correctly shifts to the results if using the “Up” and “Down" arrow keys instead of the “Tab” one.
  • Here is the screen recording of the issue.
Assignee: nobody → adw
Status: NEW → ASSIGNED
Priority: -- → P1

The problem is the row remains selected after its content is replaced with the
dismissal acknowledgment tip. This patch clears the selection and selects the
tip's "Got it" button if the row was selected.

I didn't add a general browser test for feedback and dismissal acknowledgments
earlier, so I added one now. I cp'ed the weather test and used it as a starting
point since it does test the acknowledgments but is specific to the weather
suggestion. Even though some of it now duplicates the new test, I left it intact
because we still need a test for the weather-specific commands, and the amount
of duplicated code isn't very much.

I modified the test helper function that opens the result menu so that the row
is not selected when byMouse is true. That way I can make sure the selection
doesn't change when the dismissed row is not selected. I used
EventUtils.promiseElementReadyForUserInput() to synthesize a mousemove over
the row to make the menu button visible. That function has a bug where the
interval is added after onHit is called and the promise is resolved, leaving
the interval ticking forever. Moving the synthesizeMouseAtCenter() after the
timeout is created fixes the problem.

Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9e238b6275be Properly restore selection when showing the dismissal acknowledgment tip. r=ahal,dao
Attached patch Beta 114 patchSplinter Review

The m-c patch doesn't apply cleanly due to conflicting changes in the test in bug 1832474, which doesn't need to be uplifted.

Approval Request Comment
[Feature/Bug causing the regression]: Firefox Suggest weather suggestions

[User impact if declined]: This bug is necessary for the Firefox Suggest weather suggestion feature we intend to ship in 114.

[Needs manual test from QE? If yes, steps to reproduce]: Yes, should be clear from comment 0

[Is the change risky?]: Low risk

[Why is the change risky/not risky?]: The patch affects only the Suggest weather suggestion, which is disabled by default. Has tests.

Attachment #9335082 - Flags: approval-mozilla-beta?
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch

Comment on attachment 9335082 [details] [diff] [review]
Beta 114 patch

Approved for 114 beta 8, thanks.

Attachment #9335082 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

We have verified this issue on the latest Firefox Nightly 115.0a1 (Build ID: 20230522094803) on Windows 10 x64, macOS 12.6.1, and Ubuntu 20.04 x64.

  • The "Got it" button is now focused after dismissing the weather result.
  • The focus correctly shifts to the next element from the Address Bar results when pressing the "Tab" key.

We have verified this issue on the latest Firefox Beta 114.0b8 (Build ID: 20230523183658) on Windows 10 x64, macOS 12.6.1, and Ubuntu 20.04 x64.

  • The "Got it" button is now focused after dismissing the weather result.
  • The focus correctly shifts to the next element from the Address Bar results when pressing the "Tab" key.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: