Quantcast

JavaScript password checker

(No Ratings Yet)
Loading ... Loading ...

If you're new here, you may want to subscribe to my RSS feed. So that you can read the latest updates about Web2.0 tools, Making Money Online, Tips in SEO, Ajax and many more. Thanks for visiting ProgramimiCOM!

At your site do you have a registration form? Want to check for password length before the form is submitted? You can do this easily with JavaScript and a little alert box.

First of all here’s a little sample form you might have:

 

<form name=“form_name” method=“post”>
Username:<br /><input type=“text” name=“username” /><br />
Password:<br /><input type=“password” name=“password” /><br />
<input type=“submit” name=“submit” value=“Submit” />
</form>

That’s just a simple form with a username, password, and submit field. Now what we’re going to do is add one more attribute to our password field to make it look something like this:

 

<input type=“password” name=“password” onblur=“javascript:checkPassword()” />

The onblur attribute activates it’s value when you unselect the object in question. So, when we unselect the password field, the javascript function “checkPassword()” will be called. Now we have the HTML, however we have to make checkPassword() actually do something, so we have to define a javascript function in the head of our document.

Anywhere between your and tag, you would add something like this:

 

<script language=“JavaScript” type=“text/javascript”>
<!–//
function checkPassword(){password = document.form_name.password.value; //Gets the value of the form element “password” in the form named “form_name”
if(password.length < 6){ //If the password length is less than 6
alert(“Please enter a password of 6 characters or more”); //Alert that it needs to be 6 or more
}

}
//–>
</script>

You can easily change the number 6 to whatever number you want, and it will always alert when you blur away from the element :) If you have a different name for either your form or your field you have to change the JavaScript accordingly, although I’m pretty sure you could probably figure out how to do that?

And that’s it, pretty simple :) You could also do some more complex things with it such as check for certain characters using Regex.

Toggling Visibility

(No Ratings Yet)
Loading ... Loading ...

Many times for navigation menus you want to have sub-items of a specific category, but don’t want them to be shown all the time. There is a much easier way to do this than to have something server-side handle this and refresh the page, that way is to use JavaScript. :)

Surprisingly, this is easy. The only JavaScript we need is a simple function that takes the id of the element to toggle, than displays or hides it according to the current setting. Doing this involves simply changing the display method to either none or block.

Let’s see some code:

function toggle(id)
{
if(document.getElementById(id).style.display == “none”)
{
document.getElementById(id).style.display = “block”;
}
else
{
document.getElementById(id).style.display = “none”;
}
}

This function takes the specific id of the item we want to toggle, than decides wether to make it visible or hidden using a simple if conditional. Below is a full page using this:

<html>
<head>
<title>Toggle Visibility</title>
<style type=“text/css”>
.subitems
{
margin-left:5px;
}
</style>
<script type=“text/javascript”>
function toggle(id)
{
if(document.getElementById(id).style.display == “none”)
{
document.getElementById(id).style.display = “block”;
}
else
{
document.getElementById(id).style.display = “none”;
}
}
</script>
</head>
<body>
<h2>Categories</h2>
<a href=‘#’ onclick=“toggle(’php’);”>PHP</a>
<ul id=‘php’ style=‘display:none;’ class=’subitems’>
<li>Articles</li>
<li>Tutorials</li>
</ul>
<br /><br />
<a href=‘#’ onclick=“toggle(’css’);”>CSS</a>
<ul id=‘css’ style=‘display:none;’ class=’subitems’>
<li>Articles</li>
<li>Tutorials</li>
</ul>
</body>
</html>

This script implements the toggle function by having two lists, set to display:none at first, toggle their visibility by clicking a link. As you can see, each list has a specific id which is used in the toggle function (php, and css).

Form Labels

(No Ratings Yet)
Loading ... Loading ...

More and more sites are using the label element in their forms, which is always a cool thing. Basically, you enclose the label tag around the text which tells about the current input, which could be for a username, E-mail address, or search term. By clicking the label, you focus that field. It’s pretty basic, but it adds to the user’s experience on your site. To know which input to focus, the label element takes 1 attribute, for, which is the ID of the input. Here’s an example:

<form method=“post” action=“?”>
<label for=“username”>Username:</label> <input type=‘text’ id=‘username’ /><br /><br />
<label for=“password”>Password: </label> <input type=‘password’ id=‘password’ /><br /><br />
<input type=“submit” value=“login” />
</form>

Multiple CSS Classes

(No Ratings Yet)
Loading ... Loading ...

Elements are not limited to only one class, you can easily declare multiple ones, all you need to do is seperate the classes with a space.

<style type=‘text/css’>
.highlight
{
background-color:yellow;
}.heavy
{
font-weight:bold;
}
</style>
<p>The most important thing to remember is <span class=‘heavy highlight’>my birthday</span>!</p>

That easy!

Centering divs with CSS

(No Ratings Yet)
Loading ... Loading ...

Centering divs isn’t quite the same as centering normal html elements. You cannot use the align attribute, you have to define margins like this:

div#some_id
{
margin-left: auto;
margin-right: auto;
width: 500px;
}

You could then get a horizontally centered div 500px wide!

**Note: using the align attribute will only center the html inside the div.

List-O-Matic

(No Ratings Yet)
Loading ... Loading ...

List-O-Matic has always been my favorite of Accessify’s tools. It takes you through a few simple steps that allow you to quickly and easily make some professional, W3 compliant CSS navigation. I had used it many times back in the months before I understood CSS and how to use it, haha. Check it out! It’s great not only for use but as a learning tool as well!

Problems with the Equal Height Columns method

(No Ratings Yet)
Loading ... Loading ...

Several issues have been discovered since publication which, depending on your requirements, can cause severe problems when using the equal height technique.

  1. Linking to anchors in elements within the containing block
  2. Selecting and scrolling in Gecko-derived browsers
  3. Printing in Internet Explorer

Linking to anchors in elements within the containing block

Linking to an anchor in any of the columns within the element that has been set to overflow: hidden causes the content of that column to shift upwards. In IE and Firefox, that is.

Example of anchors in the equal height method

ie. it’s not the large padding that’s casuing the problem (though obviously it is the trigger of the behaviour)

A fix for IE

Fix for anchor problem in IE

IEs 6 and under are easy. Simply suppress the overflow: hidden on the containing wrapper element.

IE7b thought doesn’t work since overflow:visible makes the overflow of the columns, well, visible. So we use an expression instead, making the columns the height of the column container.

However, there are dragons here…

  1. If we use the exact height of the wrapper, things can explode on first load or, absolutely without fail, when refreshing the page using F5. We can be worked around by taking a pixel off. Then the shorter columns are still shorter requiring the footer to be shifted up a pixel for good measure.
  2. Of course, it will fail utterly if the security level is such that expressions don’t get evaluated or at the very least annoy the hell out of users with a prompt to allow the expressions to be evaluated…

So if you don’t like those dragons, you might prefer to force IE7 into Quirks mode. [1]

No cure for Cancer

…or rather, there appears to be no fix for Gecko-based agents. I had thought shifting the padding and negative margin to the top (like for the Opera 8 fix) would sort things out, but once Gecko knows that the box is larger than what’s displayed the anchor shifting occurs.

Half a cure for Geckos

Half fix for anchor problem in Gecko

Ingo Chao has come up with a solution that works as long as certain conditions are met - the trick is to apply position:absolute to the target.

For anchors of the form <a name="target"></a>, this presents no problems. If the target element can stand being absolutely positioned, everything will be ok. Obviously though, attempts to apply the same technique to an anchor which is actually an id on an element enveloping content will result in dismal failure. And for many off-the-peg blogs and CMSes, that’s probably going to be the case.

Furthermore, the parent element of the target must not have position:relative applied to it, which also somewhat reduces the usefullness of the technique.

What the hell is going on?

Weirdly, just to add spice to the whole over-egged pudding, when used in equal heights mode, Opera 9 doesn’t shift. But with the following reduced test case, it does.

Two distinct behaviours can be seen in the previous reduced testcase.

Behaviour A
the content shifts within the element to reveal the triggered anchor
Mozilla since 1.6a, IEs 5.01 through 6 and Opera 9b
Behaviour B
nothing happens
as seen in Safari, IE Mac 5, Mozilla 1.5 and earlier, and Operas pre v 9

The question is, are current Geckos, IE and Opera 9 correct in their handling of the above example? What do the specs say?

This value indicates that the content is clipped and that no scrolling user interface should be provided to view the content outside the clipping region.

CSS 2.1, 11.1.1 Overflow: the ‘overflow’ property

So does that mean that the content can be scrolled (though no interface should be provided) which is what Firefox and IE are doing, or does it mean that no scrolling should occur? But how would the latter jive with scrolling the content via scripting (which is surely meant to be allowed)?

Sorry. Not fair. It’s a bogus question. In the words of the editor of the CSS specs, Ian Hickson, “The spec doesn’t define what happens with anchors.” So, let’s play detective and figure out when (and hopefully why) the behaviour changed in Mozilla and Opera.

For Opera, the answer is fairly easy to track down thanks to a note in the changes log, under the heading “Acid2 Fixes”…

Elements with overflow:hidden; can scroll to anchors within them.

…which was done presumably (remember the specs say nothing about how an agent should handle anchors) because unless they scrolled to the anchor on the test page, nothing would show at all and so they would fail the test at the first hurdle.

Safari has taken a different route to passing the test - by making the html element scrollable when overflow property is set to hidden, but not doing so for any other element.

Of course there’s nothing to say which of these paths (if either) is correct. There’s nothing in the Acid2 guide reference that mentions testing for such behaviour and the only comment about the use of overflow:hidden; on the html element is:

/* page setup */
  html { font: 12px sans-serif;
  	margin: 0; padding: 0; overflow: hidden;
  /* hides scrollbars on viewport, see 11.1.1:3 */

The Second Acid Test

…which leads us back to that section of the CSS specs which, er, has nothing to say about the treatment of anchors.

So how did the test get into Acid 2? What is its purpose? Fortunately a little bird was able to tell me that Ian Hickson was the lead in constructing the Acid2 test. So I asked him why it was set up that way, with the content hidden and being scrolled to, and whether this was an intentional part of the test, or it just happened that way because that’s how Mozilla and IE handled it

Hmm. I didn’t think about how anchors interacted with the overflow:hidden text and just assumed it would work. :-)

The reason I used overflow:hidden at all was to test make one of the browsers implement overflow:hidden on the root element, because authors were complaining it wasn’t supported (I don’t remember which one any more, probably Opera). Also, I needed to have scrolling to test fixed positioning, but I didn’t want to show the scrollbar.

via personal correspondence

Incredibly dull downloading of many many copies of old versions, followed up by combing through the bug tracking system eventually gave up the point where Mozilla had begun to scroll overflow:hidden, which in turn pointed to bug 221140 which gets us towards the heart of the matter.

The basic problem here is that ’scroll’ and ‘auto’ have never worked on table cells, and the working group decided to make ‘hidden’ work like ’scroll’ and ‘auto’, so now ‘hidden’ doesn’t work either.

Bug 221140 - ‘overflow: hidden’ on table cells broken, comment #4

Of course, the question of exactly what and where the working group had decided is moot. Let’s have another look at our old friend 11.1.1, the overflow:hidden definition (remembering that it says nothing about how user agents should deal with anchors):

This value indicates that the content is clipped and that no scrolling user interface should be provided to view the content outside the clipping region.

CSS 2.1, 11.1.1 Overflow: the ‘overflow’ property

Previously the same section had been:

This value indicates that the content is clipped and that no scrolling mechanism should be provided to view the content outside the clipping region; users will not have access to clipped content. The size and shape of the clipping region is specified by the ‘clip’ property.

CSS 2, 11.1.1 Overflow: the ‘overflow’ property

Do these changes to 2.1 mean that Behaviour A is correct and were they introduced for exactly such a situation?

Prodding Ian Hickson again, I got the following explanation:

It was changed in issue 1-16, around July-September 2003. But it was made in response to an W3c-internal-only comment, so that won’t help you…

… I imagine the reasoning was “to make CSS compatible with the Web”, which already behaved that way.

… It was probably more “browsers won’t change their behaviour to match the spec because doing so would break Web pages, so we’ll change the spec to match the browsers instead”. (This reasoning is the thinking behind much of the changes to CSS2.1. Pragmatism is an important factor in the development of the CSS2.1 and HTML5 specifications.)

via personal correspondence

A bit of a mess…

So to sum up, the situation is happenstance yet quasi-official. That’s how IE did it, so the W3 working group and Mozilla followed suit. And Opera followed along later to pass a test that reflected that status quo.

Consequently there’s nothing to say that Safari’s divergent behaviour (scroll on html element, no scroll on any other) isn’t correct. Or what the behaviour should be if a box that overflow: hidden is applied to is tall enough to show all the content within it, but there is additional padding-bottom beneath it…

La Chatte Noire example 1

La Chatte Noire example 2

And Bug 259615 - ‘overflow: hidden’ elements shouldn’t be scrollable by the user probably shouldn’t really be a bug. But Bug 325942 shows that some of the Mozilla team think it should.

Recommendations

Sorry, I don’t have any recommendations. Really. It’s up to you to decide what works for you, just like you should decide what browsers you should support. That said:

  • Use of the method in situations like the Tucows example where the technique is used just for a component of the page will be solid. (ie. just place any anchors you might need before or after the columns)
  • Use for whole page layouts will be solid if you can guarantee that you won’t need to use named anchors within the columns.[2]

If you can’t guarantee the absence of anchors, then you’re probably going to be better off going with faux columns or a javascript-based solution.

Of course, if Mozilla supported multiple background images this would all be irrelevant… Or if Mozilla could apply position: absolute to generated content properly…

Selecting and scrolling in Gecko-derived browsers

Drag to select content within the longest column and keep dragging downwards - if the bottom of column is above the bottom of the viewport there is no problem. If it’s below the bottom of the viewport then it keeps scrolling, shunting the content of all the columns upwards and very rapidly at that so that in all likelihood it just vanishes. (It is possible to scroll it back if some of the content is still visible and selectable - but that’s an academic point since in reality the average user is going to be just as foobarred as if all the content had dissapeared)

Fixed as of Firefox 1.5 and Camino 1.0, so this is basically a non-issue.

Printing in Internet Explorer

A less serious problem (unless you’re being bitten by it) is that it can cause printing problems for IE. Depending on the exact values used for padding-bottom and margin-bottom, the content in the columns can shift upwards and even disappear entirely. The answer to this problem is to suppress the negative margin-bottom (and consequently the padding-bottom too) in a print style sheet. You shouldn’t be printing the backgrounds in any case ;)

Do not ask for whom the bell tolls

So, the end result may be that the actual usefulness of the equal heights technique is in exposing flaws in certain rendering engines (whether it’s Safari and Opera or Explorer and Gecko that get it wrong I leave for others to decide).

Fortunately for me, it’s the technique that I’m least concerned about since there’s always Faux Columns to fall back on. And even more fortunately I covered myself in the article by saying that Faux Columns would probably remain the weapon of choice ;)

Browser Shifts on anchor trigger Scrolls on select drag
Firefox 1.5 Yes No
Firefox 1.07
NS 7.2
Yes Yes
IE 6 Yes No
IE 5.01 (+ 5.5 ?) Yes No
Opera 9b Yes No
Opera 8.5, 8.0, 7.54, 7.23, 7.1, 6.06, 5.11 No No
Safari 2.0, 1.03 No No
iCab 3.01 No No
IE 5.23 (Mac) No No
NS 7.1, 6.23, 6.1 No No

 

  1. Alternatively there’s an equally trivial fix for IE 5.01 and 5.5. Give the column wrapper a height and then set the columns to be 100% high. IE 6 would obviously be the same in Quirks mode, but in Standards mode that doesn’t work. So we’d need to use the same type of expression as for IE7 instead, making the columns the height of the column container, with all the same caveats mentioned above. along with an additonal one that changing the font size can cause IE6 to go screwy. Of course, I don’t recommend this over the above-mentioned method, but just so you know. There might be a situation where you can’t rely on expressions and don’t mind being in Quirks mode…?
  2. Incidentally, a certain celebrated ascetic mad monk, er, usability expert, has decreed use of anchors considered harmful.?

 

 

