Closed Bug 2015491 Opened 7 months ago Closed 5 months ago

[A11y][Keyboard Navigation]Cancelling a note via Keyboard Navigation still saves it

Categories

(Firefox :: Tabbed Browser, defect, P1)

Firefox 149
Desktop
All
defect
Points:
1

Tracking

()

RESOLVED FIXED
151 Branch
Tracking Status
firefox149 --- wontfix
firefox150 --- wontfix
firefox151 --- fixed

People

(Reporter: rpopovici, Assigned: itoro.ujames)

References

(Blocks 2 open bugs)

Details

(Keywords: good-next-bug, Whiteboard: [fidefe-tabgrps][outreachy-sidebar-2026])

Attachments

(1 file)

Note

  • This issue is specific to keyboard navigation. Note is saved after cancellation.

Found in

  • Nightly v149.0a1

Affected versions

  • Nightly v149.0a1

Tested platforms

  • Affected platforms: all
  • Unaffected platforms: none

Steps to reproduce

  1. Load any webpage.
  2. Open the Add Note dialog by pressing Shift+ F10(CMD+Return for macOS 15).
  3. Insert any string in the text box.
  4. Move focus to the Cancel button using the keyboard navigation and press Enter.

Expected result

  • The Add note dialog is dismissed, and the note should be cancelled.

Actual result

  • The Add note dialog is dismissed and the note is saved after cancellation.

Regression range

  • Not a regression.

Thank you for the report. We have yet to formally work on keyboard controls for this panel. That work is tracked as bug 2009262.

I think we should make sure that any patch for bug 2009262 fixes this, though, so I'd like to keep this open.

This behavior is very confusing, though, so I'm raising to P1.

Blocks: tab-notes
Severity: -- → S3
Points: --- → 1
Priority: -- → P1
See Also: → 2009262
Whiteboard: [fidefe-tabgrps]

Currently, when the user presses "Enter" anywhere in the panel, we are saving the tab note. https://searchfox.org/firefox-main/rev/1427c88632d1474d2653928745d78feca1a64ee0/browser/components/tabbrowser/content/tabnote-menu.js#135-139

We should only save the tab note if:

  • the user clicks the "Save" button
  • the user activates the "Save" button via keyboard
  • the user presses the Enter key while the focus is inside of the note text textarea

We should not save the tab note if:

  • the user presses the Escape key in any context
  • the user clicks the "Cancel" button
  • the user activates the "Cancel" button via keyboard

The tests in https://searchfox.org/firefox-main/source/browser/components/tabnotes/test/browser/browser_tab_notes_menu.js should be updated to test each case to make sure that the tab note is only saved when it's expected.

Keywords: good-next-bug

Note: to test this feature, you need to enable browser.tabs.notes.enabled in about:config in order to display the "Add Note" menu item when right-clicking a tab.

I would like to work on this.

Assignee: nobody → itoro.ujames
Status: NEW → ASSIGNED
Whiteboard: [fidefe-tabgrps] → [fidefe-tabgrps][outreachy-sidebar-2026]
Pushed by kcochrane@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/dd2402b7c2a4 https://hg.mozilla.org/integration/autoland/rev/31ae976b6f3c Only save tab note when Enter is pressed inside the textarea or when save button is focused r=kcochrane,tabbrowser-reviewers
Pushed by asilaghi@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/50f145dffd67 https://hg.mozilla.org/integration/autoland/rev/bc0d799792d7 Revert "Bug 2015491 - Only save tab note when Enter is pressed inside the textarea or when save button is focused r=kcochrane,tabbrowser-reviewers" for causing bc failures at tab_notes_menu.js

Backed out for causing bc and TV failures at tab_notes_menu.js
Backout Link
Push with failures
Failure Log bc
Failure log TV
Failure line TEST-UNEXPECTED-FAIL | browser/components/tabnotes/test/browser/browser_tab_notes_menu.js | test_keyboardNavigationSaveCancel - Test timed out

Flags: needinfo?(itoro.ujames)
Pushed by sthompson@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/77d3ba5ff9b1 https://hg.mozilla.org/integration/autoland/rev/3e88da2addd6 Only save tab note when Enter is pressed inside the textarea or when save button is focused r=kcochrane,sthompson,tabbrowser-reviewers
Pushed by asilaghi@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/bee66ad6fcf6 https://hg.mozilla.org/integration/autoland/rev/87df1cff6e63 Revert "Bug 2015491 - Only save tab note when Enter is pressed inside the textarea or when save button is focused r=kcochrane,sthompson,tabbrowser-reviewers" for cauing bc failures at browser_tab_notes_telemetry.js

Backed out for causing bc and TV failures at browser_tab_notes_telemetry.js
Backout Link
Push with failures
Failure Log bc
Failure log TV
Failure line TEST-UNEXPECTED-FAIL | browser/components/tabnotes/test/browser/browser_tab_notes_telemetry.js | test_tabNoteAddedTabContextMenu - added event extra data should include length and say the tab note was added from the tab context menu - {"source":"context_menu","note_length":"9"} deepEqual {"source":"context_menu","note_length":17}

Pushed by kcochrane@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/a6e5208b3bc6 https://hg.mozilla.org/integration/autoland/rev/22a0e0f8aaa0 Only save tab note when Enter is pressed inside the textarea or when save button is focused r=kcochrane,sthompson,tabbrowser-reviewers
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 151 Branch

Since nightly and release are affected, beta will likely be affected too.
For more information, please visit BugBot documentation.

Flags: needinfo?(itoro.ujames)

Authored by https://github.com/CelineJames
https://github.com/mozilla/enterprise-firefox/commit/a6e5208b3bc669409b84469a2ce7bdeba323ffb4
[enterprise-main] Bug 2015491 - Only save tab note when Enter is pressed inside the textarea or when save button is focused r=kcochrane,sthompson,tabbrowser-reviewers

The patch landed in nightly and beta is affected.
:itoro.ujames, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(itoro.ujames)

No need for uplift

Flags: needinfo?(itoro.ujames)
QA Whiteboard: [QA-4574][qa-found-in-c149][S3] → [QA-4574][qa-found-in-c149][S3] [qa-triage-done-c152/b151] [qa-ver-needed-c152/b151]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: