JSFiddle - React, Tailwind, and code Playground
HTML
<a data-éxample href=http://stackoverflow.com/questions/13283699/sanitize-attribute-name>example - click to see related question</a>
CSS
/* this works with or w/o the slash, but does not validate in either case */
[data-\éxample] {
background: #8d2; padding: 4px;
display:block; font-family: monospace;
}
JavaScript
console.log( document.querySelectorAll("[data-éxample]") );