Closed avila-gabriel closed 4 months ago
Thanks for the throughout research on different attributes.
Replacing _ with - is a bit arbitrary but more useful than keeping the underscores. Dashes are what is used in the html spec for aria and data attributes. This is also what pretty much all libraries use.
Dots and colons are used by different frameworks but not used by attributes in the html spec. I am not convinced it is worth adding a special case for double underscores or other replacements.
Again, thanks for the idea and research!
here I'm in the browser's console testing accepted characters for the data-* attribute, which is valid html
we've left with those:
only those are valid, including underscores which conflicts as we use it as a replacement for "-". Now those are only for data-* attributes so maybe there is something here, perhaps a special treatment when the attribute starts with "data_" sounds like a starting point but I have no idea how to go from there. Of course using the dict works fine, but if anyone have something in mind for this it would be more elegant