Its my impression that most relevant laws are geared toward protecting users from businesses, but I'd be open to hearing if you know of any exceptions (GDPR isn't one--secretly collecting data on users without their consent isn't serving users, it's harming users).
I have had to implement features that are awful for the users, but are required by law to have. Others to protect the business from liability.
I’m not saying doesn’t serve users as the original comment was “user experience” and was specifically mentioning JavaScript in terms of a presumably slow site. User experience is many things and all of them need to be considered. I totally agree that sites have gotten way to bloated, but the js community is recognizing that and trying to work on it, lazy loading and improvements to module bundling are going to help. I think the craze of tiny packages is coming to an end. Libraries post proudly when they have zero dependencies. As the community evolves it’ll improve, though some sites will probably continue to get worse as higher ups demand more features.
This is a concern with creating the impression that you're serving the user, rather than actually serving the user.
> I have had to implement features that are awful for the users, but are required by law to have. Others to protect the business from liability.
This is basically what you said in the previous post, and remains lacking in concrete examples.
I am really curious what sort of law does this. (Though maybe I'm better off not knowing...?)