Blogger Articles

Where is ‘Top of Mind’, and How Do I Get There?

This is a guest article by fatrabbit CREATIVE.

Quick, name a soft drink.

Maybe you said Coca-Cola; perhaps it was Dr. Pepper or 7Up. Either way, the soda that you picked obviously has a strong, memorable branding strategy.

We don’t have to preach to you about the importance of a strong brand (If we did, we wouldn’t be very good at our jobs). Analysts have spent their time, energy and countless kilowatts of brain power trying to create a measurable way to rank brands by how memorable they are.

If only they’d have thought to just ask people. Then, they might have stumbled on a little thing called top-of-mind awareness.

Where is ‘Top of Mind’?

Top of Mind

Top-of-mind awareness (or TOMA), is a pretty simple concept with pretty major implications. When consumers are asked which products or brands come to mind first when a particular business sector is mentioned, the one they choose is at their “top of mind”.

Remember our soft drink question at the beginning of this article? The soda that you named has earned its way to the top of your mind. If we asked you to name a fast food chain, the best smartphone, or your favorite newspaper, the same theory would apply. The concept of being “top of mind” is as uncomplicated as that, and the best part is it’s completely measurable.

Coming up with a plan to get to the top of your customers’ minds, however, may prove to be a bit more complex. With so many options available, how can you be sure that your brand’s marketing strategy gives you a fighting chance to be “top of mind” in your particular sector?

Think of the journey to “top of mind” as an uphill battle from the heart to the head.

First, you need your customers to love you. Then, you need them to think of you first when they’re in need of your product or service — no matter how far into the future that may be. That being said, you need a long-term plan of attack to not just get “top of mind”, but stay there.

The 5-Point Battle Plan for ‘Top of Mind’ Status

Strategy

1. Get entrenched for the long term.

According to Chilton Research, 34% of major-purchase consumers waited at least seven months to complete their purchase. 27% more bought over a year later. If over 60% of your potential customers are waiting that long to make a final decision, it’s essential you stay fresh in their minds over that period. If not, you’ll have done nothing but create a lead for someone else to close.

2. Ensure you can be found.

If your three least-favorite letters of the alphabet are “SEO”, now’s the time to change your tune. After all, there’s no point wasting your company’s resources if no one knows you exist. Optimize your website, engage actively in link building, employ keyword strategies and utilize thought leadership opportunities to establish your credibility with strong content. Like it or not, if you don’t work on your SEO, you’re only going to hurt three other letters: ROI.

3. Nurture leads with content-rich marketing.

Over this period of time, you’ll have the opportunity to enhance your brand’s value and build credibility with your leads. Now’s not the time to be annoying or vapid with your content. If you’re going to employ a strategy like email marketing (or a physical newsletter), make sure the content is rich and valuable – to your customers.

Don’t fall into the trap of spinning content with yourself in mind. What you find interesting and valuable may be of no use to your audience. Whatever your “top of mind” plan is, make sure it includes content that bolsters your brand’s value.

4. Don’t be cute. Be informative.

This is not an age of naiveté; customers know you have something to sell, and you want to sell it to them. While your message doesn’t need to be overt, don’t insult your audience’s intelligence by pretending the eventual sale doesn’t exist. Instead, buy into what they want: information. If you have a product, tell them about it. If you provide a service, explain why it’s superior.

Don’t push the sale; push why they should buy.

5. Stop competing.

It’s not as counterintuitive as you think. If your marketing content involves your competitors, doesn’t that just put them in your audience’s mind? Don’t waste time talking down your competition; instead, talk up yourself. Better yet, learn to talk less and listen more. Stop spending your time downplaying other brands and start collecting and analyzing data and feedback from your customers and leads.

‘Top of Mind’ Is Accessible to Everyone

Target Audience

Many people (wrongly) assume that “top of mind” status is reserved for the big boys with deep pockets and vast resources. Of course, this is often the case – Nike dominates the athletic shoe sector, McDonald’s has cornered fast food, and so on. But if you’re a small to medium-sized business (or even a one-man show), take heart: there’s more than one way to win the “top of mind” battle.

No matter how global the business world gets, consumers will always reserve room for a brand with which they can connect emotionally.

It’s how a corner coffee shop stays in business when the major chain moves in across town. As pervasive as the larger competition’s marketing may be, there is something to be said for personalized touch, community ties and the “look and feel” of home.

Whatever the size of your business, it’s vital to remember that brand awareness is ultimately as (or more) important that brand aesthetics. Employing a design firm with a firm understanding of you and your target customer is essential.

With the right strategy, content-rich marketing and a strong brand, you will find yourself first on your audience’s mind when they’re ready to make a purchase – no matter the size of your business.

How do you get to ‘top of mind’?

fatrabbit CREATIVE is a boutique branding and design firm from New Jersey. Find out more about them and see their work at fatrabbit CREATIVE. Photos by Thinkstock.


© This article is copyright of JUST™ Creative and should not be found elsewhere.


Mobile UX Research: Exploring Ten Fundamental Aspects Of M-Commerce Usability


  

Everyone is talking about mobile. Some e-commerce websites are venturing into it. Mobile commerce (also known as “m-commerce”) has immense potential, exhibiting a 86% growth rate and hitting $25 billion in 2012 (set to reach $86 billion by 2016, according to eMarketer).

It’s also a whole new platform, with new interaction methods and usage contexts that introduce a host of limitations and pitfalls to watch out for when designing and running an m-commerce website. With few best practices yet established, m-commerce is, to a large degree, unchartered territory when it comes to actual implementation.

This is why we decided to invest the better part of a year at Baymard Institute to conduct a large-scale usability study focusing specifically on m-commerce (following the “think aloud” protocol). We set out to explore the entire mobile shopping experience, including users’ conceptual understanding of m-commerce websites and how users interact with form fields, category navigation, search, product pages, the checkout process, etc.

The 18 m-commerce websites that we tested were: 1-800-Flowers, Amazon, Avis, Best Buy, Buy.com, Coastal.com, Enterprise.com, Fandango, Foot Locker, FTD, GAP, H&M, Macy’s, REI, Southwest Airlines, Toys “R” Us, United Airlines, Walmart.

into-mcommerce-usability-opt_mini

Despite testing the mobile websites of some of the largest e-commerce players in the world, our subjects encountered 1,000+ usability-related issues during the testing sessions. These usability issues have been analyzed and distilled into 147 design recommendations in a report titled “M-Commerce Usability.” In this article, we’ll share 10 recommendations from that report with you.

While following some of the guidelines would improve the usability of desktop websites, too, there is a major difference in the severity of breaking them. Whereas these guidelines are largely “nice improvements” on desktop, they are among the “vital basics” to get right on an m-commerce website. Thus, most of these usability guidelines are not exclusive to mobile, but they are much more critical to get right in the m-commerce context.

1. Make The Home Page Easily Scannable

Issue: When users are not able to get an overview of the entire website by quickly scanning the home page, they will feel less confident with the website and often end up choosing the wrong path for their task.

70% of the test subjects scrolled up and down the entire page when first landing on a home page or a category list, in what most described as “getting an overview of my options.” These subjects wanted to see their options before deciding which to choose. Even when they knew how they wanted to find a given product, some subjects still chose to get an overview of the home page, presumably to get a better feel for the website on which they were going to shop. In some instances, when a subject found the category they were looking for, they continued to look through one or two other categories to get a better sense of the other options on the website.

scannable-homepage-1-opt_mini
Most subjects scanned the whole home page to get an overview of their options and to better understand what they could do on a particular website. Here, one subject continued to explore the home page options, even after having found his desired navigation path of “category” → “men.”

Therefore, making the home page easily scannable is important because this will be the first point of contact for a very large portion of your mobile visitors. This initial impression will have a significant impact on the types of products they expect your website to carry and, just as importantly, not carry. While “easily scannable” might sound a bit vague, three instances of “what not to do” became clear during testing.

Having Too Many Visual Elements

Avoid the confusing eye path that results from placing multiple highly graphical elements that demand attention high up on the home page. This was the case on Macy’s, where approximately 60% of the first viewable part of the home page is plastered with highly graphical content, with at least eight different elements calling for attention:


Multiple subjects were overwhelmed by Macy’s home page because it was very difficult to scan. As one subject expressed it, “I’m desperately trying to get an overview here. There’s so much crap being shoved at my face.” The right-hand image shows typical eye fixations.

This is not to say you cannot have graphics — but limit their size if they are above the fold on the home page, and design them to have a clear eye path.

Not Showing the First Layer of Categories

Another mistake is unnecessarily hiding the category navigation. Some websites have a single “browse categories” option, which takes the user to a new page with the first layer of category choices. If you have a website where the user cannot browse with any method other than category and search (i.e. not by “brand” or “store” directly from the home page) and the number of main category options is of a somewhat manageable size, then this is an oversimplification. Instead, show the first level of category options directly on the home page so that users can start scanning the list immediately upon landing on the home page.


On the left: On Coastal.com, all the category options are displayed directly on the home page, which not only allows direct access, but gives users an accurate idea of the types of products they can expect to find on the website. For stores with multiple ways of browsing the catalog (e.g. by both “category” and “brand”), displaying the category options directly on the home page might not be feasible. On the right: For stores with a very high number of first-layer categories (typically mass merchants), a curated list with the most popular options might prove to be a better option, because displaying all categories would impede scannability.

Moreover, do not present the categories in a drop-down dialog. Multiple subjects explicitly stated that they had to scroll through the entire list to choose the category in which they expected to find a particular product. The problem with a drop-down quickly became clear, then: because it takes up only 50% of the available screen, getting an overview of the available categories became needlessly difficult (see Best Buy below).

Because the gesture area is also only half the size, the subjects also had a much harder time accurately controlling the scrolling speed. Lastly, the drop-down interface element was confused with a filter selection by some subjects and not recognized as the main website category navigation.


Do not follow the example of Best Buy, which does not have a category option in the main body of its home page content. Instead, a “three bars” icon takes the place of a category option in the page’s header. This not only requires all users to understand the meaning of the three bars icon, but also makes it impossible to get an overview of the store by scanning the home page. And, of course, using a drop-down to actually select a category is not ideal either.

Perfect Fold Alignment

Finally, do not design your website to have perfect alignment or white space exactly at the fold. This happens on GAP’s website, where it is easy to doubt whether the home page contains more than a search field and a few graphics (i.e. no category navigation), because these home page elements align precisely with the viewport fold (on an iPhone at least).


One subject, a bit surprised, asked, “This is it? This is the entire page?” believing this was GAP’s entire home page. When elements are spaced with pixel-perfection alignment around the viewport fold, users are more likely to misinterpret the top part as being the entire home page (in this case, missing out on the category navigation below).

To indicate more content, simply align the elements so that some are only partly viewable within the viewport on the most popular mobile devices.

Therefore, when designing a scannable home page:

  • Put very few (if any) very visually stimulating graphics above the fold on the home page, and make sure the ones that are there have a clear eye path so that the user can quickly get an overview.
  • Try to ensure that the fold (on the most popular mobile devices) partially cuts off some content, to indicate more options below.
  • Display navigation options on the home page as a list (not in a drop-down).
  • If you have only one category navigation type (such as “product type” or “department,” and not also “brand” or “store”), then show the first level of the category hierarchy directly on the home page either in full or, if there are too many options, as a curated and collapsed list of the most popular choices.
  • Only display highlighted or featured products below the search field and the category navigation options.

2. Be Sensitive To People’s Fear Of Losing Their Data

