w3ctag / design-principles

A small-but-growing set of design principles collected by the TAG while reviewing specifications
https://w3ctag.github.io/design-principles
174 stars 46 forks source link

New principle: Discourage overloading (in HTML) #370

Open LeaVerou opened 2 years ago

LeaVerou commented 2 years ago

This was brought up by @hober in a breakout today.

We should have a principle about avoiding things like <input type> in the future.

LeaVerou commented 2 years ago

Consensus from today's breakout:

hober commented 1 year ago

see also https://github.com/w3ctag/design-principles/issues/270#issuecomment-933786019

martinthomson commented 2 months ago

Checkboxes and toggle/switch are a good case where the new UX treatment of the toggle gains some benefit from a fallback.

We have also given advice in the past that <input type="somenewthing"> degrades cleanly to a text field. Overloading might have been a good thing. On the other hand, with some JS, you can polyfill just about anything and maybe the transitionary costs are not what should dominate.