Add title attribute to span element