DEV Community

Daniel Pertu
Daniel Pertu

Posted on

Notifio has five form fields on the web and six text inputs in the app, and only three have an autocomplete attribute, of which two say email

One product, two front ends, eleven places to type. I had never listed them together, and when I did the two halves turned out to be making different decisions about the same job: collecting an email address, a name and a URL.

A sibling site of mine has a similar census with zero autocomplete attributes. Notifio's is not zero, and the interesting part is where it is not.

The website: five controls on two pages

I loaded every URL in the sitemap in a headless browser and queried input, textarea, select. 36 of 38 pages have none. Two do:

/pricing   1   input type=email   id=email   autocomplete=email   required
/help      4   input type=text    (no name, no id)    required       placeholder "Your name"
               input type=email   (no name, no id)    required       placeholder "you@example.com"
               input type=text    (no name, no id)    optional       placeholder "e.g. Activation issue..."
               textarea           (no name, no id)    required       placeholder "Describe your issue..."
Enter fullscreen mode Exit fullscreen mode

The pricing page field is a model citizen. The right type, an id the label points at with for, required, and autocomplete="email".

The help page has the same kind of field with none of that. The email control on /help is type="email" with a placeholder and nothing else. It is the same address a visitor typed or autofilled one click earlier on the pricing page, and the page where they are asking for help is the one where a missing autofill costs the most, because they are already annoyed.

The name field is the same story: type="text", no autocomplete="name". These two are exactly the fields WCAG 2.1 criterion 1.3.5, Identify Input Purpose, is about, since both are in its list of purposes. Of the three fields on the site that have a recognised purpose, one passes (the pricing email) and two fail (the help name and the help email). The subject and message fields are free text and have no purpose to identify.

Two earlier posts pulled other threads out of the same form: four checks in the browser and seven on the server and what stands in place of a captcha.

The app: six text inputs, two of them configured

The desktop app is a React renderer loaded into an Electron window, and it has eight <input> elements: two checkboxes and six that take text. I read all of them in source, because the renderer's interface is behind an activation screen, and this is what each one says about itself:

field                 type     autocomplete   spellcheck   name comes from
Activation email      email    email          (default)    <label for="email">
Activation token      text     off            false        <label for="token">
Search name           (text)   none           (default)    unbound <label>, so the placeholder
Search URL            (text)   none           (default)    unbound <label>, so the placeholder
Edit path             (text)   none           (default)    nothing, placeholder only
Listing URL (setup)   (text)   none           (default)    aria-label
Enter fullscreen mode Exit fullscreen mode

The activation screen's two fields, the first thing every customer sees, are the only deliberate ones. The email field has the right type and the right token. The token field is autoComplete="off", spellCheck={false} and set in a monospace face, which is the correct treatment for a string like NTFIO-XXXX-XXXX-XXXX that a browser should never try to complete or underline.

The other four are the fields people use every day, and they carry nothing.

Two labels that point at nothing

On the search form the markup is:

<div>
  <label className="mb-1.5 block text-[13px] font-semibold text-[#a3a3a3]">Search name</label>
  <input className="w-full rounded-lg border ..." placeholder="e.g., Kamernet - Leiden" ... />
</div>
Enter fullscreen mode Exit fullscreen mode

There is no htmlFor on the label and no id on the input, and the input is not nested in the label. They sit next to each other. A label is bound to a control by one of those three relationships, and this has none, so clicking the words "Search name" does not focus the field and the field's accessible name falls back to its placeholder. The same is true of "Search URL". Compare with the activation form two files over, where both labels carry htmlFor and the inputs carry matching ids.

The edit-path field in the search list is worse: it is a bare input with autoFocus, a monospace class and the placeholder /path?query=value, and no label of any kind. Only the listing URL field in the setup list has aria-label, which is a fair substitute for a visible label and is the one place a screen reader would hear a proper name.

What defaults do in each half

I want to be careful here, because I have measured the markup but not every behaviour.

  • Spellcheck. The Electron windows set nodeIntegration: false and contextIsolation: true and nothing about spellcheck, and as I read Electron's documentation the built-in spellchecker is on by default. That means a pasted URL, a path, or a place name in the "Search name" field is eligible to be underlined. The only field that opts out is the activation token. I did not open the packaged app to look for red underlines, so this is the code's answer, not a screenshot.
  • Autofill. Whether Electron shows any autofill UI for autocomplete="email" I have not tested, so I will not claim the activation field's token does anything in the app. It is correct markup either way, and it is what a browser version of the same screen would use.
  • URL type. None of the three URL-shaped inputs uses type="url". That may be a good decision: in a form without noValidate, type="url" makes the browser refuse an address with no scheme and show its own bubble before the app's handler runs. The handler already does the same check with new URL(url) and says "Invalid URL." in the app's own voice. So I would leave the type as it is and add spellCheck={false}.

The shape of the gap

                     controls   with autocomplete   bound to a label
website (2 pages)        5            1                  1 of 5   (4 labels have no for)
app (renderer)           6            2                  2 of 6   (+1 aria-label)
Enter fullscreen mode Exit fullscreen mode

Three of eleven. The attribute shows up where somebody was thinking about a form, on pricing and on activation, which are the two screens that take money or a licence. It is missing from where people spend their time: the help form, and the list of searches they add and edit.

None of this is a bug in the sense that something stops working. It is the layer of metadata that browsers, password managers and screen readers use, and it has the same pattern in both halves of the product: careful on the screen that sells, absent on the rest.

Try it

Open notifio.app/pricing and notifio.app/help side by side, put your cursor in each email box, and see which one your browser offers to fill. The app half needs the desktop build from the download page, which is the only way to see the fields I could only read.

Top comments (0)