Issue: Typing on mobile devices is clumsy, so users are constantly worried about losing their inputted data.

“Argh, no! Do I have to start over? Now I’m getting angry. Doesn’t it have my shit already?,” a subject moaned, referring to his previously typed address and credit-card information, which suddenly disappeared. “Now I’m leaving. This isn’t a serious store.”

Data persistence is not something to take lightly. Your users certainly don’t. Of course, the recommendation is simple: always persist the user’s data, which requires investing in solid technology, testing thoroughly, and storing inputted data temporarily on the user’s device (most mobile browsers support localStorage). In practice, of course, this is easier said than done, and numerous websites have failed miserably, to the great frustration of users.

Because users have already suffered through many horrible experiences of lost data, they often exhibit extreme caution around certain types of elements and avoid certain interactions when possible. The following screenshot shows the types of actions and elements that particularly worry users. Either avoid these elements altogether or soothe users’ fear with the smart use of microcopy, icons and animations.

fearing-data-loss-1

During checkout, the subjects consistently opened links in a new window because they were afraid their data would be lost if they opened links in the current window.

fearing-data-loss-2

Subjects were almost always disturbed by unexpected page reloading (i.e. any page reloading that is not a direct consequence of clicking a link or button). In the image above, a subject selected a “Residence type,” which reloaded the page, causing the subject to immediately scroll up and down to ensure that none of their data was lost. We observed this type of unease with page reloading among subjects time and again throughout testing.

fearing-data-loss-3

Many subjects were scared by system dialogs and often assumed that they would lose data by clicking “OK,” even though few of them actually read the message. The subject in the test shown above wanted to go backwards in the process to pick another ticket but was met with this dialog, which he cancelled — assuming that he would have to re-enter everything if he wanted to select another ticket.

fearing-data-loss-4

A good number of the subjects believed that leaving the checkout process would destroy their data and so refused to go back and check for other products. The subject in the test above contemplated going back to find another bouquet of flowers, but decided against it because he did not want to re-enter all of his data. This happened despite many of the test websites actually remembering the users’ details, even if the users left the checkout process midway — the keyword, of course, being “many” websites, rather than “all.” Given this inconsistency, users have no way to know beforehand, so their only safe choice is to just assume the worst on all websites.

fearing-data-loss-5

During checkout, the “back” button was generally perceived by the subjects to be dangerous, and subjects used it during checkout only when they felt they were out of all other options. In many cases, this perception was justified: numerous websites did indeed fail to persist the user’s data when they used the “back” button. However, equally important is that process step links and other “back” links and buttons that were part of the website’s UI were generally considered by the subjects to be “safe.”

Therefore, including either process steps or “back” links in the checkout is crucial so that users do not feel they have to gamble by using the browser’s “back” button and can instead use your website’s dedicated UI element(s) for the purpose. In the test shown above, the subject hunted up and down to find a link or button that would take him back to the previous step, but was unable to find one. Finally, he tried the browser’s “back” button.

These were the most significant insights relating to users’ fear of lost input. In general, the subjects were vastly more pessimistic about websites on which they had once lost data. For example, clicking the keyboard’s “next” button cleared one subject’s input on a website, which made her consistently avoid that button throughout the rest of the checkout. As she said, “Here, I don’t dare click ‘Next’ anymore because I don’t want to start over again.” Not only that, the subject also became overly cautious when interacting with any fields on the website, fearing that even the slightest hiccup would destroy her data.

A single bad experience set low expectations for the rest of the website. So, how do we avoid bad experiences in cases where we are unable to persist the user’s data due to technical limitations? In these instances, clearly warn the user that they are about to do something destructive.


As the subject left the incomplete checkout, the website warned her that her data would be lost. “This is very good,” the subject remarked, “because if I did something wrong by accident, I would be extremely annoyed if they deleted everything. So, it’s good that they warn me like this if the data would otherwise be lost.”

Persisting data is always the ideal, of course, but warning the user and giving them the option to back out before destroying their data is a good secondary solution, and it sure beats simply destroying the user’s data without warning; moreover, it gives the user a chance to cancel the destructive action. This type of fallback solution could be especially useful for less common navigation paths, where persistent data is too time-consuming to implement, considering how few users it affects.

This could also entail something like persisting the user’s cart or checkout data when switching between the full website and mobile website. In these instances, it is acceptable to simply warn the user that they will lose their data if they proceed, and then give them the option to proceed (and lose their data) or stay (and keep their data).

Data persistence is clearly a complex matter, especially when one considers the user’s expectations towards data persistence. We observed subjects creating accounts merely to ensure persistence, and witnessed data lost due to accidental clicks, and we watched with as much surprise as the subject when an entire form was remembered perfectly by autofill, turning potentially horrible data loss into a small moment of joy. Data persistence is tricky, but getting it right is crucial.

3. Add A Primary Button At The Bottom Of Product Pages

Issue: Users are likely to misinterpret cart buttons in the page’s footer if there is no “Add to Cart” button at the bottom of every product page.

A wide range of the tested websites had multiple identical primary call-to-action (CTA) buttons on product pages (i.e. two “Add to Cart” buttons), one at either the top or middle of the product page and a second one at the bottom.


On Best Buy, one subject read this product’s entire specification sheet and was in the mindset of “Yes, this is the product I want to purchase.” He saw the website’s shopping-cart icon at the bottom of the page (second image above) and clicked it, believing it was an “Add to Cart” button. Logically, he assumed the product would be added to his cart and so continued browsing for more products, only to notice much later in the shopping session that the website had “deleted” his cart’s contents (the TV was never added in the first place).


The subject here on Amazon thought the shopping-cart icon was the button for adding the displayed product to her cart.

It turned out that on the websites with only one CTA button on a product page, subjects often ran into severe problems even with adding a product to their cart — which, in some cases, ultimately led to abandonments. Cart icons in the page’s header or footer were often mistaken for an “Add to Cart” button.

Both Best Buy and Amazon failed to make the primary buttons immediately obvious and generally available, which led subjects to start interpreting various icons on the page, including the cart icon, as shown in the two examples above. Subjects often scrolled to the bottom of a product’s page when looking for the “Add to Cart” button (a behavior confirmed in another study).


This subject started looking for the “Add to cart” button by scrolling to the bottom of the page, then scrolling back to the top of the page, thinking she might have missed it, and finally scrolling down again patiently, until finding the “Add to bag” button in the middle of the page.

To accommodate this behavior and reduce misinterpretation of any cart icons, add a second “Add to Cart” button to the bottom of all of your product pages. A second button there will also support a more natural interaction flow, as the user first reads the product description, then the specification sheet, then the reviews and so on, and then, at the end of the page, decides whether to buy or not. Only if the product page is extremely short (one to two mobile viewports tall) would a single button suffice.

4. Be Very Careful With Animated Carousels

IssueUsers fail to discover vital features that appear only in a carousel, and they have a hard time interacting with carousels themselves.

Animated carousels caused interaction problems for half of the test’s subjects. The carousels simply changed too quickly for some subjects to both read and select an option.


A subject was about to click the “Mega Sale” slide (left image), but the carousel animated to the next slide at the very same moment, forcing the subject to wait for that slide to reappear.

In multiple instances, a subject found a carousel slide interesting and attempted to tap it. However, the carousel changed to the next slide at the very same moment, causing the wrong slide to load. Sometimes the subjects noted this, but sometimes they did not and left the landing page immediately because they did not find it relevant to what they were looking for.

Interestingly, the “Prev” and “Next” buttons in the Toys “R” Us carousel were not used by a single subject during testing, despite these issues:


The carousel changed the very second this subject tapped it, registering a click for “Bike Blast” instead of the “Mega Sale” she wanted. The subject never noticed and assumed that “Bike Blast” was the sale.

Both of these interaction issues were also encountered (and still exist) in the early versions of carousels on full websites, but as carousels have become increasingly popular on e-commerce home pages over the last several of years, they have evolved, so most now stop animating when the user hovers over an option with the mouse.

And most also have an indicator that enables the user to see how many slides a carousel has and, just as importantly, to jump to a particular slide (such as back to the one that piqued their interest but changed too quickly). These interaction issues cannot be easily solved on mobile because there is no hover state and much less screen real estate.


On Toys “R” Us’ home page, the subjects pored over the menus to find a “Gift Guide” wizard but could not find one (image on left). It turns out there is a wizard but is accessible only via a particular slide in the rotating carousel at the top of the page.

Perhaps an even more critical usability issue is that most test subjects simply ignored the carousel after quickly glancing at the first slide. Some waited and looked at two to three slides before focusing elsewhere. This proved critical on some websites, such as Toys “R” Us’, because the majority of subjects were desperately looking in the traditional navigation for certain features (such as the “Gift Finder”) that were accessible only via the carousel. Some subjects spoke at length about how the website really should have some sort of “gift guide,” ultimately abandoning the website because they could not find one.

Users ignore animated carousels for multiple reasons. First, a carousel’s content might look like advertising, depending on how it is styled, greatly increasing the chance of banner blindness (a subgroup of subjects tended to focus much more closely on text-based navigation than on graphics-based navigation). Secondly, when using a large laptop or desktop monitor to browse a full website, the user is able to check out other options on the home page while still glancing at the carousel slides as they change.

On mobile devices, however, the screen is so small that a carousel would take up a significant portion of the viewport, making it practically impossible to scan any navigation or category options while monitoring the carousel slides (one of them will always be partly or completely out of sight). Therefore, if users are to see all options in a carousel on a mobile device, they will have to watch the carousel for its full duration (like a video clip).

Regardless of the cause(s), what is really important is that the vast majority of subjects ignored the animated carousels completely and, on the home page, focused instead on the category navigation and search features. For this reason, be very cautious about relying on carousels for important content, and never have it as the only path to a particular feature.

5. Be Careful Of Showing Product Information Or Images On Separate Subpages

Issue: Users have incredible difficulty understanding the scope of product subpages.

On a mobile device, understanding the scope of the current page is vastly more difficult for users, due to the very small display. Mobile pages often lack the subtle yet vital page-scope cues that are present on full-size pages, such as a full set of breadcrumbs, an overview of the current page, and full URL paths viewable throughout the browsing session.

This lack of scope on mobile makes having any kind of substeps or subpages that refer to a main page very risky, because the user would have to fully understand the scope of the current page in order to appreciate the difference between the subpage and main page.

no-product-sub-pages-1
When users want to see larger versions of images of an Amazon product (left), they are taken to a subpage (middle). Our test subjects clearly noticed that they were still within a product’s particular scope (because of the large product image), but they did not understand where the rest of the product page went (right).

This became immediately apparent when testing websites that offer a “larger view” option of their images, taking users to a separate product subpage, as seen on Amazon above. Because of the apparent lack of access to vital content, such as “Product Description,” “Product Specs” and “User Reviews” (which are available only on the main product page), the subjects who did not notice this change in scope assumed that such content simply did not exist for the given product and continued looking for other products with such information, discarding perfectly matching ones.


Amazon also uses subpages to show full specification lists, causing the exact same issue, except that this time subjects were unable to locate something as vital as the “Add to Cart” button.

On a mobile device, and especially on subpages, understanding the current scope is simply much more difficult. Instead, display your “larger views,” image galleries, detailed specification sheets and the like (i.e. all relevant content) directly on the product’s main page. You could also use progressive disclosure by collapsing each content section by default, to avoid overly long pages; but then be sure to have clear trigger indicators. A strategy such as this minimizes the need to display additional information and images on subpages and the resulting scope issues.

no-product-sub-pages-3

