Re:The Depths of the Input Element
by beebeepka on Monday December 11, 2023 @05:18PM
(#38606251)
Ha, I actually didn't know some of this stuff. I am guilty of not being very helpful to mobile and disabled users so far, mostly because I almost never work on user facing projects. Which is terrible excuse because why wouldn't a visually impaired or disabled person not be working in a back office or something.
We should not be sticking to what works for "most people". I am sorry.
Re:The Depths of the Input Element
by midasuni on Monday December 11, 2023 @06:20PM
(#38606845)
> Chrome and Edge have been known to send the contents of <input> elements to a spellchecking service over the network, exposing whatever was in the field
One day maybe someone will write a client side spell checker that can work without sending things to a data centre to be rendered.
Re:The Depths of the Input Element
by wild_egg on Monday December 11, 2023 @10:24PM
(#38609009)
I read the parent comment here as sarcasm... We've had offline spell checkers for decades. Sending our text to some server for checking is a modern horror
Re:The Depths of the Input Element
by cloths on Monday December 11, 2023 @06:31PM
(#38606956)
Nice write-up! The nuances between browsers can be annoying yes, if I remember correctly the spellcheck behaviour for contenteditable div are also different between FF and Chromium-based.
Re:The Depths of the Input Element
by Filligree on Tuesday December 12, 2023 @10:03AM
(#38613033)
Mine's an 'eircode', but there's no eircode field on Amazon deliveries, and we're told to use it as a zip code. Naming aside, companies that don't let me use "D02 R9D3" [sic] as a 'zip code', and mandate zip codes and/or lack a freeform field to put it in, can't deliver to me.
Re:The Depths of the Input Element
by couchand on Tuesday December 12, 2023 @03:06PM
(#38617664)
I'm of the mind that you can't just casually cast naming or precision aside when talking about data collection.
If I'm askimg for a ZIP code I probably already know I can't deliver to you. If I thought I could deliver to you I'd collect the data necessary to do so, though not by asking you to pretend that the meaningful differences are not meaningful.
Others operate differently, Amazon makes a bunch more revenue than me, YMMV.
Re:The Depths of the Input Element
by klyrs on Tuesday December 12, 2023 @10:31PM
(#38622300)
Canadians have long dealt with this: credit card companies have a fun hack where your postal code has 3 numbers and 3 letters; drop the letters and add 2 zeros. So v4r 2x3 becomes 42300. Since this is used as one component in identity verification, the lossy correspondence is apparently considered good enough.
Re:The Depths of the Input Element
by couchand on Thursday December 14, 2023 @06:05PM
(#38648652)
For a document that purports to provide clarity they're sure playing fast and loose with terminology. The first one on the list should be "all postal codes are ZIP codes" because that's false but but evidently programmers believe it.
Re:The Depths of the Input Element
by MrJohz on Tuesday December 12, 2023 @12:45AM
(#38609954)
Rather than arguing about what is and isn't a zip code, here's an actual answer: no, at least on Firefox Android (and I assume generally on Android devices), if you have "inputmode=numeric", then the only keyboard available to the user is the phonepad-style number keyboard, and they cannot switch to another keyboard.
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.
Re:The Depths of the Input Element
by extra88 on Tuesday December 12, 2023 @08:07AM
(#38611639)
They're referring to the use of the trailing slash in examples like this:
<input type="text" inputmode="numeric" />
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."
We should not be sticking to what works for "most people". I am sorry.
One day maybe someone will write a client side spell checker that can work without sending things to a data centre to be rendered.
Would that allow me to enter my alphanumeric zip code on a cellphone?
https://en.wikipedia.org/wiki/Postal_code#Alphanumeric_posta...
If I'm askimg for a ZIP code I probably already know I can't deliver to you. If I thought I could deliver to you I'd collect the data necessary to do so, though not by asking you to pretend that the meaningful differences are not meaningful.
Others operate differently, Amazon makes a bunch more revenue than me, YMMV.
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.
<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:
This results in the rest of your page being interpreted as code. Oops!Please don’t use autocapitalize=words for name input fields. It makes people named de Haan unhappy.