Background
We added shortcuts but they are hard to discover. We would like to add them to the text of the existing hover tooltips.
Requirements
- Expand tooltip text to include shortcuts
- When someone is on a mac, show them Cmd and when someone is on a PC, show them Ctrl
- Discuss the behavior of the Up/Down/Delete shortcuts. They don't behave exactly like the buttons do: The buttons act on the blue selection, while the shortcuts act on what's in keyboard focus. Also see the discussion below. Moved to T300971.
Specs
| Button | Hover tooltip |
|---|---|
| Puzzle piece/template button | Add template Ctrl+D |
| [[]] Wikitext button | Add wikitext Ctrl+Shift+Y |
| Up arrow | Move item up Ctrl+Shift+Up |
| Down arrow | Move item down Ctrl+Shift+Down |
| Trashcan | Remove item Ctrl+Delete |
List of all shortcuts in the parent ticket T294521 for reference.
The implementation should probably use the existing OO.ui.mixin.AccessKeyedElement and/or jquery.accessKeyLabel.js.