https://bugzilla.wikimedia.org/show_bug.cgi?id=48505
Web browser: ---
Bug ID: 48505
Summary: mw.util.updateTooltipAccessKeys should work on
arbitrary tooltips
Product: MediaWiki
Version: 1.22-git
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: Unprioritized
Component: JavaScript
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Mobile Platform: ---
Currently mw.util.updateTooltipAccessKeys only updates the tooltip, if it
already ends with an access key in square brackets. While
mw.util.addPortletLink takes care to provide the title in this format, there
are other ocassions (like <input>s created by a script), where you currently
have to add the access key explicitely to the title before you can call
mw.util.updateTooltipAccessKeys.
If the title doesn't end with something that looks like an access key,
mw.util.updateTooltipAccessKeys should just add it, and IMHO do so even if
there is no title at all.
So
$foo.append(mw.html.element('input', {id: 'myInput', accesskey: 'x', title:
'Something'}));
mw.util.updateTooltipAccessKeys($('#myInput'));
should work and update the title to "Something [alt-shift-x]" (or whatever).
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l