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).
Version: 1.22.0
Severity: enhancement