Navigation bar using list elements instead of table elements

by David Alfaro 6. October 2008 10:04

What are we facing?

You want a navigation bar that degrades gracefully on text based browsers. You will also want to have a navigation bar constructed with the correct elements to express the closest semantics to a “Navigation Bar”.

The Solution

The most currently recommended way to express Navigation Bars is using list elements. Semantically, navigation bars are simple lists of links to interest points of the site, that is, is just one dimension, it doesn’t justify the use of table elements. Tables are meant for data tabulation. Besides, tables are not friendly with text based browsers.

If you take a look at the source of this site’s Navigation Bar you will see something like:

          <ul>
                 <li><a href="http://www.aggiorno.com/default.aspx">home</a></li>
                 <li><a href="http://www.aggiorno.com/about-aggiorno.aspx">products</a></li>
                 <li><a href="http://www.aggiorno.com/try.aspx">download</a></li>
                 <li><a href="http://www.aggiorno.com/learn.aspx">aggiornings</a></li>
                 <li><a class="redlink" href="http://www.aggiorno.com/blog">blog</a></li>
                 <li><a href="http://www.aggiorno.com/contact.aspx">contact</a></li>
          </ul>

Using CSS magic, you can disable bullets, reveal content for browsers supporting CSS and hide content for those text based browsers.

Some external references

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

css | seo | idea | accessibility

Get accessible pages by replacing text with Background-Image

by David Alfaro 6. October 2008 02:35

What are we facing?

More often than not, you come up with a beautiful title design based on a font inspired by Dali's most wildest dream. Out of the blue, somebody tells you that you can't go ahead because that font may exist only in your computer, and of course in the hypothetical Dali's computer. Your mom didn't raise a fool, so you just convert the title to image, and now everybody can see it. Think twice, text based browsers (blind users do use them) can't. No problem, just add an alternate text. Not so fast, for search engines “hx” (header) and “title” elements have more SEO relevance than “alt” (alternate text) attributes, it’s just about semantic best practices.  There must be a way to let your artistic spirit be expressed, life can't be that bad.

The Solution

Wait a minute. Is not the header (just above) in font Shelley Allegro? Yes, it is. The immense majority of the computers don't have it, so I did an image of it. But if you see this post using a text based browser like Lynx, or Firefox Accessibility Extension, you will be able to see "The Solution" in plain text. It is “h2” header element. How come? Take a look at the source code.

You will  see this:

<h2 class="firh2">
	<span class="firspan">The Solution</span>
</h2>

Let's introduce the Fahrner Image Replacement method. In this post you will see the basics of that clever method. By having the text of the “h2” inside a “span” element, you can play with styles a little bit. For those having styles and images, the following  CSS will show the image we want:

 .firh2
 {
       background-image: url( "fir-the-solution.gif" );    
background-repeat: no-repeat;    
height: 31px; } .firspan
{
      display:none; }       

The "firh2" id will set image I want as the background of the header, without repetition of it and with the actual size of the image to avoid stretching. The “firspan” will hide the the text of “span”.

For those text based browsers, neither styles nor images are loaded, so the “span” content is displayed. 

Some external references

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

accessibility | css | idea | seo

CROSSLINKER as a data base of links

by David Alfaro 1. October 2008 09:59

What are we facing?

I am a webmaster of a corporate site, I have always to remember inserting a corresponding link in every mention of product X,Y and Z. That is, X phrase or word has always link Lx, Y phrase or word has always Ly and so on. The problem is that it is tough having such control always; I may forget a couple of references.

Solution

A possible to do it is having an automated tool that learns the relationships between words or phrases and their corresponding links as you build them and also it can learn for existing websites. When you finish your page or website, you apply this tool to convert to links the words or phrases the tool link in the way the tool earned.

Some external references

If you want to know about cross-linking best practices, take a look at these links:

Server location, cross-linking, and Web 2.0 technology thoughts

Hub & Spoke: How to Cross-Link Your Websites

Currently rated 4.3 by 3 people

  • Currently 4.333333/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

idea

About Aggiorno KC

Aggiorno RSS Feeds As Web developers, we are always hunting for pieces of wisdom spread all over the Web, by friends, by books, or both. Normally it requires time and effort to search and locate that wisdom and then even more to implement it. Knowledge Capsules provide you with a consolidated place to find all the specific pieces of code and advice you are commonly looking for, all provided by fellow Web developers.

IE8 Compatibility Wizard

Automatically upgrades your website to render correctly in IE8!

Internet Explorer 8 Compatibility Wizard

Get it today!


ArtinSoft Corporation ArtinSoft is Microsoft Certified Partner ISV/Software Solutions and Microsft Visual Studio Partner

With over fifteen years of experience, ArtinSoft has proven to be a key player in software evolution, by allowing customers from all over the world to ensure business continuity and compliance through software migration solutions and developer tools created upon principles of artificial intelligence. At present time, ArtinSoft Corporation remains a private firm in constant growth through a strategic partner network. Read More...