You can't capture the nuance of my form fields June 27, 2021 on Drew DeVault's blog

Check out this text box:

Here are some of the nuances of using this text box on my operating system (Linux) and web browser (Firefox):

I rely on all of these nuances when I use form controls in my everyday life. This is just for English, by the way. I often type in Japanese, which has an entirely alien set of nuances. Here’s what that looks like on Android (mobile is another beast entirely, too!):

Here’s another control:

There’s an invisible edit buffer, so I can type “Pennsylvania” (or just P) to select what I want. I can type “New” and then press down to select “New Jersey”. If I make a mistake and I’ve kept track of what I’ve typed in my head, I can use backspace to make a correction, and it just works. I have lived in both of these places, and worked both of these keystrokes into my muscle memory. Filling out a form with my address on it and using an input box like this to select my state of residence takes me less than a second.

You cannot capture all of this nuance in a home-grown form control, or even anything close to it, but many JavaScript programmers do it anyway. Whenever I encounter a custom form control, the time required to complete the form increases from under a second to as much as a minute.

For myself, this is just very annoying. Imagine the same situation if you were blind. The standard form inputs work everywhere, and are designed with accessibility in mind, so you’re used to them and can easily fill in forms which use the standard browser controls. But, when you hit a JavaScript-powered organic cage-free non-GMO text box, you’re screwed.

There are hundreds of little nuances that users learn to use their computers efficiently. The exact features a user relies on will vary between operating systems, browsers, hardware, natural languages, physical ability, and personal preferences and experience. There are dozens of tiny workflows that people depend on every day that have never even occurred to you.

Making a custom form control with JavaScript is going to make life worse for a lot of people. Just don’t do it. The browser’s built-in controls are quite sufficient.

Have a comment on one of my posts? Start a discussion in my public inbox by sending an email to ~sircmpwn/ [mailing list etiquette]

Articles from blogs I read Generated by openring

Loopr: A Loop/Reduction Macro for Clojure

I write a lot of reductions: loops that combine every element from a collection in some way. For example, summing a vector of integers: (reduce (fn [sum x] (+ sum x)) 0 [1 2 3]) ; => 6 If you’re not familiar with Clojure’s reduce, it takes a reducing func…

via Aphyr: Posts June 23, 2022

What's cooking on SourceHut? June 2022

Hello everyone! Let’s get straight into the news today. Our user count today is 29,612 users, of which 576 have joined since the last update. Remember to be patient with these new users as they learn the ropes. Welcome! GraphQL Adnan continues to ship GraphQL…

via Blogs on Sourcehut June 15, 2022

Status update, June 2022

Hi! Yesterday I’ve finally finished up and merged push notification support for the soju IRC bouncer and the goguma Android client! Highlights & PM notifications should now be delivered much more quickly, and power consumption should go down. Additionally…

via emersion June 15, 2022