Especially with image galleries, you also have the option of an overlay, as shown above on Foot Locker. With an overlay, the user can still see the product page beneath and have a simple way to get back to it.

6. Be Thoughtful In The Design And Sequence Of Your Three Account-Selection Options

IssueUsers had difficulty figuring out how to initiate “Guest Checkout” and understanding field relationships, selection options and buttons in the account-selection steps.

On mobile, the user’s selection of a checkout type — “create an account,” “sign into account” or “guest checkout” — will be a separate step (unlike on full websites, where it could be integrated into the first step). More than half of the test subjects (60%) had serious trouble identifying, seeing and selecting the guest-checkout option at the account selection step during checkout.

Multiple times, the misunderstandings led subjects to believe that registration was required, despite it being optional, and carried all of the downsides of forced account registration (including abandonments). Therefore, the design of your account-selection screen for mobile is just as important as having a guest-checkout option at all.

Several different design schemes led to these serious misunderstandings, as the following screenshots illustrate.

account-selection-1

On Macy’s, subjects saw the account-selection step (above left) after selecting the cart. Some clicked “Express Checkout,” believing they would have a fast checkout (as a guest), only to get form-field validation errors for the two fields because “Express Checkout” requires a Macy’s account (above center). Some only discovered the “Checkout as a Guest” option further down the page (right), after getting this validation error, while others never noticed the guest-checkout option and registered for an account, believing it was required.

account-selection-2

On multiple websites (Amazon, Toys “R” Us, REI, GAP, Best Buy), subjects started to interact with the fields, such as by providing their email address (above). On REI, every single subject interacted with the email field before looking for, or figuring out that there was, a guest-checkout option.

In most cases, the subjects spotted the error before submitting the form (typically upon reaching the password field and deducing that they were on an account sign-in or creation form). In such cases, not even detailed analysis of your Web statistics and error logs would reveal these issues because no validation error ever occurs.

On Buy.com, things are even worse. The vast majority of subjects simply could not figure out the relationship between the four checkout methods (sign-in, create account, guest checkout and PayPal checkout), the two form fields, the three radio buttons and the two primary buttons. All tapped the “Checkout as a Guest” option after spending some time trying to understand the page.

Then, the naming of the “Sign in Using Our Secure Server” button utterly confused subjects because they were trying to check out as a guest (and, therefore, actively opted not to sign into anything). This particular naming has been used by Amazon for years and has even been highlighted as a best practice to indicate a secure checkout, so how could it lead to such major misinterpretation?

The reason is that it indicates the user will sign in, which makes sense only if they have an account or will create one, but not if they are checking out as a guest. (Amazon does not offer a guest-checkout option, so the wording makes sense in that context.) Given the button’s name, one subject assumed that the only other prominent button on the page, “Checkout with PayPal,” must be the one to pick to initiate the “Checkout as a guest” selection.

account-selection-4

Others finally clicked the oddly named button — but nothing seemed to happen. It turns out that inline text reading “Required” appeared next to the “Enter your eMail Address” label (seen above), but no one noticed it initially. The subjects typically waited for a little while just in case the website did not load, and then clicked again, at which point most realized that they needed to fill in more data. By this point, some, especially those who did not notice the validation error, concluded that they were not allowed to check out as a guest and proceeded to create an account instead.

One explained his experience thusly, “Normally I would think ‘guest checkout’ would let me through without having to create an account. But here I have to fill in my mail, so I have no idea what that option is for, then. To be on the safe side, I’ll then pick the ‘No, I’m a new customer,’ because if I’m forced to create an account, I might as well just do it properly anyways.”

Making the account-selection process clear is as important as offering a guest checkout option. Following two main design principles will help to prevent these serious problems:

  • Always place the guest-checkout option at the top, with its own button to proceed, so that the user does not need to fill in an email field in this step. (If needed, you can look up whether the user has an account in the next step, when you ask for their email address, to ensure that they have not selected the guest checkout just because it is the first option in the list.)
  • Collapse all of the fields and descriptions for all three options — “guest checkout,” “sign in” and “create an account” — bringing each option down to a single line, making it possible to get an overview in the viewport without having to scroll or expand. Dynamically expand them when tapped, revealing the fields and descriptions. This will also make clear which fields are related (and required) for each option.

Below, we have created a simple mockup to illustrate how account selection can be clarified by combining these two principles:


All three account-selection options are displayed in collapsed state (with guest checkout at the top), so that the user can instantly see all available options. The options can either expand inline (image on right) or redirect to the next step in the checkout process. Progressive disclosure also makes the relationship between an option and its fields much clearer.

7. Disable Autocorrection When The Dictionary Is Weak

IssuePoor autocorrection is frustrating when users notice it, and can be detrimental when they do not.

Autocorrection usually works poorly for abbreviations, street names, email addresses and similar words that are not in the dictionary. This caused significant problems throughout testing and resulted in a great deal of erroneous data being submitted as subjects completed their purchases.


When this subject typed in his street name, “westheimer,” the phone incorrectly autocorrected this to “weathermen” (left). However, the subject did not notice this, submitted the form and received a validation error (right).

One of the major issues of autocorrection was that the subjects often failed to notice the correction (because they were often focused on what they were typing, instead of what they had typed). This is fine if the “correction” is correct, but it can be detrimental if it is wrong. For example, in multiple instances, a valid address was autocorrected to an invalid one and submitted because the subject failed to notice it.

On websites without address validators, this resulted in wrong addresses being submitted, unless the subject was particularly attentive on the order review page. After all, the user’s address will often be replaced with something that looks very similar, although incorrect. In addition to the “weathermen” example, official address abbreviations, such as “Rd,” were autocorrected, to “Ed.”

That being said, autocorrection did prove very helpful when it worked. So, don’t disable it in all fields. Use it discreetly, and disable it on fields for which autocorrection dictionaries are weak. This typically includes names of various sorts (street, city, user) and other identifiers (such as email address).

You can disable autocorrection by adding an autocorrect attribute to the input tag and setting it to off, like so:


<input type="text" autocorrect="off" />

8. Make Fields Long Enough To Fully Display Common Data (And Put Labels Above Fields)

IssueUsers cannot easily spot errors, let alone correct them, when the field is too short to display the entire inputted data.

Due to the small size of mobile screens, form fields often get so short that users cannot self-validate before submitting their data, and users have a very difficult time correcting any validation errors because they cannot see the inputted data in its entirety.

field-labels-above-1
“I can’t see what I’ve typed. Argh. Then I’ll delete everything and retype it.” On REI, a validation error for an email field that was too short to be displayed in its entirety made it impossible for the subject to see what the actual error was. In trying to pan the inputted text, the subject accidentally enabled both the iOS text-selection tool and the text-replacement tool.

Form fields that are too short presented problems for many subjects who tried to confirm the validity of their data before submitting it. They often made complaints such as, “I can’t see if the emails are the same when the email field isn’t long enough.” Some examples are seen below.

field-labels-above-2
On the left: Amazon’s email field is too short, despite the abundance of white space. In the middle: United’s credit-card field shows only 15 characters, even though most card numbers are 16 digits. On the right: Macy’s email fields are too short for users to verify whether the two addresses they’ve inputted match.

Given how easy it is to make a typing mistake on a mobile device, fields that are not long enough to allow users to validate their data before submission are very harmful to the typing experience. Even worse, they make correcting any validation errors unnecessarily difficult.

Note that in the case of Amazon and the earlier example from REI, the white space is sufficient to make the field much longer, while the other two examples have no additional space to make the fields longer because the labels are all left-aligned. For this very reason, labels should be placed above form fields to allow full use of the space and to display all of the user’s data (at a decent font size). Displaying labels to the left of the fields would be acceptable only when the device is in landscape mode (as explained in detail in “Mobile Form Usability: Place Labels Above the Field”).

An adequate width for email and address lines is the full screen. Then, adjust the font size of the fields to allow for the full display of reasonably long data, such as first.lastname@my-company.com. (The character-length distribution of our own newsletter list shows that 96% of email addresses are 30 characters or fewer.)

9. Enable Users To Verify The Inputted Day And Date

IssueUsing text fields for dates requires unnecessary mental processing of the user and can cause serious selection errors.

During testing, websites that had only a simple text field or drop-down dialog for date selection presented problems for 80% of the subjects.

date-inputs-1
This subject was among the 80% who were unsure which date “this Friday” was. So, she decided to count the days on her hand, wanting to make sure she picked the right one.

This happened with both Southwest (which uses drop-downs for the month and day) and United (which shows a text field for writing MM/DD/YYYY). On both of these websites, the following scenarios occurred:

  • A handful of subjects had to count the days on their hand (as explained above).
  • Half of the subjects went off-site and opened the phone’s native calendar app to double-check the date for their weekend trip (to confirm “this Friday”). In the instance seen above, this calendar verification goes completely awry because the subject checked the day of June 15th, instead of July 15th, and ended up purchasing a flight ticket for his “weekend” trip that left on a Sunday and returned on a Tuesday.

    date-inputs-2

  • Lastly, a few struggled with typing and using the text-selection tool to enter the correct date on a website that uses a text field for date selection.

    date-inputs-3

date-inputs-4

By contrast, on the three test websites that provided a graphical interface for inputting dates in the form of a calendar view (namely, Enterprise, Avis and 1-800-Flowers, seen above), not a single one of these issues arose, and the subjects generally liked being able to verify the day and date they were selecting. This could potentially save customers from incorrectly counting or “verifying” the wrong weekday (as mentioned earlier) and thus booking the wrong date.

While this is an annoyance on desktop as well (since the user would be no better equipped to spot the errors there), the severity and impact on the user’s experience is much greater in mobile when it comes to correcting the erroneous data, because panning and editing truncated data on a three- or four-inch touchscreen is much more cumbersome than using a mouse or keyboard arrows on a desktop. Furthermore, ordering tickets on the wrong day is much less likely on the desktop because the booking form and a separate calendar application can be displayed next to each other — whereas on mobile, only one can be viewed at a time.

Therefore, always provide an interface that enables users to verify the day of their selected date. One option is to display a calendar interface in which the user explicitly selects the date they want. That would simplify the actual selection interface and, more importantly, gives users a chance to verify the day. If you already use a drop-down for date inputs and do not want to replace it, you could instead append the day after each date option (for example, “March 15 – Monday”); although that would require the month to be included in each drop-down day value or, in case a separate drop-down is used to select the month, you would need to dynamically update the day names depending on the currently selected month.

10. Make The Hit Area For Each List Item Distinct

IssueWith some lists, users simply have no idea where to tap in order to select an item.

Can the entire “element” be tapped? Or only the product title? And what about the thumbnail? During testing, multiple issues arose as subjects were unsure of where to tap in order to select an item in a list. This was by far the worst on websites where list items were above the recommended half-screen height. In fact, one subject got completely stuck and was unable to complete her purchase.

The problem was by no means limited to websites with list items that were too tall; it was just worse on those websites. The issue also extended to websites whose list items were normal in size but whose hit areas were unclear, which severely limited the subjects and even resulted in abandonments.

date-inputs-1
It simply was not clear to subjects what can and cannot be clicked on this page. Note the very inconsistent link styles. Orange is sometimes used for the header, other times for a list item. Separators are sometimes used to set off list items, other times to set off elements of text. Some text is one shade of blue, which sometimes indicates a link, while other links are styled in a darker blue and underlined. Confused yet? The subjects were, too.

date-inputs-1
Note how the subject was trying to click the “Lowest Fare” label, believing this was the button to choose the displayed flight. Besides the primary button being unclear, the list item is also very long. Combined, these two design choices are a surefire way to leave some users in doubt on how to even proceed.

date-inputs-1
On the left: This subject did not know what to click in order to proceed on United’s website. Presumably, this was caused by the single result. With no options to compare and choose between, it was not clear to the subject what to select. On the right: Many subjects did not pick up on the ticket icon and its meaning on Fandango’s website. Instead, they assumed that the movie was playing only in theaters where a “Buy” button was shown (which was not the case).

The images above show only some of the many instances where it was unclear to subjects what elements are clickable, what the differences are between the different hit areas and, most importantly, where to click in order to select an item in a list. The websites with the far fewest problems with hit areas embraced multiple of the following recommendations:

  • Make the entire element area clickable. In particular, the thumbnail, product header and price should be clickable and should lead to the product page.
  • Style the title as a link (using your primary style for text links).
  • Indicate the virtual space with an arrow or similar visual cue, showing that the entire list item will move the user to the next step in the process.
  • Consider separate “Buy Now” or select buttons for very long list items — i.e. when a list item could be easily mistaken as pieces of information, rather than a collective entity to be clicked.
  • Avoid multiple hit areas within the same visual element — in particular, links or buttons within a list item that lead to different pages.

Designing M-Commerce Websites

Aside from their practical use, these 10 recommendations have hopefully given you a glimpse of just how complex designing an m-commerce website really can be. It’s not simply a matter scaling and adding media queries; it’s an entirely new platform, and the balancing act is particularly difficult to get right due to the complex tasks involved, such as product finding and product comparison and multi-step processes such as checking out. In many ways, designing and optimizing an m-commerce website is much more difficult and often requires more “intelligent” website features than a traditional desktop e-commerce website. It comes as no surprise that IBM reports average m-commerce conversion rates that are roughly half of its desktop e-commerce conversion rates.

In general, the more complex a mobile website’s features, the more likely the experience should be significantly different from the desktop experience. The greater the difference between the two, the stronger the argument for having a standalone mobile website. Of course, maintaining two versions of the same website comes with many issues, especially with maintenance (of content, code and design). A responsive design is a better solution in some cases, but it depends very much on the size and complexity of the website, as well as on your organization’s strengths and weaknesses. It’s a nuanced issue, with many gray areas and with good arguments both for and against having a standalone mobile website.

If you can achieve this by designing for mobile first, then a responsive design could be truly great — not just in its maintainability, but also its user experience. Be clear, however, that if your existing website is complex, merely scaling it down to different devices won’t be enough to offer a great mobile experience. And if messing with the full website’s existing structure and content isn’t an option, then you might be forced to create a standalone mobile website in order to provide a decent experience — although maintaining content and code on the two separate platforms in parallel could turn out to be both expensive and messy.

Thus, getting an m-commerce website right tends to be very resource-demanding, as you account for all of the nuances. But the opportunities are great. This is a new world, and it will take time before best practices stabilize. Spending time and money on a mediocre m-commerce website is wasteful. Yes, making the website great will require significant investment, but the potential payoff is high, too. M-commerce is a window of opportunity; it enables you to distinguish yourself from competitors and to position yourself well to grab a share of this market, which is expected to reach $86 billion by 2016.

Note: Find out more about m-commerce usability guidelines in the (paid) report “M-Commerce Usability.”

(al) (il)


© Christian Holst for Smashing Magazine, 2013.


A Beginner’s Guide: Migrating A Website To WordPress Is Easier Than You Think


  

Now powering over 17% of the Web, WordPress is increasingly becoming the content management system (CMS) of choice for the average user. But what about websites built with an outdated CMS or without a CMS at all? Does moving to WordPress mean starting over and losing all the time, energy and money put into the current website? Nope!

Migrating a website (including the design) over to WordPress is actually easier than you might think. In this guide, we’ll outline the migration process and work through the steps with a sample project. We’ll also cover some of the challenges you might encounter and review the solutions.

About This Guide

Before we get to work, let’s establish some context. First, this guide was written primarily with beginners in mind and will be most helpful for basic websites. Some of you will likely encounter advanced aspects of WordPress migration, but they are beyond the scope of this guide. If you’re tackling an advanced migration and get stuck, feel free to share your difficulty in the comments below.

Objectives

The objective of this guide is to help you with the following:

  • Plan an effective migration to WordPress.
  • Walk through the technical steps involved in migrating.
  • Get ideas and resources to solve common migration challenges.

Assumptions

I assume you have basic familiarity with WordPress. Previous development experience with WordPress would be helpful, but not necessary. I also assume you have an existing website and design that you want to migrate to WordPress.

Starting With A Plan

Basic Steps

Here are the basic steps that I recommend you follow for a typical WordPress migration:

  1. Evaluate website.
    Work carefully through the pages on your existing website, identifying all of the types of content (standard pages, photo galleries, resource pages, etc.) and noting any areas that need special attention.
  2. Set up environment.
    Set up WordPress and get ready to import.
  3. Import content.
    Bring over and organize your content, whether via an importing tool, manual entry (for a small amount, when no tool is available) or a custom importing process.
  4. Migrate design.
    Incorporate your existing design into a custom WordPress theme.
  5. Review website, go live.
    Carefully review the import, making adjustments where needed, set up any URL redirects, and then go live.

With this outline in mind, let’s work through each step in detail.

Start With A Plan

The key to a successful migration is to carefully evaluate your current website. You need to figure out how to import and structure the content in WordPress before carrying over the design.

While the principles are the same across migration projects, the details often vary. So, below are two lists of questions to ask as you work out a plan.

Imported Content

  • How much content needs to be imported (number of pages, number of images, etc.)?
  • Is the volume low enough to be imported manually, or do you need a tool?
  • If you need a tool, does one already exist?
  • Can the content be categorized into the standard “posts” and “pages,” or does it call for custom post types?
  • Does extra content need to be stored for certain pages (custom fields, taxonomies, etc.)?
  • Will the URL structure change? If so, will the old URLs need to be redirected?

Existing Functionality

  • Does the website integrate any third-party services (data collection, reservations, etc.)?
  • Do any forms need to be migrated (contact forms, application forms, etc.)?
  • Is access to any content restricted (such as members-only content)?
  • Does the website sell products (digital or physical)?
  • Do any administrative tools need to be carried over (such as custom CMS functionality)?

A Working Example

My brother, Joshua Wold, has volunteered a website to serve as an example; it’s for a side project of his in which he sells posters and postcards of a Vegan Food Pyramid. He built the website in plain HTML, with some basic PHP includes for the header and footer. Below is a screencast of me evaluating the website to give you a sense of how the process will work. Enjoy!

Set Up WordPress

Before importing the content, we need to get WordPress ready to go. If you’re just experimenting or if you prefer offline development, start with a local installation of WordPress. Otherwise, the next step is to install WordPress with your current hosting provider; or you could use the migration process as a great opportunity to move to a new host.

Once WordPress is up and running, you’re ready for action!

Setting Up WordPress

For our example, we’ve installed WordPress with the same host, setting it up in a /wp directory for the duration of the migration process.

Settings and Plugins

With WordPress installed, we’ll make a few minor adjustments:

  • Update permalinks.
    Go to Settings → Permalinks to make changes. In most cases, I’ll switch to “postname”-style permalinks.
  • Update users.
    I create an admin-level account for myself and any admin or editor accounts that are needed for clients and collaborators. I also remove the default “admin” user name if it exists (a basic but wise step for WordPress security).

Depending on the needs of the project, we might have to preinstall plugins. Here are the major categories of plugins:

  • Form management
    Migrating a form “as is” is usually a mess; simply recreating it using a forms plugin is usually easier. My current favorite is Gravity Forms ($39+ per license). Other options are Formidable (with free and pro versions) and Contact Form 7 (entirely free).
  • SEO management
    Search engine optimization (SEO) is a touchy subject. My philosophy is to build content for people, not for search engines. That being said, there is a common-sense approach to SEO that is solidly supported by the WordPress plugin ecosystem. And if your old website includes custom meta descriptions, giving them a new home during the importing process is important. I recommend WordPress SEO (free).
  • Multiple languages
    If your old website supports multiple languages, WordPress has you covered. My plugin of choice is WPML ($79 per license, free for non-profits). Another option is qTranslate (free).
  • Security
    WordPress security is a topic near and dear to me. The increasing popularity of WordPress has made it a target for security attacks. WordPress itself is rarely the problem; a poorly secured hosting environment or an outdated or poorly developed plugin usually is. I use managed WordPress hosting for the majority of my projects, which offers a good foundation for solid WordPress security. Options include WPEngine, ZippyKid, Pagely and Synthesis. In addition to managed hosting (and especially if you opt for a non-managed host), consider installing a security plugin, such as Better WP Security (free) or Wordfence (also free). Last but not least, review the “Hardening WordPress” guide in the Codex.
  • Backups
    If you opt for managed hosting, backups are usually included (make sure, though). If you’re managing backups yourself or you want an extra layer of data protection, great options are available, including VaultPress ($15+ a month), CodeGuard ($5+ a month), BackupBuddy ($75+ per license) and BackWPup (free).

Import Content

With WordPress up and running, it’s time to bring over all of your content.

If your old website has a CMS, an importing tool might be available. Start by viewing the list of content-importing scripts in the Codex. If there’s a match, great! Follow the instructions and get to work. If all goes well, you’ll have migrated the content over without any trouble.

If your old CMS is not in the list or you don’t have a CMS at all and you’ve got fewer than 100 pages, then manual migration is probably the way to go. Copy and paste the contents, noting the old URLs as you go (tracking the migration in a spreadsheet is a good idea).

4

If you’ve got a custom CMS or a database of records without an importing tool and a high volume of content, then you might want to bring in a specialist to move the content over before continuing. The higher the volume of content, the higher the chance of human error and the more important automating it becomes.

For our project, I’ve migrated the content manually and replaced the existing navigation with a WordPress menu. You can watch the process in this next screencast:

Bring Over The Design

With our content in WordPress, it’s time to bring over the design. Incidentally, if you’re considering a new design, then now is a great time to look at the many excellent WordPress themes out there, both in the official repository and in third-party marketplaces such as ThemeForest and Creative Market. For our purpose, I’ll assume that you’re happy with your design.

Evaluating A Design

Evaluate the source code of a prospective design as best you can before tackling the migration. If the code is table-based or more complex than you’re comfortable with, then migrating the design might not be worth the effort. While anything is possible (I’ve migrated some complex table-based designs in my time), not everything is practical.

Working With Source Code

In my experience, the easiest way to migrate is to work directly with the source code in the browser. While having access to the original hosting environment can be helpful (especially when working with a lot of images and downloadable files), the ways that websites are built vary so widely that you’ll often have to reverse-engineer the original architecture in order to derive anything useful.

5

Going directly to the source code in your browser of choice will save a lot of time and, barring any important “behind the scenes” functionality, give you everything you need. Google Chrome is currently my browser of choice, and I’ve pulled our source-code samples directly from the browser. (In Chrome, go to Menu → Tools → View Source, or just right-click to bring up the contextual menu.)

Create A Custom Theme

If you’re new to them, learn about using themes in the Codex. For the migration process, you can either build a new WordPress theme from the ground up or modify an existing theme to meet your needs. I recommend the latter.

Most of my migration projects have started with the latest version of WordPress’ default theme (currently Twenty Twelve). Recently, I stripped down the default theme to create my own migration starter theme, which I’ll use in our example and which you’re welcome to use yourself. (Feel free to suggest improvements!) Let’s get to work.

