My own approach would be:
$('a[accesskey]').each( //selects only those a elements with an accesskey attribute
function(){
var aKey = $(this).attr('accesskey'); // finds the accesskey value of the current a
var text = $(this).text(); // finds the text of the current a
var newHTML = text.replace(aKey,'' + aKey + '');
// creates the new html having wrapped the accesskey character with a span
$(this).html(newHTML); // sets the new html of the current link with the above newHTML variable
});
JS Fiddle demo.
References: