removes the "for" attribute from the legend tag since that's not a valid attribute