How to Hide “Required” from Visual Users, but Make it Available for All Others

How do most people usually designate that a field is “Required” in a web FORM? I would think that it is with an asterisk (*) after the actual INPUT field and it is sometimes made “bold” and “RED”. There are other ways to do this that are simple, use web standards, good design principles, and are 508 compliant.

When creating a FORM you should not make all fields required. By doing that nothing stands out to the person filling in your very important FORM. If most fields are required you should state at the top of the FORM or in the directions the fields that are NOT required.

Instead of just placing an asterisks after either the LABEL or the INPUT field in a FORM for a required field as most people do. You can actually place the word “Required” within the LABEL. Of course your using LABELs for your FORMS, along with FIELDSETs and LEGENDs.

Here is how to accomplish this for a web FORM and it can be easily accomplished by using a little CSS to hide the text that a field is “Required” to be filled in. The way to do this, that I use is to make it part your input fields LABEL. Here is an example of a few lines of code on how the code might look.

<label for=“username”><em>Required<em>User Name</label>

To hide the word“Required” you will be able to use the same CSS used for hiding “SKIP NAVIGATION” by adding a new class or stating that LABELs with an “EM“ in them will be displayed.hidden off the page.

Reminder please do not use “DISPLAY: NONE” in your CSS, since screen readers will not see it. Below is the CSS to visually hide the word “Required” from browsers.

.skip a, .skip a:hover, .skip a:visited, label em {
position: absolute;
left: -10000px;
top: auto;
width: 1px;
height: 1px;
overflow: hidden;
}

As you can see the CSS positions the link absolutely with a position of “LEFT” minus 10,000 pixels and a “TOP” position of auto. This will allow screen readers, Blackberries, Treos, etc. to see it but not browsers. That is as long as their CSS in turned on.

You can also place extra notes or instructions for a field inside the INPUT field with lighter text that is that will not go away once you start typing in the field. This can be done by using more CSS. Below is the XHTML code to accomplish this.

<label for=“username”><em>Required<em>User Name<strong>must not contain spaces<strong></label>

<input type=“text” name=“username” id=“username” size=“25” maxlength=“50” value=“”/>

The CSS to do this is fairly simple and follows below.

label strong {
color: #aaa;
font-size: .85em;
font-style: normal;
position: absolute;
top: 0;
right: -275px;}

Here is what the CSS is doing for the extra notes and instructions. It is first taking any STRONG elements within the LABEL and making it light gray color, the FONT-SIZE smaller and normal weight. After that it is absolutely positioned at the top left of the INPUT FORM field, as long as the LABEL is left or right justified to it and finally placing the information negative 275 pixels from the right of the beginning of the INPUT field.

Don’t forget to listen to your FORMs by using the Firefox extension Fire Vox. Here is an example how placing extra notes or instructions would look in a FORM, along with some “Required” field examples.

I hope this post is useful and further explains how to hide visual the word “Required” from my Accessibility presentation “Is your Website Accessible?”, please look for the most current presentation closer to the top of the list.

Posted in 508 Compliant, Accessibility, Adpative Technology, CSS, Design Principles, Development, Fire Vox, Firefox, FORMs, Helpful Tips, Helping Others, Layout, Programming, Screen Reader, Search, Skip Nav, Skip Navigation, Web Standards | 1 Comment

How to Set Up and Use Access Keys

Access keys allow people to use the keyboard instead of the mouse to perform certain functions. Mostly to move from page to page or a different section of the current pages content. By using web standards you can improve peoples use of your website.

Example HTML Code

The code involved to adding access keys to your website is very simple, you just have to add one extra piece of code to the links as shown below.

<li id=”about”><a href=”about.html” ACCESSKEY=”1″ tabindex=”300″>About</li>

Internet Explorer(IE), Firefox, Opera, and Safari each have their own way of using access keys. In most web browsers, the user uses the access key by pressing “ALT“ (on PC) or “CTRL“ (on MAC) simultaneously with the appropriate character on the keyboard.

The following are the different ways to use the access key function combinations broken by PC or MAC and then browser type.

PC

  • IE – press the “ALT“ key + access key and then press the “ENTER“ key to active the action.
  • Firefox 2.0“ALT“ + “SHIFT“ and access key.
  • Firefox 3.0“ALT“ + “SHIFT“ + access key and the“ENTER” key are required. I finally personally tested Firefox 3.o on Vista Basic and sometimes you need to hit “ENTER“ and other times you don’t. (UPDATED)
  • Opera – the user presses “SHIFT“ + “ESC“ followed by the access key (without “ALT“). Doing this will display the list of access keys over the current web page.

