This is not really a getter so the name should be changed to `generateHtmlAttributes`.