Download a copy (ZIP) of the migration starter theme or follow along in your own theme of choice as we work through the relevant theme files.

1. Style Sheet

Our first step is to bring over the styles from the old website. In most cases, this is as simple as searching the source code for references to .css and then copying and pasting the contents from those style sheet(s) into our own style.css. Let’s get to it.

  1. Open up style.css.
  2. Replace the details of the theme (“Name,” “URI,” “Description,” etc.) with your own.
  3. Paste in the styles from the old website.

A Note About Images

As you migrate the style sheet(s), search for and update any references to images. In general, I like to keep all images in an /images/ folder within the theme’s directory. More often than not, changing the locations of images referenced in the original CSS is necessary, and I make sure to update all references in the style sheet and templates accordingly.

2. Header

The next step is to create the header for our new theme. Our objective here is to merge the structure of the current code base with WordPress’ templates. Here’s what we’re going to do:

  • Replicate the HTML structure of the old website.
  • Replace the static menu with a WordPress-powered menu.
  • Use WordPress’ title tag and leave the wp_head hook in place.
  • Merge any other relevant tags from the old header.

Let’s get into the code!

Original HTML


<!DOCTYPE HTML>
<html>
<head>
<title>Vegan Food Pyramid posters, postcards and wallpapers</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="google-site-verification" content="PO3bWDpUEh4O6XXwnmfyfxrKRDf8JsRrNIcGdzv3POs" />
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
<link rel="shortcut icon" href="http://www.veganfoodpyramid.com/favicon.ico?v=2" />
<script type="text/javascript" src="//use.typekit.net/tty6xpj.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>

</head>
<body>
<a href="http://veganfoodpyramid.com"><h1 id="logo">Vegan Food Pyramid</h1></a>
<ul class="menu">
   <li><a class="active" href="http://veganfoodpyramid.com">Products</a></li>
   <li><a href="http://veganfoodpyramid.com/wallpaper.php">Wallpaper</a></li>
   <li><a href="http://veganfoodpyramid.com/about.php">About</a></li> 
   <li><a href="http://veganfoodpyramid.com/contact.php">Contact</a></li>
</ul>

Merged Header (header.php)


<!DOCTYPE html>
<html>
<head>
   <title><?php wp_title( '|', true, 'right' ); ?></title>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <meta name="google-site-verification" content="PO3bWDpUEh4O6XXwnmfyfxrKRDf8JsRrNIcGdzv3POs" />
   <link rel="shortcut icon" href="http://www.veganfoodpyramid.com/favicon.ico?v=2" />
   <script type="text/javascript" src="//use.typekit.net/tty6xpj.js"></script>
   <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
   <?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>

   <header>
      <a href="http://veganfoodpyramid.com"><h1 id="logo">Vegan Food Pyramid</h1></a>
      <?php wp_nav_menu( array( 
            'theme_location' => 'primary',
            'container' => false,
            'menu_class' => 'menu'
      ) ); ?>
   </header>

Explanation

One of the challenges of migration is deciding whether to improve code as you go along. Our project has a few areas that could be improved, but Joshua and I agreed to leave them as is. Most of you will be tackling the migration of a design that hasn’t been coded to current best practices (although, in fairness to the original coder, they may have been best practices at the time).

Website Review

If time and opportunity allow, I encourage you to improve on the code. Otherwise, take comfort in the fact that, with the website now on WordPress, improvements will be a whole lot easier down the road.

Let’s work through the changes we’ve made!

  • Doctype
    Make sure to carry over the same doctype. In this case, the original HTML already has an HTML5 doctype (a relatively rare occurrence on old websites). Using a modern doctype in a code base written for an older specification (such as XHTML or HTML4) could break the layout (especially in old browsers).
  • Meta tags
    I usually bring over the majority of meta tags as is, replacing them in WordPress. The exception in our case is the reference to the style sheet, which is being inserted automatically via wp_enqueue_style in the functions.php file.
  • Scripts
    Scripts can be tricky. If a script belongs on every page (such as a tracking script or font script), then putting it directly in the header (or footer) file is fine. If it needs to appear only on certain pages, then a conditional tag will do the trick. As a best practice, register all scripts and add them to the header (or footer) via wp_enqueue_script. If you’re up for the challenge, I recommend doing it this way. (Check out a tutorial on enqueuing TypeKit the right way.)
  • wp_head
    Leave <?php wp_head(); ?> at the bottom of the </head> tag in the merged header file. WordPress uses wp_head, among other things, to enqueue scripts and style sheets that are referenced in the theme (usually in functions.php) and in plugins that you’ve installed. Without wp_head in place, most front-end plugins won’t work.
  • body_class
    Notice our use of the <?php body_class(); ?> tag. WordPress uses this to provide a series of helpful classes to the <body> tag depending on the page being viewed. In our example, the <body> classes weren’t being used. Yours might have unique IDs or classes on each page, in which case you can create a custom function using conditional tags to add the appropriate classes to the corresponding pages. Have a look at the Codex for some examples.
  • WordPress menus
    Switching to a WordPress-powered menu is one of the more complex tasks in most basic migrations. It will be fairly straightforward for us. We have a menu with simple markup that uses an active class (generated via PHP) to indicate which page the visitor is viewing. The wp_nav_menu function is highly flexible and offers built-in functionality to handle the current state of an element in the menu. I’ve updated the references in the style sheet to the active class and changed them to use the equivalent generated by wp_nav_menu, which is current-menu-item. Watch the screencast on importing content to see how I’ve set up the menu for our example.

And that’s a wrap! Let’s move on to the next piece.

3. Footer

The footer is usually the most uneventful template in the migration process. As with the header, our objective is to merge the relevant parts of the original source code. Let’s get to it!

Original HTML


<div id="footer"><p>© 2013 VeganFoodPyramid.com</p></div>

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-6992755-1");
pageTracker._trackPageview();
} catch(err) {}</script>

</body>
</html>

Merged Footer (footer.php)


<div id="footer"><p>© <?php echo date('Y'); ?> VeganFoodPyramid.com</p></div>

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-6992755-1");
pageTracker._trackPageview();
} catch(err) {}</script>

<?php wp_footer(); ?>

</body>
</html>

Explanation

Some footers are hard to migrate (such as ones with complex menus and widgets), but most are simple. In this case, we’ve merged the HTML with our footer template, making sure to preserve our reference to the wp_footer hook. We’ve also changed the date reference to use PHP, ensuring that it updates with each year.

4. Home Page

One of the challenges of a migration is that there are so many different ways to get the job done. The home page is a good illustration of this because it tends to be the most different from the rest of the website. Adopting the simplest method is usually best. I’ve opted to put all of the home page’s content directly in the template. Changes will be rare and can easily be made by editing the template.

Let’s look at the code, excluding the header and footer, which we’ve already covered.

Original HTML


<div id="content">

<div id="poster">
<a href="http://veganfoodpyramid.com/images/Vegan-Food-Pyramid-New.jpg"><img class="product-img" src="http://veganfoodpyramid.com/images/Vegan-Food-Pyramid-New.jpg" /></a>
<div class="description">
<h2>Poster</h2>
<p>A 30×20-inch poster illustrating over 125 vegan food items as an alternative to the traditional food pyramid. This poster will catch people’s attention and serve as a suggestion for food ideas.</p>
<h3>$30 each</h3>
<p>Includes free shipping worldwide</p>
<a class="button" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2FKQT879CXYYG">Buy</a>
</div>
</div>

<div id="postcard">
<a href="http://veganfoodpyramid.com/images/Vegan-Food-Pyramid-New.jpg"><img class="product-img" src="http://veganfoodpyramid.com/images/postcard-splash.jpg" alt="Postcard Splash" /></a>
<div class="description">
<h2>Postcards</h2>
<p>Beautiful 4×6 postcards that can be mailed and shared with friends and family. Hand them out at events. Post them on walls. Share the vegan love!</p>
<h3>$50 for 50</h3>
<p>Includes free shipping worldwide</p>
<a class="button" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EN387WHNSSFMW">Buy</a>
</div>
</div>

</div> <!-- end content -->

Merged Home Page (/page-templates/front-page.php)


<?php
/**
 * Template Name: Front Page Template
 */

get_header(); ?>

<div id="content">

   <div id="poster">
      <a href="<?php echo get_stylesheet_directory_uri(); ?>/images/Vegan-Food-Pyramid-New.jpg"><img class="product-img" src="<?php echo get_stylesheet_directory_uri(); ?>/images/Vegan-Food-Pyramid-New.jpg" /></a>
      <div class="description">
         <h2>Poster</h2>
         <p>A 30×20-inch poster illustrating over 125 vegan food items as an alternative to the traditional food pyramid. This poster will catch people’s attention and serve as a suggestion for food ideas.</p>
         <h3>$30 each</h3>
         <p>Includes free shipping worldwide</p>
         <a class="button" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2FKQT879CXYYG">Buy</a>
      </div>
   </div>

   <div id="postcard">
      <a href="<?php echo get_stylesheet_directory_uri(); ?>/images/Vegan-Food-Pyramid-New.jpg"><img class="product-img" src="<?php echo get_stylesheet_directory_uri(); ?>/images/postcard-splash.jpg" alt="Postcard Splash" /></a>
      <div class="description">
         <h2>Postcards</h2>
         <p>Beautiful 4×6 postcards that can be mailed and shared with friends and family. Hand them out at events. Post them on walls. Share the vegan love!</p>
         <h3>$50 for 50</h3>
         <p>Includes free shipping worldwide</p>
         <a class="button" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EN387WHNSSFMW">Buy</a>
      </div>
   </div>

</div> <!-- end #content -->

<?php get_footer(); ?>

Explanation

The front-page.php template begins and ends with a reference to the header and footer that we’ve just prepared. In between, we’ll merge the rest of the HTML, and we’ll use the get_stylesheet_directory_uri function, which will dynamically generate references to the images folder in our new theme.

5. Standard Page Template

With the header and footer done, the standard templates are usually quite easy. For brevity’s sake, we’ll go directly to the merged templates.

Merged Template (page.php)


<?php
/**
 * The template for displaying all pages.
 */

get_header(); ?>

<div id="content">

   <?php while ( have_posts() ) : the_post(); ?>

      <?php get_template_part( 'content', 'page' ); ?>
   
   <?php endwhile; ?>

</div>

<?php get_footer(); ?>

Content Template (content-page.php)


<?php
/**
 * The template used for displaying page content in page.php
 */
?>

   <article <?php post_class(); ?>>
      <?php the_content(); ?>
   </article>

Explanation

There are several items to point out here:

  • The loop
    If you’re new to WordPress or programming in general, this piece of code in the #content container might look intimidating. The “loop” is code used by WordPress to display a post’s content. You can learn more about the loop in the Codex. Meanwhile, just make sure that it’s in there, or else the content you save in WordPress won’t show up.
  • get_template_part
    Our page template here employs the handy get_template_part function, which is a great way to keep content organized, especially in complex projects. Our website is simple enough not to warrant it, but I left it in just to show you.
  • post_class
    I also added a reference to <article> (with the corresponding post_class function) to make further customization of the design easier.

5. Full-Width Template (full-width.php)

Although not illustrated in the screencast, the design includes a full-width template for use on the “Wallpaper” page, while the standard page template is changed to a narrow width.

Let’s have a look.

Merged Template (templates/full-width.php)


<?php
/**
 * Template Name: Full-Width Template
 */

get_header(); ?>

<div id="content" class="full-width">

   <?php while ( have_posts() ) : the_post(); ?>

      <?php get_template_part( 'content', 'page' ); ?>
   
   <?php endwhile; ?>

