Recent Changes - Search:

Web Design

This website demonstrates using wikis as teaching and learning tool.

The course instructor is happy to share the teaching materials here with those who find it readable.

Web Accessibility

A Web Design Lecture by Steven Choy

Overview: Introduction to Web accessibility - How to make a more accessible website - top accessibility tips - Web accessibility standards - readings and resources for Web accessibility


Introduction

  • Web Accessibility is the practice of making websites as easy to use as possible for people with disabilities.
Web Accessibility refers to the inclusive practice of making websites usable by people of all abilities and disabilities. When sites are correctly designed, developed and edited, all users can have equal access to information and functionality. (Wikipedia, access on 8 December 2011).
"With a growing number of ways that users access the web, creating highly-accessible and universal designs that can be viewed in as many ways as possible is critical to the success of a website."

Why use accessible code?

  • Reason 1: allows your site to be accessible to a larger audience (vision impaired, motor skill impaired, cognitive impaired).
  • Reason 2: allows your site to be accessed by wider range of devices (hand helds, screen readers, text browsers, search engines)
  • Reason 3: is a requirement for Federal and State Government sites.

Steps to a more accessible website

Reference: Dive Into Accessibility, Chinese Version: 該如何讓我的網站更具親和力?

  • 01) Choose a DOCTYPE
Example:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Reference: HTML Validation: Choosing a DOCTYPE
"According to HTML standards, each HTML document requires a document type declaration. The "DOCTYPE" begins the HTML document and tells a validator which version of HTML to use in checking the document's syntax."
  • 02) Identify your language
You know what language you're writing in, so tell your readers... and their software.
Example:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<meta name="language" content="en, zh" />
  • 03) Construct meaningful page titles
Every page of your web site should have a unique and meaningful page title.
Example:
<title>A Unique and Meaningful Page Title</title>
  • 04) Provide additional navigation aids
You may be familiar with the <link> tag in relation to external stylesheets. But did you know you can also use a similar syntax to point to your home page, and to previous and next pages in a series?
      <link rel="home" title="Home" href="http://url/of/home/page" />
      <link rel="prev" title="Title of previous page" href="http://url/of/previous/page" />
      <link rel="next" title="Title of next page" href="http://url/of/next/page" />
  • 05) Present your main content first
Your main content should be put in the early part of HTML code.
  • 06) Use color safely
  • 07) Use real links
The scourge of web design is the "javascript:" link, a pseudo-link that executes a piece of Javascript code when you click on it. The most common place this problem occurs in weblogs is in the link to display comments in a separate window. Why is it a problem? Because 11% of Internet users don't use Javascript for one reason or another, including many disabled users whose browsers simply don't support it. These pseudo-links won't work for them; use real links instead.
Use the second instead of first
      <a href="javascript:OpenComments(13)">Comments (6)</a>

      <a href="/blog/mt-comments.cgi?entry_id=13" 
      onclick="OpenComments(13); return false">Comments (6)</a>
  • 08) Add titles to links
All hyperlinks can have a title, specified by the title attribute of the <a> tag. This is in addition to whatever link text you specify. The title of a link generally shows up as a tooltip in visual browsers, but it can be presented in non-visual browsers as well.
Example:
<a title="referrers and other visitor statistics" href="/stats/">Statistics</a>
Not all links should have titles. If the link text is the name of an article, don't add a title; the link text itself is descriptive enough.
But if you read the link text by itself, out of context, and can't figure out what it points to, add a title.
On each link where the link text itself might not be sufficient for the reader to decide whether to click the link, add a title attribute
  • 09) Define keyboard shortcuts
One of the least known features of HTML is the accesskey attribute for links and forms, which allows the web designer to define keyboard shortcuts for frequently-used links or form fields.
Example:
<a href="/" accesskey="1">Dive Into Accessibility</a>
How to use: in Windows + Firefox, press Shift + Alt + key
  • 10) Not open new windows
Why? (for class discussion)
"In all browsers, using the <a target="_blank"> tag to force a link to open in a new window breaks the Back button. The new window does not retain the browser history of the previous window, so the "Back" button is disabled."
  • 11) Define acronyms
The first time you use an acronym, mark it up with an <acronym> tag, like this:
      <acronym title="cascading style sheets">CSS</acronym>
You can change the look of all your acronyms using cascading style sheets.
      acronym {border-bottom: 1px dotted black;}
  • 12) Use real table headers
Example code:
    <table summary="Black plums and bosca pears ...">
       <caption>Prices for black plums and ...</caption>
       <tr>
          <td></td>
          <th>Lemons</th>
          <th>Pears</th>
       </tr>
       <tr>
          <th>Wholesale</th>
          <td>$1.00</td>
          <td>$1.50</td>
       </tr>
       <tr>
          <th>Retail</th>
          <td>$2.00</td>
          <td>$2.50</td>
       </tr>
    </table>
  • 13) Provide a summary for tables
Example:
<table summary="Monthly calendar with links to each day's posts">
  • 14) Ignore spacer images by specifying an empty alt attribute
