Always write HTML data attributes

Change 'title' to 'label'
Change if-clauses
Fix wrong parenthesis