</div>

<?php get_footer(); ?>

Explanation

With the template created, all that remains is to assign it to a page. From the “Edit Page” interface, find the “Page Attributes” box (usually right below the “Publish” box) and select “Full-Width Template” from the “Templates” dropdown menu.

6. Extras

Now let’s tackle some of the “extras” that sometimes come up as challenges during a WordPress migration.

  • Breadcrumbs
    Breadcrumbs are relatively common on websites. The easiest way to reproduce them is with a plugin. My current favorite is Breadcrumb NavXT (free). WordPress SEO also offers built-in breadcrumbs.
  • Widgets
    If the design you’re migrating has a sidebar, you could either reproduce it as is (the migration theme has a sample sidebar in place) or integrate WordPress widgets to allow for a dynamically managed sidebar. The folks at Automattic have prepared a handy guide to widgetizing themes. Start there.
  • Restricted content
    In case some content needs to be restricted, WordPress offers basic password protection by default. If you want more control, use a plugin. For basic role management and content permissions, I recommend Members (free). For more advanced control (especially if payment is involved), consider Membership (which has basic and premium versions), s2Member (also free and premium) and WP-Members (free).
  • Custom Post Types
    Some migrations, especially ones with a lot of different types of content, call for “custom post types.” You can learn about custom post types in the Codex. To set them up, I recommend using a plugin. Two good choices are Custom Post Type UI and Types (both free).

Review Website

Now that we’ve wrapped up work on the theme, it’s time for a review. Work carefully through the pages on the migrated website. For a large website, focus on the different templates. As you review, here are some things to watch out for:

  1. Broken links
    Make sure all links work as they should. If you have only a few pages, you can check manually. For an automated check, use Integrity (free, for Mac) or Xenu’s Link Sleuth (free, for Windows).
  2. Broken styles
    Occasionally, for one reason or another, a design element of your website might have broken during the migration. Carefully compare the old HTML to the new to make sure you haven’t missed any important code and that the corresponding style sheet rules have been carried over. If all else fails, a quick rebuild of the design element on the new website might be in order.
  3. Broken functionality
    Test any functionality that you’ve migrated over, such as “Buy now” buttons, contact forms, newsletter opt-ins, “members-only” content, embedded maps, media players, etc.
  4. Temporary links
    Depending on how you’ve carried out the migration, temporary links to a subfolder or testing domain might appear in your content or theme. You’ll want to update these before going live. Use the Search and Replace plugin (free) to check for and update links in your content.

Setting Up Redirects

If your link structure has changed (and it usually will, even if only slightly), make sure that visitors are redirected from the old pages to the new. For small amounts of content, one of the easiest ways to set up redirects is by adding them to the .htaccess file.

Open the .htaccess file in the WordPress directory. If you don’t see it, set your FTP client to show hidden files. Now, create redirect rules for each of the old pages. Be sure to put these rules after WordPress’ block of rules.

Here are the rewrite rules for our links:


Redirect 301 /wallpaper.php http://veganfoodpyramid.com/wallpaper/
Redirect 301 /about.php http://veganfoodpyramid.com/about/
Redirect 301 /contact.php http://veganfoodpyramid.com/contact/
Redirect 301 /contactthanks.php http://veganfoodpyramid.com/contact/thanks/

If editing your .htaccess file is not an option or if you’re dealing with a lot of redirects, then have a look at Redirection (free).

Advanced tip: If the volume of redirects is very high (which is likely with a large-scale migration and a custom importing process), then consider building a function that hooks into template_redirect, compares a generated list of cases, and then uses the wp_redirect function to redirect any matches.

Going Live

Going live with a website usually involves one of two tasks:

  1. Relocate WordPress from the development folder to the root directory.
  2. Point the domain name from the old server to the new WordPress server.

Going Live!

Relocating WordPress

If you set up WordPress in a subfolder (as we did), then going live involves a few simple steps. Follow the guide to using a pre-existing subdirectory installation.

Once you’ve made the change, check immediately for any broken links that you may have missed in the final review.

Pointing to a New Server

If you set up WordPress on a new server, then you probably used a temporary domain. Accordingly, remove references to the temporary domain before pointing the domain to the new server.

Also, if you’re planning to update the name servers for your domain, then first resolve any dependencies in the current DNS records (such as hosted email and third-party services). I usually go live with a domain by updating the A records, leaving the name servers in place.

Conclusion

And there you have it! A successful WordPress migration is all about the details, and while this guide is by no means comprehensive, you now have a good outline of the process and a sense of some of the challenges you’ll encounter, along with ideas for solving them. If you run into challenges along the way, share them in the comments below. Now get migrating!

(al)


© Jonathan Wold for Smashing Magazine, 2013.


3D Print Your Sketches With Doodle3D

Doodle3d-nail

Feed-twFeed-fb

The talk of the tech town is all about 3D printing. From iPhone cases to guns to full-sized houses, it feels like we’ve already come close to seeing it all. But what about sketches?

A new drawing tool called Doodle3D aims to bring your playful sketches to real, three-dimensional life. The device syncs with your iPad and plugs directly into your 3D printer. After sketching a basic line drawing, like a word or stick figure, your blueprints are sent to the printer via Doodle3D’s WiFi box. Easy as that.

Granted, the creations are pretty simple — the variety of art tools appears to be similar to those from Draw Something. But if you’re only looking to print basic shapes and doodles, it might be something worth checking out Read more…

More about Videos, Crowdfunding, Ipad, Kickstarter, and 3d Printing


Do The Privacy Implications Of Google Glass Scare You?

Google Glass has some people spooked. They think that Glass turns those who wear the technology into a surveillance cyborg. Now some groups are calling upon the government to take action.

Do you think Google Glass should be banned? Let us know in the comments.

TechDirt reports that a new We The People petition submitted on May 3, a man from Seattle, Washington is requesting that the government “Ban Google Glass from use in the USA until clear limitations are placed to prevent indecent public surveillance.” As the title suggets, those who have signed are scared of the privacy implications:

Google Glass is a new twist on technology which hasn’t had clearly stated limits on the locations in US communities where it can and cannot be used. In order to protect our communities we need limitations to prevent indecent public surveillance of our friends, children, and families.

It is hard to prevent it because the hardware gives no notification that it is recording an individual at any given time.

