Here, Hold My Beer Place

Putting placeholder text in edit boxes in addition to (or, heaven forfend, instead of) labels became all the rage sometime recently (and, by recently, I’m using the old man’s yardstick of sometime in the last decade).

Placeholder text

Which leads to a simple test often overlooked:

What happens if I type that placeholder text into the edit box?

Now, ungentle reader, what should happen is that the string you type replaces the sample text. If your developers/designers are kludging the equivalent of a placeholder attribute into the control, you might end up typing at the end of the placeholder string which is a bit inconvenient for your users, particularly those who type without clicking on the edit box first (aka your keyboard-loving users).

Now, what happens when you submit?

Well, if the placeholder string fits within the constraints of the data string you can enter in the edit box, your application should accept it.

However, I’ve found situations where the placeholder text, when typed into the edit box, trigger validation messages because the validation logic looked for the placeholder text. This is less a problem when the placeholder text is “First name” but more a problem when the placeholder is “John”.

I got the idea for this post when I typed the placeholder text for an online import edit box that accepts a URL. The sample URL apparently resolves to a real Web site, but one which returns an HTTP 599 error due to a bad certificate (which led to a defect report about an unhelpful error message for HTTP 599 errors).

But typing the placeholder text into edit boxes can prove to be a test that occasionally bears bad fruit. Like any test.

Comments are closed.

wordpress visitors