84 points · by todsacerdoti · 2y ago · 21 comments
We should not be sticking to what works for "most people". I am sorry.
Please don’t use autocapitalize=words for name input fields. It makes people named de Haan unhappy.
<input type="text" inputmode="numeric">
Sad to see the invalid markup throughout. The input tag is void, it has no closing tag. Self-closing tags are not HTML!Would that allow me to enter my alphanumeric zip code on a cellphone?
This honestly surprised me, my expectation was that it would select a keyboard by default, but you'd still be able to switch to other keyboards manually. So I guess if your zip/postcode/PLZ/etc field needs to accept international values, don't use inputmode=numeric (or similar) on it.
https://en.wikipedia.org/wiki/Postal_code#Alphanumeric_posta...
<p>Although it only works on some elements.
Such slashes were mandatory in XHTML for such elements but aren't a thing in HTML. They're also not invalid, the HTML validator says "Info: Trailing slash on void elements has no effect and interacts badly with unquoted attribute values."
A particularly nasty one is any attempt to use a supposedly self-closing script tag:
<script src="..." />
This results in the rest of your page being interpreted as code. Oops!One day maybe someone will write a client side spell checker that can work without sending things to a data centre to be rendered.