Open Bug 2087737 Opened 17 days ago Updated 2 hours ago

Toolbar button tooltips and the new tab button's accessible name keep showing a shortcut after it changes

Categories

(Firefox :: Keyboard Navigation, defect)

defect

Tracking

()

ASSIGNED

People

(Reporter: spohl, Assigned: spohl)

References

(Blocks 1 open bug)

Details

Attachments

(1 external file)

When a shortcut changes while Firefox is running, either in about:keyboard or in System Settings on macOS, two places keep showing the old one until the window is reopened:

  1. Tooltips of toolbar buttons that include a shortcut, such as "History", "Save Page", "Print", "Find", "Open File", the zoom buttons, "Cut", "Copy" and "Paste". CustomizableUI computes the shortcut once, when it creates the widget in a window, and stores it in data-l10n-args.
  2. The accessible name (aria-label) of the new tab button in the tab strip, which tabs.mjs sets once when the tab strip is created.

Steps (macOS):

  1. In System Settings > "Keyboard" > "Keyboard Shortcuts…" > "App Shortcuts", assign a new shortcut to "Find in Page…" for Firefox Nightly.
  2. Add the "Find" button to the toolbar if needed, and hover over it.

Expected: the tooltip shows the new shortcut.
Actual: the tooltip shows the built-in shortcut.

Found while fixing bug 2086604, which makes the app menu, panel items and the tooltips built through DynamicShortcutTooltip follow shortcut changes. These two places need a way to learn that a key changed, so they were left out of that patch. As far as I can tell from the code, changing a shortcut in about:keyboard should leave them stale on every platform, but I have only checked that by reading the code.

These computed the shortcut once per window, so a shortcut changed later, in about:keyboard or in macOS System Settings, kept showing the old one. CustomKeys now fires a "shortcutschanged" event on the window when a key element's shortcut changes, and CustomizableUI and the tab strip update their text when it fires.

Assignee: nobody → spohl.mozilla.bugs
Status: NEW → ASSIGNED
Attachment #9671978 - Attachment description: Bug 2087737: Update toolbar button tooltips and the new tab button's accessible name when a shortcut changes. r?#firefox-desktop-core-reviewers,#tabbrowser-reviewers → Bug 2087737: Update toolbar button tooltips and the new tab button's accessible name when a shortcut changes. r?#firefox-desktop-core-reviewers,#tabbrowser-reviewers,#mac-reviewers!
See Also: → 2093948
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: