Design Usability
  Home arrow Design Usability arrow Page 2 - Easy as A,B,C – dynamic A to Z indexes
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Moblin 
JMSL Numerical Library 
IBMฎ developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
DESIGN USABILITY

Easy as A,B,C – dynamic A to Z indexes
By: Chris Heilmann
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 21
    2005-03-30

    Table of Contents:
  • Easy as A,B,C – dynamic A to Z indexes
  • Our friend the user agent
  • The Redmond spoiler
  • Making the list dynamic
  • Customizing the script

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Easy as A,B,C – dynamic A to Z indexes - Our friend the user agent


    (Page 2 of 5 )

    The benefit of a one page A to Z index is that it shows immediately what is available, so the visitor can pick and choose without reloading. Properly marked up, it is easy to navigate and accessible to assistive technology such as screen readers, text browsers and keyboard navigation.

    A lot of user agents let the user jump directly to a certain word simply by typing it in. Mozilla’s “find ahead” functionality, which can be activated at Tools – Options – Advanced - Accessibility, will highlight the word or link you typed in automatically for you.


    This makes it easy to navigate in large documents.

    Other assistive technology generates a list of headers and a list of links used in the document, and allows users to jump to them directly.

    Taking these options into consideration, it is pretty easy to come up with the proper HTML for an A to Z list.

    <h1>A to Z</h1>

    <h2>Navigation</h2>

    <ul id="atoz">

                <li><a href="#a">A</a></li>

                <li><a href="#b">B</a></li>

                            [… and so on …]

                <li><a href="#x">X</a></li>

                <li><a href="#y">Y</a></li>

                <li><a href="#z">Z</a></li>

    </ul>

    <div id="contents">

                <h3><a name="a" id="a">A</a></h3>

                <ul>

                            <li>Dummy</li>

                            [… and so on …]

                            <li>Dummy</li>

                </ul>

                <p class="back2"><a href="#atoz">back to navigation</a></p>

                <h3><a name="b" id="b">B</a></h3>

                <ul>

                            <li>Dummy</li>

                            [… and so on …]

                            <li>Dummy</li>

                </ul>

                <p class="back2"><a href="#atoz">back to navigation</a></p>

                [… and so on …]

                <h3><a name="z" id="z">Z</a></h3>

                <ul>

                            <li>Dummy</li>

                            [… and so on …]

                            <li>Dummy</li>

                </ul>

                <p class="back2"><a href="#atoz">back to navigation</a></p>

    </div>

    These lists are all we need to have a proper A to Z index (example: unstyledatoz.html). Users can click the letter of choice and get sent down the page to the appropriate list. Assistive technology offers the headlines as an extra list to make it even easier to reach the right list.

    We add some styles, and voila, our A to Z list turns into horizontal navigation (example:buggyatoz.html). We indicate to the visitors that they interact with it via hover effects for mouse users, and focus highlights for keyboard users.

    #atoz{

                list-style-type:none;

                margin:0;

                padding:0;

    }

    #atoz li{

                display:inline;

                list-style-type:none;

                margin:0;

                padding:0;

                padding-right:.2em;

    }

    #atoz li a{

                padding:.2em;

                background:#ccc;

                color:#000;

    }

    #atoz li a:hover{

                background:#333;

                color:#fff;

    }

    #atoz li a:active,#atoz li a:focus{

                background:#369;

                color:#fff;

    }

    More Design Usability Articles
    More By Chris Heilmann


       · Very neat article. I should have loved to get a little more about the javascript,...
     

    DESIGN USABILITY ARTICLES

    - Create Great JavaScript and CSS Menus Simply
    - Design Principles that Shape a Web Site
    - Creating Aqua Style Images
    - Easy as A,B,C – dynamic A to Z indexes
    - EasyChart: a Usability Teaching Tool to Demo...
    - Building Friendly Pop-up Windows
    - Back to School: Design Usability
    - Using HTML_QuickForm To Manage Web Forms, Pa...
    - Using HTML_QuickForm To Manage Web Forms, Pa...
    - More Website Knick Knack
    - Browsers as Test Platforms
    - Website Knick Knack
    - Dynamic Page Elements-Cloak and Dagger Web D...
    - Accessibility and Dreamweaver MX 2004







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway