Making setAttribute to a public method
If the element is defined when setting the label, set the value of the label element