Many designers use transparent spacer images to control the layout of their web site in visual browsers. You may use as many as you like, but you need to explicitly specify an empty alt attribute on each spacer image so that non-visual browsers know to ignore them.
Change the first to the second
      <img src="spacer.gif" width="1" height="10">

      <img src="spacer.gif" alt="" width="1" height="10">
  • 15) Use real lists
Do not use the first one, use the second one instead
      <img src="/images/fancydot.gif" width="8" height="8"> 
        <a href="http://www.slashdot.org/">Slashdot</a> <br>
      <img src="/images/fancydot.gif" width="8" height="8"> 
        <a href="http://www.theregister.co.uk/">The Register</a> <br>
      <img src="/images/fancydot.gif" width="8" height="8"> 
        <a href="http://diveintomark.org/">dive into mark</a> <br>

      <ul class="blogroll">
      <li><a href="http://www.slashdot.org/">Slashdot</a></li>
      <li><a href="http://www.theregister.co.uk/">The Register</a></li>
      <li><a href="http://diveintomark.org/">dive into mark</a></li>
      </ul>
  • 16) Provide text equivalents for images
Example
<img src="xxx" alt="yyy" />
  • 17) Provide text equivalents for image maps
If you have an image map like this:
      <img src="footer.gif" width="500" height="212" usemap="#Map">
      <map name="Map">
      <area shape="rect" coords="203,114,258,129" href="/archives.html">
      <area shape="rect" coords="277,113,348,129" href="/category/">
      <area shape="rect" coords="364,113,401,128" href="links.html">
      <area shape="rect" coords="418,114,488,130" href="leslie.html">
      <area shape="rect" coords="-4,190,131,210" href="http://www.moveabletype.org">
      </map>
Add alt text to both the main image, and to each linked area within the image map, like this:
      <img alt="Site navigation links" src="footer.gif" width="500" height="212" usemap="#Map">
      <map name="Map">
      <area alt="previously..." shape="rect" coords="203,114,258,129" href="/archives.html">
      <area alt="by category" shape="rect" coords="277,113,348,129" href="/category/">
      <area alt="about the site" shape="rect" coords="364,113,401,128" href="links.html">
      <area alt="about leslie" shape="rect" coords="418,114,488,130" href="leslie.html">
      <area alt="Powered by Movable Type" shape="rect" coords="-4,190,131,210" href="http://www.moveabletype.org">
      </map>
  • 18) Use real horizontal rules <hr />
Do not use the following as the horizontal rule
      <img src="/images/fancyrule.gif" width="442" height="25">
Use the CSS to define the look of your horizontal rule
  • 19) Use relative font sizes
  • 20) Use real headers: <h1>, <h2>,<h3>
  • 21) Label form elements
Example:
<label for="q">xyz</label>
<input type="text" id="q" name="q" value="" />
  • 22) Make everything searchable
Every web site needs a site search.
  • 23) Create an accessibility statement
If you've implemented any of the tips in this series, create an accessibility statement that lists the accessibility features of your site.

Brief Summary 1: Top 7 Accessibility Tips

(1) Write meaningful ALT text
(2) Use a spell checker
(3) Avoid abbreviations if you can
(4) Use high contrast colors, especially for text
(5) Make text scalable
(6) Use CSS to set colors
(7) Ensure links make sense out of context

Brief Summary 2: 10 Simple Web Accessibility Tips You Can Do Today

(1) Use meaningful title attributes
(2) Place important elements higher up the web page
(3) Don’t begin title attributes with the same text
(4) Use headings correctly
(5) Use distinct and meaningful page titles
(6) Use skip navigation
(7) Label your form elements
(8) Test your web pages with CSS and JavaScript disabled
(9) "See" what it’s like to use assistive technologies
(10) Web accessibility is not about degrading the overall user experience

Web Accessibility Related Standards

  • Section 508
  • Web Content Accessibility Guidelines (WCAG) 2.0
Three levels: Level A, Level AA, Level AAA

References

This book answers two questions. The first question is "Why should I make my web site more accessible?" If you do not have a web site, this book is not for you. The second question is "How can I make my web site more accessible?" If you are not convinced by the first answer, you will not be interested in the second.
WAVE is a free web accessibility evaluation tool provided by WebAIM. It is used to aid humans in the web accessibility evaluation process. Rather than providing a complex technical report, WAVE shows the original web page with embedded icons and indicators that reveal the accessibility of that page.
Most web accessibility guidelines already go hand-in-hand with website development practices. In this article, we’ll explore 10 quick and easy ways to improve your site’s accessibility.
The W3C Web Accessibility Initiative group has an introductory level document for those who want to learn about web accessibility, but don’t know where to start.
WebAIM (Web Accessibility In Mind) promotes universal design on the web and has plenty of articles on web accessibility; just studying the site’s design and HTML/CSS source code can give you an idea of what a web accessible site is.

Thanks for Reading

If you would rather like to have this lecture note in printed format, please click the print action link in the top right corner.

If you find any problem in this lecture note, please feel free to tell Steven via steven [at] findaway.hk.

Edit - History - Print - Recent Changes - Search
Page last modified on December 08, 2011, at 10:20 AM