SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,278
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)

    "Stupid users foiled again!" [placeholder attributes]

    Some may laugh at the description of problems some of these users have experienced, but honestly, who cares if they really were dumber than a bunch of rocks? We're not professors grading them. We're trying to get them to just use our stuff without frustration. If dumb people can't use our sites, we have failed. Even if your target audience is rocket surgeons. No, actually especially if they are.

    http://lists.w3.org/Archives/Public/...3Mar/0193.html

    It appears years of Javascripted placeholders has trained most of us (including me) to expect the temporary text will vanish the moment the input receives focus. This despite the fact that this is a sucky way of doing it: going through a form, many users (including me) hit tab right away to finish the previous field, before our eyes have gone looking for the next label.

    So most browsers (not Opera I notice, but Firefox has switched) are currently showing the HTML5 placeholder attribute the way webkit first did: the placeholder remains until the user actually tries to type something. While this is really a better way to do placeholders, the above mail shows it's still a problem for users, who've been trained to try to remove placeholder text if it does not vanish once focus is on the input.

    So, interesting to hear these anecdotes regarding placeholders. Anyone have any good usability stories out there?

  2. #2
    SitePoint Mentor silver trophy
    Rubble's Avatar
    Join Date
    Dec 2005
    Location
    Cambridge, England
    Posts
    2,398
    Mentioned
    81 Post(s)
    Tagged
    3 Thread(s)
    I can not see the point in having a lable "Name" next to a text box and then having "Enter your name" or something similar in the box in the first place.

    I quite often start typing and find my text in the middle of a placeholder text

  3. #3
    SitePoint Zealot
    Join Date
    Sep 2009
    Posts
    118
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, rubble is quite right. With the JS method being so common, I sometimes find myself getting no search results for "Search this sitemykeyword" because developers ignore the principle that whatever is removed by JS should have been added by JS. At least the HTML5 method avoids this kind of problem.

    Regarding poes's comment, Mozilla and Chrome annoyed me (with my user's hat on) when they decided that the attribute value should stay visible until you type. It does indeed feel very like being presented with a JS placeholder instead.

    On the rare occasion of using a placeholder in lieu of keeping the label on-screen, I add something like this:

    Code:
    input::-moz-placeholder {color: #222; opacity: 1;}
    input:focus::-moz-placeholder {color: #888;}
    This fades on focus, then disappears when typing, which I like. Colours are just examples. Webkit code is much the same, but without opacity. The opacity is necessary to override the colour in Firefox (which is dumb). And speaking of dumb, why did Mozilla omit backward compatibility when switching from pseudo-class to pseudo-element syntax recently? I bet that a lot of placeholder colours remain broken because of this, and the default colour is far too pale.

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,176
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    I occasionally use Safari, and there is default text in the search bar that says "Search Google or enter an address". That text only disappears once you start to type. I have to admit, I find it very unnerving to have text there once I've focussed on that field. I would always prefer to have a label and no default text in the input field.

  5. #5
    SitePoint Zealot
    Join Date
    Sep 2009
    Posts
    118
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's sort of a weird disconnect in one app's UI, Ralph. I believe that Safari still uses the "old way" of styling placeholder attributes (can't check right now), so it has one behaviour occurring in the browser chrome and another in websites. I wonder if Safari will start to use Google/Mozilla's "new way". It would be wrong, but it would not surprise me.

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,176
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by Mat30 View Post
    so it has one behaviour occurring in the browser chrome and another in websites.
    Yes, a bit odd. I find it unnerving because it always makes me feel like I haven't actually focused on the address bar when I have. I guess I've gotten used to the text disappearing on focus. As mentioned above, it's doubly annoying when the default text doesn't clear and gets mixed with what you actually typed. That's got to be the worst scenario of all.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •