Category: Web World

Website Usability, Part II: Accessibility

By law, all websites owned by the US federal government must comply with the Section 508 Federal Accessibility Standards. For private sites, such compliance may not be legally required, but it’s still a good idea; adhering to standards ensures that all of your potential customers can utilize your site.

 

The main component in designing an accessible website is ensuring that any non-text element, be it photos, music, video, etc, has a text equivalent; this can mean adding descriptive text to a photo or subtitles to a movie.  Some of the most common disabilities include:

Hearing Loss
Ensure that any audio that is required to fully use the site has accompanying text; for example, you can add captions to a video using software like Camtasia, and provide transcripts of podcasts. In many cases, audio-to-text programs like Dragon NaturallySpeaking can do much of the work for you.

Vision Loss
Designing for vision loss often means desiging for screen readers, which has the side benefit of making your website easier for spiders as well. Ensure that alt tags contain useful information, and consider that blind users may not be able to tell if part of the screen updates without a page reload. People using screen readers may also appreciate being able to skip repetitive navigation links, rather than having to wait for the entire menu to be read out every time. Finally, ensure that all elements are accessible using the keyboard only.

Colorblindness
A significant percentage of the population has difficulty discriminating colors;  avoid using color as the only way of transmitting important information, and choose high-contrast color combinations. There are tools available that allow you to view your website as it would be seen by people with various types of colorblindness; you can also read more about optimal color choices here.

Addendum
When adding movie captions, etc, be sure that related information is synchronized; captions become annoying rather than helpful if they show up too late! CSS is a great thing for designing accessible websites, as it encourages thinking about content separately from style; be sure that it’s possible to read the page and have it make sense without loading the associated stylesheets.

Ensuring that your website is accessible can be a pain at first, but your customers will appreciate it. It’s always worth a little extra effort to have your site read by the widest possible audience!

The Google Sandbox

You may have heard people speak of the Google Sandbox as a dreadful place to be avoided. But what is it, exactly, and how can you avoid going there?

Google’s goal is to return the best possible search results. They have a number of rules for webmasters that basically boil down to: don’t screw with the search. For example, Google will penalize your site if they catch you buying or selling paid links.

Suppose you have a brand new site, just registered within the last few months, and it has thousands of links to it. What’s the most likely explanation – that this site is so incredible all these people have found out about it already, or that someone is trying to manipulate the search engine results? Google will assume the second, and they’ll put the site in the sandbox, which generally means it’s not going to show up when someone does a search for the targeted keywords. Considering Google’s share of the search market, this is a Bad Thing.

While the sandbox can be triggered automatically, Google employs people who actually go out and look at sites. If you have a new site that’s been growing so quickly that it got put in the sandbox, but not so quickly that it couldn’t just be the greatest site ever built, eventually someone from Google will come out and see if the site really does have the content the links say it has. For example, if One Ear Productions was a new site and suddenly had thousands of links talking about our awesome web design, someone might come check that the site really is talking about web design and doesn’t just have some crappy computer-generated articles and a bunch of advertisements. Google isn’t going to decide whether this really is the greatest web design company ever or whether we really are offering extremely informative articles on web design;  they just want to know that this is a legitimate site and we’re not trying to jerk them around.

Cliff notes? Publish high-quality content. Don’t buy or sell links, don’t give Google a reason to think you’re doing that, and don’t put a link to your brand new site in the footer of your 10,000 page site. Otherwise, you may find yourself sitting in the sandbox all alone..

Website Usability, Part 1: Search

One issue that plagues both software and web development is adding in features that sound cool, but confuse the user. What makes perfect sense to the designer often doesn’t make quite as much sense to someone using the software or website for the first time! Let’s talk about a few things that contribute to usable websites. We’ll start with one of the simplest: search.

 

Placing the Search Box

These days, users expect to see a search box; this is particularly true for ecommerce sites. Don’t make them hunt for it! It should be located near the top of the page, easy to find, and obvious (users should know without thinking about it that this is your search box). This doesn’t just apply to the homepage, either; every page of the site should have the search box, in the same place. Additionally, the default should be to search the entire site, not just the section the user is in; you may opt to provide a checkbox to restrict the search to the current section. As with any rule, there are exceptions; you might, for example, choose to restrict a blog search to the contents of that blog, as we’ve done here.

Handling Search Queries

Users generally expect to see the same results regardless of how they capitalize the query; your search engine should be programmed to ignore case unless there is a good reason to do otherwise, in which case (no pun intended) you can make case-sensitivity a selectable option.

Users often don’t know exactly what term to search for; it is helpful if your search engine understands related terms. For example, a user who searches for “food” might be interested in results for “cooking”, even if the word food never actually appears on the cooking page. One option is to show users a list of related terms that they can search on, and to attempt to correct misspellings. Consider Google: when typing, it offers suggestions for what term you might want, and if you search for what it believes is a misspelled word, it offers the correct spelling.

Design for the Average User

Remember that most users won’t search for long-tail keywords or use boolean queries; they’ll type 2-3 words into the search box and expect to get reasonably relevant results. A good search engine will make it easy for the users to define exactly what they’re searching for, even when the users can’t find (or spell) the correct search terms.

Feel free to provide advanced search options for power users, but don’t let them clutter up the basic search and confuse your new users. As in many things, strive for simplicity; your users will appreciate it.

HTML V, Part VI: What Time is it?

In part 1, we mentioned the <time> tag available in HTML5. The tag is pretty versatile, and allows  you to specify the date, as well as the time and timezone if desired. While every attribute in the tag is optional, if the datetime attribute is used it must be an exact, positive date on the proleptic Gregorian calendar – no partial dates (June) or negative dates (3 BC). At its simplest, we could write something like “it is now<time>3:56 PM</time>“. If you view the HTML source for this article, you’ll see that “3:56 PM” in the previous sentence actually is surrounded by <time> tags. Why doesn’t it look any different than the surrounding text? Like many of the new tags in HTML5,  isn’t intended to change how the webpage displays; rather, it provides additional semantic context that can be used when the page is interpreted. A calendar plug-in, for example, could detect the use of the time tag and use it to add an event to the user’s calendar. The Firefox Operator add-on uses this tag, among others; you can read more about Operator on the Mozilla blog. If I wanted to be more exact, I could say that I’m writing this blog post at<time datetime=”2010-7-12T16:08-07:00>Monday afternoon</time>. This gives the exact date, time, and timezone – in this case, UTC-7, Mountain Time.

HTML5, Part V: Forms

When it comes to forms, one thing I hear a lot about is setting them up using PHP; HTML has basic form capability, but don’t you want them to do more?

With HTML5, forms can indeed do more, without the need for any fancy scripting. The best part is, all of the new  features degrade gracefully, which means you can use them now without spending a lot of time worrying about what they’ll do in legacy browsers.

Let’s start with the basic elements of an HTML form, which are the same in HTML 4 and 5:

<form>

<input name=”name”  type=”type” value=”value”>

</form>

That’s all there is to it! Let’s take a look at each of these elements. The name tag identifies the input, which lets you refer to it later; this is particularly important when you’re using it to pass information to the next page. The type tag tells the browser what type of input to use, such as a button or dropdown. Finally, the value field is the default value; for a button, this would be the displayed text. Each of these tags is optional.

The nice thing is that when a browser doesn’t understand the given type, or the type is not given, it simply displays it as a text field rather than giving unpredictable behavior. This means we can use new HTML5 input types, knowing that people with older browsers will still have a way to provide input.

How about an example? Suppose I want you to choose an even number between 8 and 22, with a default of 12. I can do that using the following code:

<form> <input type=”number” min=”8″ max=”22″ step=”2″ value=”12″> </form>

If you’re using an HTML5-compliant browser such as Opera, the following should show up as a spinbox that allows only the even numbers between 8 and 18. In older browsers, it will show as a simple text field, but will still be validated – the form will refuse to submit if the user enters an illegal value. The second field is the same code with the type changed to range.

 

So why use these special tags instead of just having the user type a number? For one thing, it can be optimized in various ways. If you’re viewing this page on an iPhone, you won’t get a spinbox, but your keyboard will default to numbers. A search field (another new type) may be functionally the same as a text box, but if you’re using Safari on a mac, it’ll have rounded corners to look like the standard mac search boxes; on both Safari and Chrome, once you start typing a little x will appear to erase the field. While browsers don’t handle these tags in the same way, telling them what type of data is expected allows the more appropriate data entry.

Aside from new types of input, you can also do new things with the old types. For example, one thing that drives me crazy is scripts that autofocus on an input box; when I check my email on the web I tend to have finished typing my username and be halfway through my password when the page finishes loading and moves the focus back to the username field. Now, instead of using javascript, we can stick with HTML and accomplish the same thing in a less annoying (and more consistant) way. Consider the following code:

<form> <input name=”tellme” autofocus  placeholder=”Placeholder Text”> </form>

Depending on which browser you’re using, both, one, or none of the new attributes we’re using will take effect; whichever ones don’t will simply be ignored. Autofocus (predictably) sets the focus to this field, while placeholder text appears in light grey to tell you what you’re supposed to type:

