Automate HTML element behaviour using the HTML5 "data-*" pattern