Page MenuHomePhabricator

Move accessKeyLabel() out of mediawiki.util
Closed, ResolvedPublic


mediawiki.util has a function
updateTooltipAccessKeys and addPortletLink

The minerva skin has no concept of portlets
The dependency jquery.accessKeyLabel is thus unnecessary

I'd suggest separating this functionality out into:
which extends the mediawiki util object to have this functionality.

Version: 1.24rc
Severity: enhancement



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:13 AM
bzimport set Reference to bz64564.
bzimport added a subscriber: Unknown Object (MLST).

Actually, it should probably be more of an api, that is implemented in the various skins JS, to reliably add 'navigation entries' to 'navigation blocks'.

Yeah, that should be part of a hypothetical 'mediawiki.currentSkin' module (which skins would somehow extend).

Yes!! This sounds like a good approach :)

Possibly related to bug 23515.

See also (bug 26799) Restrict mediawiki.util to general JavaScript utilities only.

This should probably be moved to a mw.Skin module. However, regardless of what Minerva will and will not support, this module must always implement addPortletLink. The implementation can change dynamically based on skin (it would be exposed through one canonical interface), but the programmatic interface must be reliable for gadgets.

Minerva's implementation would replace the function with a no-op, and not have a dependency on accessKeyLabel.

Krinkle renamed this task from mediawiki.util should be more modular to Move accessKeyLabel() out of mediawiki.util.Nov 24 2015, 9:41 PM
Krinkle set Security to None.
Krinkle removed a subscriber: wikibugs-l-list.
Krinkle claimed this task.

mw.util.accessKeyLabel() has been deprecated in favour of jquery.accessKeyLabel which skins can use directly.

The broader overhaul and possible introduction of or is covered by T28799.