Again, the nice thing is that this degrades gracefully, so it provides a better user experience for people with compatible browsers without annoying those people who don’t see it. (Of course, you may want to detect compatibility and use javascript to provide the same functionality so that more people can see your site as designed). Note that in the above example, we used autofocus and placeholder text together, which is kind of silly because putting focus on that window removes the placeholder text, but it will come back if you click on something else and remind you what needs to be typed there! Also, the autofocus brings this box into view as soon as you load the page, which means you have to scroll back up to get to the top of the article; not particularly good design, but it does demonstrate the power of this attribute.

Are You a Twit?

If you spend much time on the Internet, you’re familiar with twitter, even if you don’t entirely understand the appeal. Although it was started only four years ago, it’s now one of the most visited sites on the net. In fact, social media sites (Facebook, Twitter, etc) are now passing search engines as the most highly-trafficed sites on the Internet.  So what’s the big deal?

Twitter has a simple premise: what can you say in 140 characters or less? You could use it to waste time telling all your friends what you’re doing every minute of every day, but if you’re reading this, you’re probably more interested in how you can use it as a practical tool. So can you?

 

Twitter is the best-known example of what’s called microblogging; very space-restricted blogs. Like every other service ever made available on the Internet, people have used it for spamming links, and like most blogging software, it now uses nofollow links. In other words: linking to your websites on twitter won’t do anything for your search rankings. What it can do is help you bring in new customers and new business from your old customers.

For example, we often use our twitter page to let people know about new services we offer and articles that they might be interested in. At the time of this writing, the feed isn’t optimized yet; all it does is repeat the links from our Facebook page; thanks to Facebook’s linking feature, all you need to do is post a link and it’ll pull in the first paragraph of the linked page. Since we use descriptive permalinks, it’s easy to tell what the link is about even without other information..but isn’t there a better way?

By using a link-shortening service, we can add a description and still keep the total number of characters low enough to allow easy retweeting; retweeting is the process of forwarding on the message. For example, if we tweet “Awesome SEO article at xyz.com”, one of our followers might then tweet “RT: Awesome SEO article at xyz.com”, and maybe we get more visitors to this website.

There are several URL shortening services available, the most popular of which are probably bit.ly and tinyurl; twitter is also moving to wrap all links using their own t.co service. The downside of using these is that you can’t tell where the link is going without clicking on it; the upside is that it saves an awful lot of space!

So after optimization, we might announce the post on why pagerank doesn’t matter with something like this: “Why Pagerank Doesn’t Matter: http://bit.ly/cDbf56″. Short and to the point. And isn’t that what twitter is all about?

HTML 5, Part IV: Canvas

One of the hot new elements in HTML5, canvas allows you to draw graphics, generally using javascript. Remember that the canvas tag is not supported by IE8, so you’ll need to provide fallback content, like we did in the HTML5 video section, for IE users.

<canvas id=”id” width=”x” height=”width”> </canvas>

The width and height attributes, shown above, are both optional; unless specified they default to 300 pixels wide by 150 pixels high. You can set these using DOM properties or resize the element using CSS.

The canvas tag has not been implemented consistently between browsers. Notice that this isn’t a self-closing tag; text between the two tags will be ignored, so you would put replacement content there for browsers that do not support the canvas tag; leaving that space blank means that older browsers simply won’t display anything. Safari does not actually require the canvas end tag, but Mozilla does; thus the above style works for both as Safari simply ignores the </canvas>.

The WHATWG page has full documentation for this tag; unlike most other HTML, it requires some scripting to be useful. Rather than fully explore the tag, I thought I’d link to a few interesting sites that use it.

The HTML5 Canvas and Audio Experiment puts on an interesting light show (with sound, if your browser supports the <audio> tag). Notice the fallback text inside the audio tag in the page source, displaying an error message for browsers that don’t support it.

ball game – click the set of two or more balls of the same color to remove them. Can you get them all?

You can even use canvas to play a simplified game of Super Mario Kart!

SEO, Part V: Pagerank Doesn’t Matter

Wait, how can I tell you that pagerank doesn’t matter? Wasn’t I just talking about the importance of getting links from high-ranking sites? Didn’t I say that pagerank is a measure of how important your site is?

The above is all true. You do need to get links from high-ranking sites, and Google does use PR as a measure of usefulness. What it doesn’t tell you, however, is how relevant the page is. Let me explain.

Suppose you do a search for “how to shampoo the dog”. What would be more useful to you: a PR0 site with detailed dog-washing instructions, or a PR6 site selling dog shampoo? Obviously the former is a lot more useful to you, because it’s relevant to your query.

 