(Position is Everything)

Avoid Within-Page Links

(No Ratings Yet)
Loading ... Loading ...

Within-Page Links Violate Users’ Mental Model

On websites, within-page links are bad for the same reason that PDF files are bad entered without warning in the top-ten design mistakes. Users have developed a strong mental model for link following, which has several elements:

  1. Clicking a link navigates you to a new place.
  2. After you click, the old page goes away.
  3. A new page loads into the window, replacing the old page.
  4. You first see the top of the new page.
  5. The Back button returns you to the old page.

Because almost all clicks work this way, users have very strong expectations that the Web will work this way. It’s a simple model that makes sense. Within-page links violate all five points in users’ mental model of links:

  1. A within-page link scrolls the window rather than navigating you to a new location. This confuses users: they assume they’ll get new information, but if they’ve scrolled through the page before clicking, they’ll get stuff they’ve already seen.
  2. The old page doesn’t go away; it’s still in the window. However, because users think they’re on a new page, they’ll try to figure out how the “new” information differs from what they’ve seen — obviously, a futile task.
  3. No new page is loaded into the browser window: it displays the same data, just scrolled differently.
  4. Rather than land at the top of the page, you typically find yourself somewhere in the middle with no navbar or other expected top-of-page design elements.
  5. Clicking Back doesn’t take you to the previous page; it takes you to the previous scroll state of the same page. This can doubly confuse users who’ve scrolled to the top of the page before clicking Back.

After experiencing a few within-page links and Back button clicks, most users are completely confused about where they are on a site. Our studies also show that such links typically waste far more time than they save because users click back and forth multiple times and repeatedly review the same material.

When Within-Page Links Are OK

To avoid confusing users, you must communicate exceptions to their expectations in advance. It’s okay, for example, to use mailto links, as long as you clearly indicate that the links will activate an email program rather than navigate users to a new page. You can signal this through link format (”donald@duck.com“) or wording (”send an email to customer support“). Similarly, if you absolutely must use within-page links, say so. For example, add a short statement that says something like: “Clicking a link will scroll the page to the relevant section.”

Assuming you warn users, within-page links have three acceptable uses. First, with long alphabetized lists, you can show the letters of the alphabet across the top of the page and have each letter link to the appropriate place in the list. Second, in frequently asked questions lists (FAQs), you can list the questions at the top of the page and make each question a link that scrolls the page to the associated answer. Third, there are a few other cases where you can start a page with a table of contents that links to the appropriate sections further down the page.

All three exceptions share a common format: a long list of items summarized at the top of the page, with links taking users directly to the desired items.

Even with this scenario, it’s best to avoid within-page links if possible. You might, for example, make the lists short enough that users can easily scroll them. Only for very long pages will the time saved be worth the confusion that within-page links can cause.

For example, we recently tested a website that listed information for each of the fifty US states on a single page. Above the fold, the page displayed a map of the US with instructions that told users to click on their state.

First off, it’s usually a bad idea to ask users to select their state or country by clicking on a map. While it works well for those of us in big states like California, take pity on folks from Rhode Island or Connecticut. (The same argument applies, for example, when asking users to pick their country from a map of Europe: fine for German users, less ideal for Belgians.)

Assuming users have sufficiently steady mouse hands to click their particular state, our example page scrolls accordingly. If users click a state in the middle of the alphabet (say, New York), the state appears at the top of the window and users can easily find their information. Unfortunately, if they click, say, Wisconsin, they’ll typically find Tennessee on top of the screen, because that’s as far down as the page will scroll. This causes confusion: “I clicked Wisconsin, but it says Tennessee?”

In this case, because each state has only a few data items, it would be better to simply let users scroll through the page to find their state. Sure, that’s annoying if you’re from Wyoming, but it actually requires less time to simply scroll than to read and understand the non-standard instructions for clicking the map. After all, people arrived at such pages by clicking links like “Information about foo by state“; they expect to see a list of states, and know where to find their own state in the list.

