[css-ui-4] user-select:none considered harmful?

I just had an off-list conversation with Gérard Talbot. He is concerned that the valid uses of user-select:none  are outweighed by the risk of incorrect usage, with user-select:none being applied to things users would legitimately want to select, causing confusion and usability problems.

Personally, I think the risk is worth living with. The feature has been available for a while in all browsers and the web is not a user-select:none wasteland, and it is far from being the only feature that can be abused. At the same time, some people like Gérard have expressed concern, so it seems appropriate for the working group to consider the question and take an official stance.

The potential causes for abuse are the usual suspects:
- copy-and-paste coding without understanding
- (abusive) use of (poor) css resets
- (abusive) use of (poor) frameworks
- misguided tutorials
- "control-freak" authors, including those who highjack right-clicking on images as a form of copy protection, or disable zooming just because.
- etc

The spec already tries to improve the situation somewhat, with the following normative prose and note:

> As user-select is a UI convenience mechanism, not a copy protection mechanism, the UA may provide an alternative way for the user to explicitly select the text even when user-select is none.
> 
> Note: none is not a copy protection mechanism, and using it as such is ineffective: User Agents are allowed to provide ways to bypass it, it will have no effect on legacy User Agents that do not support it, and the user can disable it through the user style sheet or equivalent mechanisms on UAs that do anyway. Instead, none is meant to make it easier for the user to select the content they want, by letting the author disable selection on UI elements that are not useful to select. Tools such as CSS validators, linters or in-browser developer tools are encouraged to use heuristics to detect and warn against incorrect or abusive usage that would hamper usability or violate common user expectations.

Realistically though, advice in a spec can only do so much against people shooting themselves in the foot.

I do not really see any way to modify the feature to block or limit abuse while keeping it working for the intended use cases. I've discussed this with Hixie, and he didn't see a better approach either (HTML semantics are not sufficient to tell good uses from bad ones).

Does anyone have a smart idea on how to improve this?

If not, do we prefer to live with this risk, or should we give up on this feature entirely? Note that I am not interested in dropping it from the spec if it remains in implementations.

 - Florian

Received on Saturday, 13 June 2015 12:18:26 UTC