MAC

  • Firefox 2.0 -“CTRL“ + access key.
  • Firefox 3.0 – this has been changed so that the key combination only focuses on the link, “CTRL“ + access key and an “ENTER” is required after the access key combo. I have not personally tested Firefox 3.o as of yet.
  • Opera -“SHIFT“ + “ESC“ followed by the access key (without “ALT“). Doing this will display the list of access keys over the current web page.
  • Safari – “CNTL“ + access key.

Example Key Combinations

Here is an example of three access key combinations you can use for IE:

Text sizing buttons with Small (S), Medium (M), and Large (L) options.

  • ALT“ + “S“ to change to small text
  • ALT“ + “M“ to change to medium text
  • ALT“ + “L“ to change to large text
  • Finally you must click or press the “Enter “ button.

These key combinations are for IE on the PC and are used to set the text sizes that you want. You can make the text larger or smaller based on your preferences. This is what we have set up on my work website.

From some of the reading I have done I noticed that people that are creating mobile websites and applications, when doing so they are using just the numbers to make it easier for their users to navigate the website and application.

Please give these a try on your websites. I have access keys set up on my website, so please try using them with different browsers. If you have any issues please leave a comment.

Posted in Access Key, Accessibility, AccessKey, Adpative Technology, Best Practices, Content, CSS, Design, Design Patterns, Design Principles, Development, Firefox, HTML, Programming, Web Standards | 3 Comments

BarCampDC Coming Soon!!

A bunch of us have been sitting at Murky Coffee discussing the next BarCampDC.

Right now we are still looking for a venue and sponsors. We are trying to schedule it for either September and October.

I will keep you posted when we have more information and have a firm date.

Posted in BarCamp, BarCamp DC | 1 Comment

Key Points Learned at PodCampDC 2008

This blog post about PodCampDC (April 20, 2008) is way over do. I noticed it in my work in progress post list. I had started the post a long time ago and decided I would still post the few items I had listed. That I after making them into full thought and not just a short scribble of a few words.

Below are the main points I took away from the day.

When creating a podcast you should have consistent branding and highlight the program or product not the people in podcast. That way if you ever have to get new people for the show it will be less likely to die.

Justin Thorp said “You should make stuff sharable across communities”. Meaning that if you have content you need to let others be able to get at it no matter the way or where they are.

It is very important to make sure to use the same name across communities (MySpace, Facebook, Twitter, blog, Mixx, Digg, etc.) so people can easily find you. When new applications/websites start up make sure to get your use name and any other user names that you are know for so other can not grab them and then start bad mouthing you or your products.

I noticed during Aaron Brazell (Technosailor.com) and Geoff Livingston’s live podcast District of Corruption some people where getting hung up on names of websites and the like. Sometimes a website may start out as one thing and then morphed into what it is today. The real important piece is the content not the name.

There were a few things that I thought could have been better and they were? Not needing two locations, meaning that I saw no point in having to get to the Spectrum Theatre an hour early just to go over to the final location after about ten minutes of announcements. The other issue had to do with having multiple five plus rooms on three different floors and having to take the stairs to get to them.

Hope these points are useful even though they are like two months over do.

Posted in Best Practices, Design, Design Patterns, Design Principles, Development, Helpful Tips, PodCamp, PodCampDC, Podcasting | Leave a comment

Home for 4th of July

I’m currently at home in Buffalo, NY at my parents to celebrate the 4th of July holiday with my family. After driving almost 9 hours Thursday to get here I spent time with a few friends, my god son, and my parents.

Today is going to be spent with a few one of my brothers, his wife, and three boys (Denver, CO), along with one of my sisters, her husband, and three boys (Columbus, OH). Relaxing and getting ready for the big party on Saturday, which includes my other sister, her husband, and two girls (Buffalo, NY), along with my other brother (Buffalo, NY), two aunts and uncles (Rochester, NY) and a bunch of their kids and grand kids (Rochester, NY and Centreville, VA).

Today should be filled with a seeing how much all my nieces and nephews have grown over the last year, since I have seen most of them. Mostly time will be spent playing hockey in the driveway, swimming in the pool, and a whole lot of cards. We are more of a gin and euchre type of crowd. Even my almost 13 year old (in less than two weeks) and his 10 (?) brother have been playing for a few years and are fairly good last time we played.

The big crowd of 34 people does not get to my parents until Saturday around 1:00 PM. At that time there will 20 adults, if you count me and a few of the others that act like kids most days and then 14 children that are 13 and under. Most are in the 4 to 8 year old range. It should be a nice quite affair at my parents.

Hope you all have a a great 4th of July and drive safely if traveling.

Please leave a message of your plans or what you end up doing for the holiday.

Posted in Buffalo, NY, Centreville, Colorado, Columbus, OH, Denver, Fun, Mom, New York, NY, Ohio, Road Trip, Rochester, NY, Virginia, Washington, DC | 2 Comments