Linking to Named Anchors Across Pages

Using named anchors to link to a specific place on a different page is not as bad as using within-page links on a single page. When you link to a named anchor on a different page, you retain four of the five expectations in users’ mental model: they navigate, the old page disappears, a new page loads, and they click Back to return to the old page. The remaining expectation is the only problem: instead of going to the top of the new page, users are typically dumped into the middle.

While it’s certainly better to violate only 20% of the mental model, violating user expectations is still a bad idea. Dumping users in the middle of a page causes usability problems because users need to situate themselves when they land on a new page. A page’s headline, introduction, and navigational apparatus provide essential context to that end.

Nonetheless, named anchors are tempting. At the top of this page, for example, I have links to various articles because I refer to points made within them. I refer to those mistakes in the Top Ten Web-Design Mistakes article. While it could be advantageous to directly link to these two sections, direct links also have disadvantages.

Say, for example, I linked to a named anchor for #6, which is about JavaScript in links. Sure, you’d see this point first, but further down your screen you’d see #7, which is about adding infrequently asked questions to a FAQ. That’s an odd continuation of a JavaScript discussion, don’t you think? That’s the penalty of starting users in the middle of a page when they don’t understand what the page is about.

The best solution in such cases is to create separate pages for everything that serves as a link destination.

So: you should avoid named anchors and within-page links because they violate users’ expectations for hypertext linking on the Web. A link should bring up a new page. Deviating from this model requires an explanation; you should only deviate if it will save users significantly more time than they’ll waste pondering the non-standard interaction technique.

Top Ten Mistakes in Web Design

(No Ratings Yet)
Loading ... Loading ...

The ten most egregious offenses against users. Web design disasters and HTML horrors are legion, though many usability atrocities are less common than they used to be. This article presents the highlights: the very worst mistakes of Web design. (Updated 2007.)

1. Bad Search

Overly literal search engines reduce usability in that they’re unable to handle typos, plurals, hyphens, and other variants of the query terms. Such search engines are particularly difficult for elderly users, but they hurt everybody. A related problem is when search engines prioritize results purely on the basis of how many query terms they contain, rather than on each document’s importance. Much better if your search engine calls out “best bets” at the top of the list — especially for important queries, such as the names of your products.

Search is the user’s lifeline when navigation fails. Even though advanced search can sometimes help, simple search usually works best, and search should be presented as a simple box, since that’s what users are looking for.

2. PDF Files for Online Reading

Users hate coming across a PDF file while browsing, because it breaks their flow. Even simple things like printing or saving documents are difficult because standard browser commands don’t work. Layouts are often optimized for a sheet of paper, which rarely matches the size of the user’s browser window. Bye-bye smooth scrolling. Hello tiny fonts. Worst of all, PDF is an undifferentiated blob of content that’s hard to navigate.

PDF is great for printing and for distributing manuals and other big documents that need to be printed. Reserve it for this purpose and convert any information that needs to be browsed or read on the screen into real web pages.

> Detailed discussion of why PDF is bad for online reading

3. Not Changing the Color of Visited Links

A good grasp of past navigation helps you understand your current location, since it’s the culmination of your journey. Knowing your past and present locations in turn makes it easier to decide where to go next. Links are a key factor in this navigation process. Users can exclude links that proved fruitless in their earlier visits. Conversely, they might revisit links they found helpful in the past. Most important, knowing which pages they’ve already visited frees users from unintentionally revisiting the same pages over and over again.

These benefits only accrue under one important assumption: that users can tell the difference between visited and unvisited links because the site shows them in different colors. When visited links don’t change color, users exhibit more navigational disorientation in usability testing and unintentionally revisit the same pages repeatedly.

> Usability implications of changing link colors
> Guidelines for showing links

4. Non-Scannable Text

A wall of text is deadly for an interactive experience. Intimidating. Boring. Painful to read. Write for online, not print. To draw users into the text and support scannability, use well-documented tricks:

  • subheads
  • bulleted lists
  • highlighted keywords
  • short paragraphs
  • the inverted pyramid
  • a simple writing style, and
  • de-fluffed language devoid of marketese.

