HTML class names would not affect accessibility.
HTML class names would not affect accessibility.
Non-deterministic class names are quickly becoming the norm for a lot of good reasons.
Is there some advantage other than removing these two features that dynamic CSS classes provide?
The best they could do to make it less obfuscated is to include the name with the hash. So the class name may look like 'fkljdkldjf9303-button'. However, the hash may change if the component changes for example, so still not super reliable from your point of view. Also, most users won't care, so they'd just be including extra page bloat to add the human readable names along-side the hash in production builds.
I'd argue that CSS modules and similar reduce many many bugs I've seen people make over the years and that it's a huge win in terms of developer speed and reduction of bugs. I highly doubt anyone made the decision explicitly to obfuscate the CSS...
It's not always wrong to do things that are self serving at the expense of our users. But we should never confuse ourselves into thinking of that as a feature. It's always important to keep in mind who we serve.