Similarly, while high pagerank is nice to have, your users don’t really care about it; they just want your site to give them what they need. Similarly, you just want your site to come up at the top of the SERPs (Search Engine Results Pages) so your customers can find you. Thus, you want to get links from high-ranking, relevant sites because they count as a strong vote that your page is useful.. provided they’re done right.

Next question: suppose you’re the owner of that webpage on how to shampoo a dog. Which would be more useful to you: a link from a PR2 page using the anchor text (that’s the words you click on) “how to shampoo your dog” or one from a PR6 page with the anchor text “click here”? Again, the former is more helpful; while the latter is better for increasing your pagerank, the anchor text only helps you to rank well for the term “click here” (which Adobe dominates), while the former tells Google what your site is about and helps them to return relevant results.

So do you care about getting a high PR on your sites? Well, yes – more pagerank is always preferable to less pagerank, and having a high-ranking site also speaks to the usability of new pages on that site that don’t yet have their own backlinks. Just remember: relevance trumps numbers!

In fact, Google has explicitly said that the PageRank system is one over more than 200 signals they use to index and rank pages. Remember, what they’re trying to do is find relevant, high-quality content; everything else is just a means to that end.

LAMP, WAMP, MAMP

If you’ve been involved with internet content for any length of times, you’ve probably seen the term LAMP, which is an acronym for Linux, Apache, MySQL, and PHP. (For WAMP amd MAMP, replace linux with windows and mac, respectively).

What’s so special about these four things? They’re all you need to build a general purpose web server. (Sometimes Perl or Python will be used instead of PHP). Along with HTML/CSS and AJAX, you have all the tools you need to build interactive websites. So why do we use these technologies?

 

For one, LAMP is cheap. Linux, Apache, MySQL, and PHP are all free to download and use, and tend to be available on any halfway-decent web host. In most cases it’ll all be set up for you in advance, making it easy to get started.

Linux, of course, is your operating system; generally you’ll have the choice of hosting on either a linux or a windows box, but computer geeks tend to prefer linux.

Apache is a web server (actually, the most popular one in the world). It’s been around for over 15 years.

MySQL is a multiuser database management system using SQL, which is available under the GNU license. SQL is an easy-to-use relational database that forms the basis for most modern database systems.

PHP, which recursively stands for PHP Hypertext Processor, is a server-side scripting language that can be embedded into HTML; it’s generally used to create dynamic webpages.

When hiring a web design expert to create your dynamic website, you’ll want to be sure to find someone who’s familiar with all of the above technologies, as well as HTML (preferably HTML5), CSS, and possibly AJAX; together, these technologies allow you to create a clean, fully-functional interactive website.

Building a Blog, Part VI: The Importance of Permalinks

If you’re reading this from the main site page, go ahead and click through to the article. Now look up at the url for this page. What do you see? The link looks something like this:

http://blog.oneearproductions.com/2010/07/building-a-blog-part-vi-the-importance-of-permalinks

Now, if we were using the default WordPress settings, it would actually look like this:

http://blog.oneearproductions.com/?p=316

Which version tells Google what the page is about? Bingo! You always want to use the first type of link because (assuming you picked a good post title), it tells people and search engines what your post is about.

 

Doing this in WordPress is easy; just go to the settings dropdown and click permalinks. You’ll see a half-dozen options; we’re using year, month, and post title, but anything works as long as it includes the title. If you want to make your own custom style, use the last option; just be sure to include %postname% in your url template.

How does this affect your SEO results? Suppose Google is indexing this page (which will happen about two minutes after I hit “publish”). First it reads the url and sees the keywords blog and permalinks. Then it reads the page and sees those same words repeated again. Bingo: Google concludes that this webpage (that is, this post) must be related to those terms, and this is a relevant result for people who want to read more about them!

If I was trying to  make this page show up in the first SERP, I’d start by making the page search-engine friendly (as well as user-friendly); a relevant url is one way to do that. After that, I’d get started building links to this page from relevant websites. Notice that the link in that last sentence uses anchor text that includes the keyword (links) for the page it’s linking to; that page contains the same keyword in the url and title (and, of course, in the body of the post). At this point, Google has a really good idea what that page is about!

Remember, the whole point of search engines is to help users find the most relevant results; accurately describing the content of your pages helps them match the correct page with the correct user. While some people try to abuse the system to get as many visitors as possible to worthless spam pages in the hopes of getting advertising money, when running a legitimate site you want to attract exactly those users that are looking for the content you can provide. Why waste bandwidth (and people’s time) on users who don’t want what you’re offering? Google, of course, is always on the lookout for spam sites (and has human evaluators, as well as software, to help find them), and will happily remove them from the search results. Stick with white hat SEO; don’t let delisting happen to you!