5. Fixed Font Size

CSS style sheets unfortunately give websites the power to disable a Web browser’s “change font size” button and specify a fixed font size. About 95% of the time, this fixed size is tiny, reducing readability significantly for most people over the age of 40. Respect the user’s preferences and let them resize text as needed. Also, specify font sizes in relative terms — not as an absolute number of pixels.

6. Page Titles With Low Search Engine Visibility

Search is the most important way users discover websites. Search is also one of the most important ways users find their way around individual websites. The humble page title is your main tool to attract new visitors from search listings and to help your existing users to locate the specific pages that they need.The page title is contained within the HTML <title> tag and is almost always used as the clickable headline for listings on search engine result pages (SERP). Search engines typically show the first 66 characters or so of the title, so it’s truly microcontent.

Page titles are also used as the default entry in the Favorites when users bookmark a site. For your homepage, begin the with the company name, followed by a brief description of the site. Don’t start with words like “The” or “Welcome to” unless you want to be alphabetized under “T” or “W.”

For other pages than the homepage, start the title with a few of the most salient information-carrying words that describe the specifics of what users will find on that page. Since the page title is used as the window title in the browser, it’s also used as the label for that window in the taskbar under Windows, meaning that advanced users will move between multiple windows under the guidance of the first one or two words of each page title. If all your page titles start with the same words, you have severely reduced usability for your multi-windowing users.

Taglines on homepages are a related subject: they also need to be short and quickly communicate the purpose of the site.

7. Anything That Looks Like an Advertisement

Selective attention is very powerful, and Web users have learned to stop paying attention to any ads that get in the way of their goal-driven navigation. (The main exception being text-only search-engine ads.) Unfortunately, users also ignore legitimate design elements that look like prevalent forms of advertising. After all, when you ignore something, you don’t study it in detail to find out what it is.

Therefore, it is best to avoid any designs that look like advertisements. The exact implications of this guideline will vary with new forms of ads; currently follow these rules:

  • banner blindness means that users never fixate their eyes on anything that looks like a banner ad due to shape or position on the page
  • animation avoidance makes users ignore areas with blinking or flashing text or other aggressive animations
  • pop-up purges mean that users close pop-up windoids before they have even fully rendered; sometimes with great viciousness (a sort of getting-back-at-GeoCities triumph).

8. Violating Design Conventions

Consistency is one of the most powerful usability principles: when things always behave the same, users don’t have to worry about what will happen. Instead, they know what will happen based on earlier experience. Every time you release an apple over Sir Isaac Newton, it will drop on his head. That’s good. The more users’ expectations prove right, the more they will feel in control of the system and the more they will like it. And the more the system breaks users’ expectations, the more they will feel insecure. Oops, maybe if I let go of this apple, it will turn into a tomato and jump a mile into the sky.

Jakob’s Law of the Web User Experience states that “users spend most of their time on other websites.”

This means that they form their expectations for your site based on what’s commonly done on most other sites. If you deviate, your site will be harder to use and users will leave.

9. Opening New Browser Windows

Opening up new browser windows is like a vacuum cleaner sales person who starts a visit by emptying an ash tray on the customer’s carpet. Don’t pollute my screen with any more windows, thanks (particularly since current operating systems have miserable window management). Designers open new browser windows on the theory that it keeps users on their site. But even disregarding the user-hostile message implied in taking over the user’s machine, the strategy is self-defeating since it disables the Back button which is the normal way users return to previous sites. Users often don’t notice that a new window has opened, especially if they are using a small monitor where the windows are maximized to fill up the screen. So a user who tries to return to the origin will be confused by a grayed out Back button.

Links that don’t behave as expected undermine users’ understanding of their own system. A link should be a simple hypertext reference that replaces the current page with new content. Users hate unwarranted pop-up windows. When they want the destination to appear in a new page, they can use their browser’s “open in new window” command — assuming, of course, that the link is not a piece of code that interferes with the browser’s standard behavior.

10. Not Answering Users’ Questions

