Missed this comment somehow. We use attr instead of data because data doesn't actually update the actual HTML attribute, meaning that it's impossible to use outside jquery.