Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Cross-device website accessibility

Plan your website approach with devices in mind

Colin Beckingham, Researcher, Freelance
Colin Beckingham is a freelance researcher, writer, and programmer who lives in eastern Ontario, Canada. Holding degrees from Queen's University, Kingston, and the University of Windsor, he has worked in a rich variety of fields including banking, horticulture, horse racing, teaching, civil service, retail, and travel and tourism. The author of database applications and numerous newspaper, magazine, and online articles, his research interests include open source programming, VoIP, and voice-control applications on Linux. You can reach Colin at colbec@start.ca.

Summary:  Users are increasingly reading complex websites on computers with both large and small screens. Different devices offer various strengths and weaknesses when it comes to communicating with customers. In a context of sales and marketing, this article offers concrete observations on helpful practices to leverage this new reality.

Date:  17 May 2011
Level:  Intermediate PDF:  A4 and Letter (34KB | 8 pages)Get Adobe® Reader®

Activity:  3244 views
Comments:  

As an attentive and responsive web master, you follow your website statistics carefully. In your case, the numbers show remarkable changes in the past few years or even months. You see newer agents, such as Symbian and Android, and this ties in with the amazing growth of sales and use of mobile devices compared to stationary desktops. You project that this seismic shift will continue into the future as the sales of intermediate devices such as tablets increase.

In addition, you subscribe to the view that sales and marketing are not entirely the same thing. So, your website is both a sales tool and a marketing agent. For sales, it describes in great detail your products and services and invites orders; as a marketing tool, it has encouraged duplex communication between you and the client and educated you about your customer base and its changing needs. Now, you sense that the efficiency of your online tools is falling. You begin to receive feedback from mobile users that they cannot view some parts of your site while riding to work on the bus. The reality is that because devices are overwhelmingly visually oriented, large and small screens provide different services. Large screens are better at providing sales information because they have the ability to show visuals and interrelationships. Small screens are more efficient in a marketing context, with short and snappy interactions using different media. Tablets are the ideal location for ePub and PDF documents.

You are anxious to adapt to this new reality, but you are not sure what to do. When setting up the site in a purely desktop and notebook world, you found that many clever tools separated you from exposure to HTML and JavaScript. Your knowledge of HTML disappeared because of lack of use. So, you are now tied to the offerings of a content management system (CMS) or a full-blown website design application that has, until now, done a remarkably good job.

Immediate short-term patch

In the short term, if you're in a large corporation, you just buy one of each of the new devices, assign a programmer to make sure the site works on the device or make recommendations, and job done. And some CMS providers are gearing up to refine their concept of separation of data from the actual presentation to deal with mobile devices, although the small screen is obliged to present the information in a manner dictated by its big brother, the desktop.


The longer-term view

Dealing with visits from a wide variety of devices calls for a complex and impressive desktop page and a specialized mobile page. Each page has an optional link to the other. In this way, users still have a choice and can zoom in or out on the familiar page as they like. Some sites that have already attempted to address this issue pick up on the user agent in the HTTP request and herd mobile users like sheep away from the main site into a different set of pages based on that information. They think they are being helpful, but the danger is that if users are familiar with your main site and you offer them a different experience on the mobile, you risk alienating them when they don't find what they need and they don't have the option to view what they know exists.


Planning and implementation

Here are some short points to bear in mind while building pages to be viewed on both types of devices:

  • General setup:
    • Choose between (X)HTML and Wireless Markup Language (WML) for the mobile pages. Although mobile browsers can handle general HTML varieties, WML is generally specific to mobile devices. For pages to be displayed on both desktop and mobile devices, use XHTML Basic 1.1 Doctype.
    • Where should the mobile page live in the directory structure? Should it be in its own folder and its own subdomain? One advantage of placing *.wml pages in their own directory is that you can then use a server directive that changes the default page and extension for that directory. If the .htaccess file contains the line DirectoryIndex index.wml, if readers request the directory, they are automatically fed the index.wml file instead of the directory contents, even if the main domain serves PHP and HTML files by default.
    • Although ideally, each platform should have code written for it, each should keep the other in mind. Large displays can lean toward small by avoiding large images and complex JavaScript and CSS files; pages for small devices that contain markup that may not make sense on a large display can be optionally hidden.
    • If the desktop page is well-formed XHTML, advanced programmers can use the structured XML as a database of information, extracting the data and building the mobile page on the fly using PHP or another scripting language on the server side.
    • If CSS is respected on a mobile device, the float style attribute in displays is useful, because it can automatically either use the width of a wide screen or line up vertically, turning the side-to-side panning into much more convenient up-and-down scrolling.
    • Use no CSS or JavaScript on a mobile page: Some of the time, it will be ignored or patchily supported. Think in terms of plain XHTML elements and attributes. Some mobile browsers will ignore common elements, so be prepared for surprises. Yes, this is bowing to the lowest common denominator, but at least you capture the entire audience. Whether you pitch your mobile website to the lowest, average, or greatest capability of a browser is a subject for your own market research.
    • Use a carefully-worded, short title element in the head section. Mobile browsers may not handle long titles well, resulting in overlapping and unreadable text.
    • Use <div> and <p> elements sparingly. They are essential for allowing validation of the XHTML, but they force blank lines, which is poor use of mobile screen real estate. Blank areas can assist with readability, but use them sparingly to reduce the need for scrolling.
    • Text needs to be short and succinct. Say what you have to say in as few words as possible. A shorter page means less scrolling. Limit images: They may not be displayed, so provide alternate text.
    • In special cases, images can provide special benefits on mobile devices. The mobile Opera browser uses the top left corner of a page as an image when it sets up shortcuts, making your page easy to find from the shortcuts array.
    • Is it better to scroll a single monolithic page or a series of pages? Your choice—it depends on the context.
  • Usage:
    • Prominent in the body of any page, post a link for those who arrive at this page but really need the alternative version despite the difficulties they might encounter. The link needs to be in the first pageful of information that the mobile browser retrieves. It is frustrating to have to scroll all the way to the bottom of a long desktop page just to find the link to the mobile page. Minimize the link on the big page with a style attribute, because the desktop browser can handle the CSS, but if the reader is viewing your page from a mobile device that ignores CSS, it will helpfully appear full size.
    • URLs that the user must type, that are long, or that contain non-alphabetic characters may be an issue if a mobile user has a limited keyboard. It's also inconvenient to shift from alpha to numeric or special characters and back.
    • Use columns effectively. One excellent experience browsing a desktop page on a small screen is to find that panning horizontally across the page brackets a column that is a sub-portion of the original page, fitting neatly into the width limit of the small screen. Up and down scrolling without panning offers an acceptable reading experience.
    • When presenting charts, use right-hand axis labels or limit the width. Wider charts that oblige the user to pan right to view the latest data may leave the axis labels hidden, requiring left and right panning.
    • Provide content that is relevant in a mobile environment, such as clickable links to other mobile-aware sites or telephone protocols (Wireless Telephony Application Interface, tel) that initiate an interaction with the phone to make a call or send SMS. Use bar codes.
  • Validation and emulation
    • It is important to validate. Mobile browsers are less forgiving than desktop browsers. The W3C provides a cool validator for mobile contexts: See Resources for a link.
    • Many online emulators are available that give programmers an idea of what their page will look like on a particular device. Emulators show what you would get, rather than the validator, which would list what might not be displayable. Emulation might be justified if your statistics point to high use of one special device. See Resources for a link to the Android Emulator, for example.

Listing 1 shows a simple page that could be displayed on a wide variety of devices. It incorporates many of the suggestions from the list of suggestions, and might provide an acceptable user experience on any device which has at least a rudimentary HTML browser. You can use the basic HTML parts of the list of suggestions, but the WML elements are definitely a hindrance to broad device acceptance. Which coding works will depend on the capacity of the browser at the user end. As noted before, sometimes you just have to pitch to the lowest common denominator.


Listing 1. A simple hybrid HTML page
	
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN"
    "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Very few words</title>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
</head>
<body>
  <div style="float: left">
    <p>
      <a href="..." style="font-size: 75%">Our main desktop site</a>
    </p>
  </div>
  <div>
    <p>This is an example of a very simple website.</p>
  </div>
</body>
</html> 

A compromise page such as that in Listing 1 might be fine as a trial balloon in situations where the marketing or sales role and audience is unclear. You can then modify based on usage and feedback.


Conclusion

In the not-too-distant future, you will be able to point your smart phone at a plain white wall (or the back of the person sitting in front of you on the bus) and have it project clear content, no longer confined to the small screen. Then, this immediate problem goes away—but laws relating to trespass may have to be rewritten.

In the heyday of the complex web page development environment, the folks who pecked out their websites in plain HTML were laughed at and frowned upon by their colleagues, hampered by false superiority. No doubt the CMS providers are working hard at providing suitable alternative experiences based on their offerings. In the meantime, a simple editor and a knowledge of HTML can serve very well.


Resources

Learn

Get products and technologies

Discuss

About the author

Colin Beckingham is a freelance researcher, writer, and programmer who lives in eastern Ontario, Canada. Holding degrees from Queen's University, Kingston, and the University of Windsor, he has worked in a rich variety of fields including banking, horticulture, horse racing, teaching, civil service, retail, and travel and tourism. The author of database applications and numerous newspaper, magazine, and online articles, his research interests include open source programming, VoIP, and voice-control applications on Linux. You can reach Colin at colbec@start.ca.

Report abuse help

Report abuse

Thank you. This entry has been flagged for moderator attention.


Report abuse help

Report abuse

Report abuse submission failed. Please try again later.


developerWorks: Sign in


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

Choose your display name

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


Rate this article

Comments

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Web development
ArticleID=678651
ArticleTitle=Cross-device website accessibility
publish-date=05172011
author1-email=colbec@start.ca
author1-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

For articles in technology zones (such as Java technology, Linux, Open source, XML), Popular tags shows the top tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), Popular tags shows the top tags for just that product zone.

For articles in technology zones (such as Java technology, Linux, Open source, XML), My tags shows your tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), My tags shows your tags for just that product zone.

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.

Special offers