Users are highly goal-driven on the Web. They visit sites because there’s something they want to accomplish — maybe even buy your product. The ultimate failure of a website is to fail to provide the information users are looking for.Sometimes the answer is simply not there and you lose the sale because users have to assume that your product or service doesn’t meet their needs if you don’t tell them the specifics. Other times the specifics are buried under a thick layer of marketese and bland slogans. Since users don’t have time to read everything, such hidden info might almost as well not be there.

The worst example of not answering users’ questions is to avoid listing the price of products and services. No B2C ecommerce site would make this mistake, but it’s rife in B2B, where most “enterprise solutions” are presented so that you can’t tell whether they are suited for 100 people or 100,000 people. Price is the most specific piece of info customers use to understand the nature of an offering, and not providing it makes people feel lost and reduces their understanding of a product line. We have miles of videotape of users asking “Where’s the price?” while tearing their hair out.

Even B2C sites often make the associated mistake of forgetting prices in product lists, such as category pages or search results. Knowing the price is key in both situations; it lets users differentiate among products and click through to the most relevant ones.

Will Plain-Text Ads Continue to Rule?

(No Ratings Yet)
Loading ... Loading ...

In general, advertising doesn’t work on the Web, a fact that has been clear to usability researchers since 1997. Users ignore ads because they are contrary to the Web’s basic imperative, which is to let users go where they want and get their information needs instantly gratified.

From the beginning, it was also clear that this indictment of Web advertising had two exceptions:

  • Classified ads work because as far as users are concerned, they are content, not advertising: people actively seek out the classifieds when they are looking to buy. This explains the success of eBay, Monster/HotJobs, and many such sites. The superiority of Web classifieds portends dire times ahead for traditional printed newspapers, as their most lucrative income source continues to migrate online.
  • Search engine ads work because search engines are the one type of website that people visit with the explicit goal of finding someplace else to go. Thus, if users see an ad for what they’re looking for, there is a high probability that they’ll click that ad. Advertisers can satisfy a user’s immediate needs because they target ads based on the user’s query terms. (This also explains why ads on search engine homepages don’t work: it’s impossible to target the ad to the user’s current quest until the server knows what that quest is.)

Both are examples of request marketing: prospects have explicitly asked for the promotions they are being shown, as opposed to having unwanted messages thrown at them. Text-only ads on search engines have become particularly successful in recent years, and non-search sites are now experimenting with this format in hope of replicating that success. However, it’s doubtful that their efforts will work because non-search sites lack the equation’s crucial element: users’ single-minded goal to leave the site as quickly as possible.

From Banner Blindness to Box Blindness?

Text-only ads might continue to work better than traditional graphics-based ads for some time to come. Web users have long exhibited strong banner blindness and avoid anything that looks like an advertisement. Text-only ads don’t resemble the designs that people have trained themselves to screen out, and the resulting visibility surely contributes to the success of text-only ads. Also, text-only ads benefit from a temporary novelty effect, as does any new advertising format that people have not yet learned to ignore.

Over the long term, however, the novelty effect will obviously fade. Users might also develop box blindness, ignoring little text boxes just as they’ve long ignored banner-shaped areas of the screen. Thus, text-only ads are not guaranteed a bright future outside their native search engine habitat.

Communicative Content

Text-only ads might have one durable advantage: because they’re a low-end media format, users might take them more seriously. Being forced to express a message in a few words concentrates the advertiser’s mind, and probably leads to more communicative ads that are better focused on explaining how users will benefit from the product or service. Although there is no inherent reason that you can’t use text for mindless chatter — like “where do you want to go today?” — there is no way users will click on such ads. Ignoring users’ immediate needs is certain death on the Web.

Companies that run rich-media ads that ignore user needs can delude themselves into thinking that they’re “promoting the brand”; in reality, they’re simply being ignored because they don’t connect with people’s needs. The text-only format more clearly exposes content-free messages as useless, however, and thus might save advertisers from the bad instincts they honed on old media.

After ten years of watching Web users, one clear conclusion is that they are utterly selfish and live in the moment. Giving users exactly what they want, right now, is the road to Web success, and having to write small boxes of text encourages advertisers to travel it.