Aside from the admittedly weak (only 34 signatures in a week) petition, a group called Stop the Cyborgs has sprung up in recent months in protest of Google Glass. It’s not like they hate Google or Glass though. They also don’t want a ban. Instead, the group argues that they just want consumers to think about what they buy and the implications of technology:

  • That there is a social, commercial and technological trend towards ubiquitous surveillance and monitoring. This trend gives a few corporations and government agencies an unprecedented amount of information about individuals and society as a whole.
  • That human decisions are becoming increasingly influenced technological systems the internal workings of which are secret and which are difficult to challenge. This trend gives a few corporations and governments an unprecedented ability to manipulate society.
  • That initiatives like internet of things, smart cities and government 2.0 are replacing the democratic process with technical systems which will be difficult to change.
  • Even if organisations do not abuse their power. The combination of wearable computing & biometrics allows everything to be linked to a single identity available to anyone you interact with. Thus for example it becomes impossible to separate your professional and personal life; it becomes impossible to be politically active without your political affiliation being known to everyone you interact with; it becomes impossible to keep your relationships private; it becomes impossible to speak or behave freely in the moment without considering how your actions might be perceived in all future contexts and all future audiences.
  • As for its specific beef with Google Glass, the group lists a number of problems it has with the technology:

  • The camera is always pointing at head height and only needs to be electronically activated to record. This allows the possibility of accidental or remote activation.
  • The devices are hands free so the person does not need to take on the role of cameraman but rather just happens to be recording. This encourages people to record data and makes it harder to tell if someone is recording compared to them pointing a camera or smart phone at you.
  • Heads up displays allow people to be fed information without others knowing they are receiving it.
  • The devices are typically tied into a central server, which aggregates and stores information.
  • Their concerns may be legitimate as hackers with early access to Glass say its relatively easy to turn the device into a surveillance tool. The obvious first thought is that people can use Glass to spy on others, but the real threat is that hackers could use Glass to spy on the person wearing them. Jay Freeman explains:

    Once the attacker has root on your Glass, they have much more power than if they had access to your phone or even your computer: they have control over a camera and a microphone that are attached to your head. A bugged Glass doesn’t just watch your every move: it watches everything you are looking at (intentionally or furtively) and hears everything you do. The only thing it doesn’t know are your thoughts.

    The obvious problem, of course, is that you might be using it in fairly private situations. Yesterday, Robert Scoble demonstrated on his Google+ feed that it survived being in the shower with him. Thankfully (for him, and possibly for us), this extreme dedication to around-the-clock usage of Glass also protects him from malicious attacks: good luck getting even a minute alone with his hardware ;P.

    However, a more subtle issue is that, in a way, it also hacks into every device you interact with. It knows all your passwords, for example, as it can watch you type them. It even manages to monitor your usage of otherwise safe, old-fashioned technology: it watches you enter door codes, it takes pictures of your keys, and it records what you write using a pen and paper. Nothing is safe once your Glass has been hacked.

    Do you think fears of Google Glass are overblown? Or do you think hackers could wreak havoc on those who choose to wear Glass? Let us know in the comments.

    I think most can agree that hardware like Glass shouldn’t be allowed in certain places. It’s totally reasonable to ban its use at bars, strip clubs and other places that respect client confidentiality. It should also probably be banned from the workplace or other locations that handle sensitive data.

    That being said, the consumer version of Glass is at least a year away. That gives Google and developers enough time to ensure that Glass respects privacy while potentially ushering in a new era of wearable computing.

    Despite all of the fear circulating around Google Glass, you probably won’t have to worry about people abusing the technology. Those who use Glass will either be too busy taking selfies in the shower or being punched in the face.

    Is Google Glass a revolution in wearable computing? Or is it a surveillance nightmare? Let us know in the comments.


    Keeping The Big picture Small: How To Avoid Duplicate Downloads In Responsive Images


      

    The <picture> element is a new addition to HTML5 that’s being championed by the W3C’s Responsive Images Community Group (RICG). It is intended to provide a declarative, markup-based solution to enable responsive images without the need of JavaScript libraries or complicated server-side detection.

    The <picture> element supports a number of different types of fallback content, but the current implementation of these fallbacks is problematic. In this article, we’ll explore how the fallbacks work, how they fail and what can be done about it.

    The <picture> Element And Fallback Content

    Like <video> and <audio>, <picture> uses <source> elements to provide a set of images that the browser can choose from. The <source> elements may optionally contain type and media attributes to let the browser know the file type and media type of the source, respectively. Given the information in the attributes, the browser should render the first <source> with a supported file type and matching media query. For example:

    
    <picture>
        <source src="landscape.webp" type="image/webp" media="screen and (min-width: 20em) and (orientation: landscape)" />
        <source src="landscape.jpg" type="image/jpg" media="screen and (min-width: 20em) and (orientation: landscape)" />
        <source src="portrait.webp" type="image/webp" media="screen and (max-width: 20em) and (orientation: portrait)" />
        <source src="portrait.jpg" type="image/jpg" media="screen and (max-width: 20em) and (orientation: portrait)" />
    </picture>
    

    For situations in which a browser doesn’t know how to deal with <picture> (or <video> or <audio>) or cannot render any of the <source> elements, a developer can include fallback content. This fallback content is often either an image or descriptive text; if the fallback content is an <img>, then a further fallback is provided in the alt attribute (or longdesc), as normal.

    
    <picture>
        <source type="image/webp" src="image.webp" />
        <source type="image/vnd.ms-photo" src="image.jxr" />
        <img src="fallback.jpg" alt="fancy pants">
    </picture>
    

    The <picture> element differs from <video> and <audio> in that it also allows srcset. The srcset attribute enables a developer to specify different images based on a device’s pixel density. When creating a responsive image using both <picture> and srcset, we might expect something like the following:

    
    <picture>
        <source srcset="big.jpg 1x, big-2x.jpg 2x, big-3x.jpg 3x" type="image/jpeg" media="(min-width: 40em)" />
        <source srcset="med.jpg 1x, med-2x.jpg 2x, med-3x.jpg 3x" type="image/jpeg" />
        <img src="fallback.jpg" alt="fancy pants" />
    </picture>
    

    The idea behind a <picture> example like this is that exactly one image should be downloaded, according to the user’s context:

    • Users with <picture> support and a viewport at least 40 ems wide should get the big image.
    • Users with <picture> support and a viewport narrower than 40 ems should get the med image.
    • Users without <picture> support should get the fallback image.

    If the browser chooses to display the big or med source, it can choose an image at an appropriate resolution based on the srcset attribute:

    • A browser on a low-resolution device (such as an iMac) should show the 1x image.
    • A browser on a higher-resolution device (such as an iPhone with a Retina display) should show the 2x image.
    • A browser on a next-generation device with even higher resolution should show the 3x image.

    The benefit to the user is that only one image file is downloaded, regardless of feature support, viewport dimensions or screen density.

    The <picture> element also has the ability to use non-image fallbacks, which should be great for accessibility: if no image can be displayed or if a user needs a description of an image, then a <p> or <span> or <table> or any other element may be included as a fallback. This allows for more robust and content-appropriate fallbacks than a simple alt attribute.

    The Fallback Problem

    Right now, the <picture> element is not supported in any shipped browsers. Developers who want to use <picture> can use Scott Jehl’s Picturefill polyfill. Also, Yoav Weiss has created a Chromium-based prototype reference implementation that has partial support for <picture>. This Chromium build not only shows that browser support for <picture> is technically possible, but also enables us to check functionality and behavior against our expectations.

    When testing examples like the above in his Chromium build, Yoav spotted a problem: even though <picture> is supported, and even though one of the first two <source> elements was being loaded, the fallback <img> was also loaded. Two images were being downloaded, even though only one was being used.

    This happens because browsers “look ahead” as HTML is being downloaded and immediately start downloading images. As Yoav explains:

    “When the parser encounters an img tag it creates an HTMLImageElement node and adds its attributes to it. When the attributes are added, the node is not aware of its parents, and when an ‘src’ attribute is added, an image download is immediately triggered.”

    This kind of “look ahead” parsing works great most of the time because the browser can start downloading images even before it has finished downloading all of the HTML. But in cases where an img element is a child of <picture> (or <video> or <audio>), the browser wouldn’t (currently) care about the parent element: it would just see an img and start downloading. The problem also occurs if we forget about the parent element and just consider an <img> that has both the src and srcset attributes: the parser would download the src image before choosing and downloading a resource from srcset.

    
    <picture>
        <source srcset="big.jpg 1x, big-2x.jpg 2x, big-3x.jpg 3x" media="(min-width: 40em)" />
        <source srcset="med.jpg 1x, med-2x.jpg 2x, med-3x.jpg 3x" />
        <img src="fallback.jpg" alt="fancy pants" />
        <!-- fallback.jpg is *always* downloaded -->
    </picture>
    
    <img src="fallback.jpg" srcset="med.jpg 1x, med-2x.jpg 2x, med-3x.jpg 3x" alt="fancy pants" />
    <!-- fallback.jpg is *always* downloaded -->
    
    <video>
        <source src="video.mp4" type="video/mp4" />
        <source src="video.webm" type="video/webm" />
        <source src="video.ogv" type="video/ogg" />
        <img src="fallback.jpg" alt="fancy pants" />
        <!-- fallback.jpg is *always* downloaded -->
    </video>
    

    In all of these cases, we would have multiple images being downloaded instead of just the one being displayed. But who cares? Well, your users who are downloading extra content and wasting time and money would care, especially the ones with bandwidth caps and slow connections. And maybe you, too, if you’re paying for the bandwidth you serve.

    A Potential Solution

    This problem needs both short- and long-term solutions.

    In the long term, we need to make sure that browser implementations of <picture> (and <video> and <audio>) can overcome this bug. For example, Robin Berjon has suggested that it might be possible to treat the contents of <picture> as inert, like the contents of <template>, and to use the Shadow DOM (see, for example, “HTML5’s New Template Tag: Standardizing Client-Side Templating”). Yoav has suggested using an attribute on <img> to indicate that the browser should wait to download the src.

    While changing the way the parser works is technically possible, it would make the implementation more complicated. Changing the parser could also affect JavaScript code and libraries that assume a download has been triggered as soon as a src attribute is added to an <img>. These long-term changes would require cooperation from browser vendors, JavaScript library creators and developers.

    In the short term, we need a working solution that avoids wasted bandwidth when experimenting with <picture> and srcset, and when using <video> and <audio> with <img> fallbacks. Because of the difficulty and time involved in updating specifications and browsers, a short-term solution would need to rely on existing tools and browser behaviors.

    So, what is currently available to us that solves this in the short term? Our old friends <object> and <embed>, both of which can be used to display images. If you load an image using these tags, it will display properly in the appropriate fallback conditions, but it won’t otherwise be downloaded.

    Different browsers behave differently according to whether we use <object>, <embed> or both. To find the best solution, I tested (using a slightly modified version of this gist) in:

    • Android browser 528.5+/4.0/525.20.1 on Android 1.6 (using a virtualized Sony Xperia X10 on BrowserStack)
    • Android browser 533.1/4.0/533.1 on Android 2.3.3 (using a virtualized Samsung Galaxy S II on BrowserStack)
    • Android browser 534.30/4.0/534.30 on Android 4.2 (using a virtualized LG Nexus 4 on BrowserStack)
    • Chrome 25.0.1364.160 on OS X 10.8.2
    • Chromium 25.0.1336.0 (169465) (RICG Build) on OS X 10.8.2
    • Firefox 19.0.2 on OS X 10.8.2
    • Internet Explorer 6.0.3790.1830 on Windows XP (using BrowserStack)
    • Internet Explorer 7.0.5730.13 on Windows XP (using BrowserStack)
    • Internet Explorer 8.0.6001.19222 on Windows 7 (using BrowserStack)
    • Internet Explorer 9.0.8112.16421 on Windows 7 (using BrowserStack)
    • Internet Explorer 10.0.9200.16384 (desktop) on Windows 8 (using BrowserStack)
    • Opera 12.14 build 1738 on OS X 10.8.2
    • Opera Mobile 9.80/2.11.355/12.10 on Android 2.3.7 (using a virtualized Samsung Galaxy Tab 10.1 on Opera Mobile Emulator for Mac)
    • Safari 6.0.2 (8536.26.17) on OS X 10.8.2
    • Safari (Mobile) 536.26/6.0/10B144/8536.25 on iOS 6.1 (10B144) (using an iPhone 4)
    • Safari (Mobile) 536.26/6.0/10B144/8536.25 on iOS 6.1 (10B141) (using an iPad 2)

    I ran five tests:

    1. <picture> falls back to <object>
    2. <picture> falls back to <embed>
    3. <picture> falls back to <object>, which falls back to <embed>
    4. <picture> falls back to <object>, which falls back to <img>
    5. <picture> falls back to <img>

    I found the following support:

    What the user sees
    Test 1 Test 2 Test 3 Test 4 Test 5
    Android 1.6 fallback image fallback image fallback image fallback image fallback image
    Android 2.3 fallback image fallback image fallback image fallback image fallback image
    Android 4.2 fallback image fallback image fallback image fallback image fallback image
    Chrome 25 fallback image fallback image fallback image fallback image fallback image
    Chromium 25 (RICG) picture/source image picture/source image picture/source image picture/source image picture/source image
    Firefox 19 fallback image fallback image fallback image fallback image fallback image
    IE 6 no image no image no image no image fallback image
    IE 7 no image no image no image no image fallback image
    IE 8 fallback image no image fallback image fallback image fallback image
    IE 9 fallback image fallback image (cropped and scrollable) fallback image fallback image fallback image
    IE 10 fallback image fallback image (cropped and scrollable) fallback image fallback image fallback image
    Opera 12.1 fallback image fallback image fallback image fallback image fallback image
    Opera Mobile 12.1 fallback image fallback image fallback image fallback image fallback image
    Safari 6 fallback image fallback image fallback image fallback image fallback image
    Safari iOS 6 (iPad) fallback image fallback image fallback image fallback image fallback image
    Safari iOS 6 (iPhone) fallback image fallback image fallback image fallback image fallback image
    HTTP requests
    Test 1 Test 2 Test 3 Test 4 Test 5
    Android 1.6 1 GET 1 GET 1 GET 2 GETs 1 GET
    Android 2.3 1 GET 1 GET 1 GET 2 GETs 1 GET
    Android 4.2 1 GET 1 GET 1 GET 2 GETs 1 GET
    Chrome 25 1 GET 1 GET 1 GET 2 GETs 1 GET
    Chromium 25 (RICG) 1 GET 1 GET 1 GET 2 GETs 2 GETs
    Firefox 19 1 GET 1 GET 2 GETs 2 GETs 1 GET
    IE 6 1 GET none 1 GET 1 GET 1 GET
    IE 7 1 GET none 1 GET 1 GET 1 GET
    IE 8 1 GET none 1 GET 1 GET 1 GET
    IE 9 1 HEAD, 1 GET 1 GET 1 HEAD, 1 GET 1 HEAD, 2 GETs 1 GET
    IE 10 1 HEAD, 1 GET 1 GET 1 HEAD, 1 GET 1 HEAD, 2 GETs 1 GET
    Opera 12.1 1 GET 1 GET 1 GET 2 GETs 1 GET
    Opera Mobile 12.1 1 GET 1 GET 1 GET 2 GETs 1 GET
    Safari 6 1 GET 1 GET 1 GET 2 GETs 1 GET
    Safari iOS 6 (iPad) 1 GET 1 GET 1 GET 2 GETs 1 GET
    Safari iOS 6 (iPhone) 1 GET 1 GET 1 GET 2 GETs 1 GET
    Image-aware context menu
    Test 1 Test 2 Test 3 Test 4 Test 5
    Android 1.6 yes yes yes yes yes
    Android 2.3 yes yes yes yes yes
    Android 4.2 yes yes yes yes yes
    Chrome 25 no no no no yes
    Chromium 25 (RICG) no no no no no
    Firefox 19 yes yes yes yes yes
    IE 6 no no no no yes
    IE 7 no no no no yes
    IE 8 yes no yes yes yes
    IE 9 yes yes yes yes yes
    IE 10 yes yes yes yes yes
    Opera 12.1 yes yes yes yes yes
    Opera Mobile 12.1 yes no yes yes yes
    Safari 6 no no no no yes
    Safari iOS 6 (iPad) no no no no yes
    Safari iOS 6 (iPhone) no no no no yes

    Making Sure The Content Is Accessible

    Although the specifics of how to provide fallback content for <picture> are still being debated (see also this thread), I wanted to test how Apple’s VoiceOver performed with different elements. For these experiments, I checked whether VoiceOver read alt attributes in various places, as well as fallback <span> elements. Unfortunately, I wasn’t able to test using other screen readers or assistive technology, although I’d love to hear about your experiences.

    Read by VoiceOver
    alt on picture alt on source (picturesource) alt on object (pictureobject) alt on embed (pictureembed) alt on embed (pictureobjectembed)
    Chrome 25 no no yes yes no
    Chromium 25 (RICG) yes no no no no
    Firefox 19 no no yes yes no
    Opera 12.1 no no no no no
    Safari 6 no no yes yes no
    Safari iOS 6 (iPad) no no yes yes no
    Safari iOS 6 (iPhone) no no yes yes no
    Read by VoiceOver
    alt on img (pictureobjectimg) alt on img (pictureimg) span (picturespan) span (pictureobjectspan)
    Chrome 25 no yes yes no
    Chromium 25 (RICG) no no no no
    Firefox 19 no yes yes no
    Opera 12.1 no no yes no
    Safari 6 no yes yes no
    Safari iOS 6 (iPad) no yes yes no
    Safari iOS 6 (iPhone) no yes yes no

    Bulletproof Syntax

    Based on these data, I’ve come up with the following “bulletproof” solution:

    
    <picture alt="fancy pants">
        <!-- loaded by browsers that support picture and that support one of the sources -->
        <source srcset="big.jpg 1x, big-2x.jpg 2x, big-3x.jpg" type="image/jpeg" media="(min-width: 40em)" />
        <source srcset="med.jpg 1x, med-2x.jpg 2x, big-3x.jpg" type="image/jpeg" />
    
        <!-- loaded by IE 8+, non-IE browsers that don’t support picture, and browsers that support picture but cannot find an appropriate source -->
        <![if gte IE 8]>
        <object data="fallback.jpg" type="image/jpeg"></object>
        <span class="fake-alt">fancy pants</span>
        <![endif]>
    
        <!-- loaded by IE 6 and 7 -->
        <!--[if lt IE 8]>
        <img src="fallback.jpg" alt="fancy pants" />
        <![endif]-->
    </picture>
    
    .fake-alt {
        border: 0;
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
    }
    

    Here we have a <picture> element, two sources to choose from for browsers that support <picture>, a fallback for most other browsers using <object> and a <span> (see note just below), and a separate <img> fallback for IE 7 and below. The empty alt prevents the actual image from being announced to screen readers, and the <span> is hidden using CSS (which is equivalent to HTML5 Boilerplate’s .visuallyhidden class) but still available to screen readers. The <embed> element is not needed.

    (Note: The use of the <span> as a fake alt is necessary so that VoiceOver reads the text in Opera. Even though Opera has a relatively small footprint, and even though it’s in the process of being switched to WebKit, I still think it’s worth our consideration. However, if you don’t care about supporting that particular browser, you could get rid of the <span> and use an alt on the <object> instead (even though that isn’t strictly allowed by the specification). This is assuming that the <span> and alt have the same content. If you have a richer fallback element, such as a <table>, using both it and a non-empty alt attribute might be desirable.)

    A similar solution should also work with <audio>, although <img> fallbacks for that element are, admittedly, rare. When dealing with <video>, the problem goes away if our fallback image is the same as our poster image. If these may be the same, then the “bulletproof” syntax for <video> would be this:

    
    <video poster="fallback.jpg">
        <!-- loaded by browsers that support video and that support one of the sources -->
        <source src="video.mp4" type="video/mp4" />
        <source src="video.webm" type="video/webm" />
        <source src="video.ogv" type="video/ogg" />
    
        <!-- loaded by browsers that don't support video, and browsers that support video but cannot find an appropriate source -->
        <img src="fallback.jpg" alt="fancy pants" />
    </video>
    

    However, if your <video> needs a separate fallback and poster image, then you might want to consider using the same structure as the <picture> solution above.

    Note that <video> and <audio> don’t have alt attributes, and even if you add them, they will be ignored by VoiceOver. For accessible video, you might want to look into the work being done with Web Video Text Tracks (WebVTT).

    Unfortunately, extensive testing with <video> and <audio> elements is beyond the scope of this article, so let us know in the comments if you find anything interesting with these.

    How Good (Or Bad) Is This Solution?

    Let’s get the bad out of the way first, shall we? This solution is hacky. It’s obviously not workable as a real, long-term solution. It is crazy verbose; no one in their right mind wants to code all of this just to put an image on a page.

    Also, semantically, we really should use an <img> element to display an image, not an <object>. That’s what <img> is for.

    And there are some practical issues:

    • Chrome and Safari won’t show proper context menus for the images, meaning that users won’t be able to open or save them easily.
    • IE 9 and 10 send an extra HEAD request along with the GET request.
    • Using a <span> as a fake alt is pretty sketchy, and although it worked for my tests in VoiceOver, it could potentially cause other accessibility problems.

    All that being said, as a short-term solution, it’s not too bad. We get these benefits:

      • A visible image in every browser is tested (<picture> and <source> when supported, and the fallback otherwise).
      • Only one HTTP GET request in every browser is tested (and the extra HEAD request and response in IE are tiny).
      • VoiceOver is supported (and is hopefully supported with other screen readers).
    
    <!-- show screenshot of network pane here -->
    

    The semantics of the solution, while not ideal, are not horrible either: the HTML5 specification states that an <object> “element can represent an external resource, which, depending on the type of the resource, will either be treated as an image, as a nested browsing context, or as an external resource to be processed by a plugin” (emphasis mine).

    And although the <span> is not as nice as a real alt attribute, using a visually hidden element for accessibility is not uncommon. Consider, for example, “Skip to content” links that are visibly hidden but available to screen readers.

    Next Steps

    The best part about this solution, though, is that it highlights how bad the current situation is. This is a real problem, and it deserves a better solution than the monstrosity I’ve proposed.

    We need discussion and participation from both developers and browser vendors on this. Getting support from browser makers is crucial; a specification can be written for any old thing, but it doesn’t become real until it is implemented in browsers. Support from developers is needed to make sure that the solution is good enough to get used in the real world. This consensus-based approach is what was used to add the <main> element to the specification recently; Steve Faulkner discusses this process a bit in his excellent interview with HTML5 Doctor.

    If you’re interested in helping to solve this problem, please consider joining the discussion:

    The next step towards a long-term solution is to achieve consensus among developers and browser vendors on how this should work. Don’t get left out of the conversation.

    Thanks to fellow RICG members Yoav Weiss, Marcos Cáceres and Mat Marquis for providing feedback on this article.

    (al)


    © David Newton for Smashing Magazine, 2013.


    Meet the World’s Cutest Baseball Fanatic

    Cutest-baseball-fan

    Feed-twFeed-fb

    “CC” is 18 months old and probably knows more about the New York Yankees than most grown-up Major League Baseball fans. Watch her drop knowledge in this adorable video

    From Babe Ruth and Joe DiMaggio to Reggie Jackson, she’s pretty much got the names down for every Yankees player to have his number retired by the team. She’s also very enthusiastic about sharing her name with a current Yankees star, but it’s her pick for team captain that a will really crack you up

    Check the video out for yourself above, then let us know what you think in the comments Read more…

    More about Kids, Baseball, Mlb, Entertainment, and Videos


    More than 70 of the world’s languages in the blink of an eye

    If you took a quick snapshot of content available on the web, you might think that everyone around the world spoke English, Chinese, French or Spanish. But in fact, millions of people around the world speak an incredible array of languages that currently have a small presence across the web.

    Google Translate helps bridge the divide between the content available online and people’s ability to access that information. Starting today, you can translate another five languages using Google, which combined are spoken by more than 183 million people around the globe:

    • Bosnian is an official language in Bosnia and Herzegovina that’s also spoken in regions of neighboring countries and by diaspora communities around the world.
    • Cebuano is one of the languages spoken in the Philippines, predominantly in the middle (Visayas) and southern (Mindanao) regions of the nation.
    • You can hear the Hmong language spoken in many countries across the world, including China, Vietnam, Laos, Thailand and throughout the United States.
    • Javanese is the second most-spoken language in Indonesia (behind Indonesian), with 83 million native speakers.
    • Marathi is spoken in India and has 73 million native speakers. Google Translate already supports several other Indian languages: Bengali, Gujarati, Hindi, Kannada, Tamil, Telugu and Urdu.

    With the exception of Bosnian, these new languages are “alpha,” meaning while the quality isn’t perfect, we will continue to test and improve them over time.

     

    You can access Translate via the web at https://translate.google.com, on your Android or iOS device, or via Chrome and in Gmail. We’re excited to reach the 70+ language milestone, and we look forward to continuing to add more languages.

    Bosnian: Google Prevodilac sada podržava više od 70 jezika!
    Cebuano: Google sa Translate misuporta na karon sa kapin sa 70 ka mga!
    Hmong: Google Translate nim no txhawb nqa tshaj li 70 hom lus!
    Javanese: Google Translate saiki ndhukung luwih saka 70 basa!
    Marathi: Google भाषांतर आता 70 पेक्षा जास्त भाषांचे समर्थन करते!

    Posted by Sveta Kelman, Program Manager, Google Translate


    More Details Leaked on the Anticipated Sony Honami

    The Sony Xperia Z is certainly a head-turner, but Sony isn’t stopping there. Next up for Sony is the Honami, also known as the Sony Xperia i1 – at least if rumors prove correct.

    So what do we know about the Honami? According to the latest leaked specs, the CPU is supposedly a Qualcomm Snapdragon 800 2.3 GHz CPU with 2GB of RAM memory. It is also believed to have a 16 or 20MP camera and a 5-inch full HD display. Other specs include water/dust resistance and a 3000 mAh battery. As for the size, the phone will be a bit on the thicker side at 10mm.

    Whether these rumored specs are accurate we can’t be sure, hopefully soon we will get some confirmation of what the Honami is actually packing directly from Sony in due time.

    What we have heard no rumors about is if it will be modeled visually off the Sony Xperia Z, or if this baby will have its own lines and style. As we know from the past, don’t take these “leaked” stats as fact, but if accurate, this sounds like it’ll be the new big daddy of the Xperia Z, and hopefully equally as impressive when it arrives on market.

    What do you think of Sony’s handsets as of late? Are you interested in the Sony i1 or not?

    [ source ]

    The post More Details Leaked on the Anticipated Sony Honami appeared first on Mobile Magazine.


    What Kind of Watch Does an Astronaut Wear in Space?

    Hadfieldwatch

    Feed-twFeed-fb

    He lives on the International Space Station, but astronaut Chris Hadfield still has to keep Earth time. However, he can’t rely on just any watch. With zero gravity and pressurized cabins, an astronaut’s timepiece has to be engineered for out-of-this-world conditions.

    Hadfield wears an Omega Speedmaster, which is certified for the thermal vacuum of a spacewalk. However, Hadfield isn’t a necessarily a trendsetter when it comes to his wristwatch. The Speedmaster has its own history in orbit: It was the first watch worn on the moon.

    In 1962, NASA purchased samples of commercially sold wristwatches to test for space missions, and the agency went with Omega’s model. NASA supplied each of the Apollo astronauts with a standard-issue Omega Speedmaster Professional manual-wind wristwatch, along with a long Velcro strap Read more…

    More about Space, Nasa, Wristwatches, Astronauts, and Tech


  • Pope Moore
  • Newsletter Subscription

    Subscribe to our free weekly newsletter.

    Our strict privacy policy keeps your email address 100% safe & secure.

  • Copyright © 1996-2010 Blogs-design.com. All rights reserved.
    iDream theme by Templates Next | Powered by WordPress