Infusing EditPage's OOUIs widget resets the accesskey in tooltips (conflict with jquery.accessKeyLabel)
Closed, ResolvedPublic1 Story Points

Description

Steps to reproduce:

  1. Edit a page in the classical source editor with OOUI style, e.g. https://www.mediawiki.org/wiki/User:Schnark?action=submit
  2. Hover over the buttons and observe that they include the exact accesskey in the tooltip, e.g. for me it says Show which changes you made to the text [Alt+Umschalt+v].
  3. Execute OO.ui.infuse('wpDiffWidget') in the console.

Expected: The tooltip should not change.
Actual: The tooltip gets reset to Show which changes you made to the text [v] without the exact prefix.

The problem seems to be that jquery.accessKeyLabel.js updates the tooltip dynamically, but OO.ui applies the raw tooltip from the infusion data, and thus overrides the changes.

Schnark created this task.Jun 16 2017, 8:21 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 16 2017, 8:21 AM
matmarex renamed this task from Infusing an OOUI widget resets accesskey in tooltip to Infusing an OOUI widget resets accesskey in tooltip (conflict with jquery.accessKeyLabel).Jun 19 2017, 6:27 PM
matmarex edited projects, added MediaWiki-Interface; removed OOUI.
matmarex claimed this task.Jun 19 2017, 7:42 PM
matmarex triaged this task as Normal priority.

Change 359981 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/core@master] mw.action.edit: Restore modifier keys for accesskey in tooltip for summary field

https://gerrit.wikimedia.org/r/359981

The patch is just a workaround to fix this for the edit summary field, which already gets infused by core code. I'm not sure what would be the proper way to make the two features work together. Possibly we should merge the functionality of jquery.accessKeyLabel into OOjs UI's AccessKeyedElement.

Change 359981 merged by jenkins-bot:
[mediawiki/core@master] mw.action.edit: Restore modifier keys for accesskey in tooltip for summary field

https://gerrit.wikimedia.org/r/359981

Should we re-title this to be just about the EditPage issue, mark this as Resolved, and use T168408 for follow-up?

Sure, that works.

Jdforrester-WMF renamed this task from Infusing an OOUI widget resets accesskey in tooltip (conflict with jquery.accessKeyLabel) to Infusing EditPage's OOUIs widget resets the accesskey in tooltips (conflict with jquery.accessKeyLabel).Jun 26 2017, 2:05 PM
Jdforrester-WMF closed this task as Resolved.
Jdforrester-WMF edited projects, added Editing-team; removed Patch-For-Review.
Jdforrester-WMF set the point value for this task to 1.