You should not use an ID attribute in a template. Each time this template is rendered there will be multiple spans, which all have the same ID, this will cause accessibility issues in RPT and will confuse Screen readers. Also if a consuming developer decides to customize the look and feel and change the template, if they leave out this id, it will break the javascript code, because you are relying on the id attribute to retrieve the element.