Use of UL or OL in HTML Forms

I just finished re-reading Roger Johansson’s wonderful article entitled “Use the label element to make your HTML forms accessible“.

I agree with everything he said, except I think by putting the label and the input elements as part of an un-ordered list (UL) or an ordered list (OL) the screen reader will announce how many items are in the list. By doing so you can then place an UL or OL inside a FIELDSET, which will inform you of how many fields you need to be filled in. This number might be greater than the actual number of items if you have lines of text in the middle of the form field list.

I found this great piece of information about using UL or OL in forms from Justin Stockton when he was looking over a form I was building. He either asked “Why I was using the <BR> tag?” or “Why I had form elements inside of a <P> tag”. I told him that was how I learned to create my forms from articles I had read. He suggested using the UL or the OL for form items. After that, by like only a day or so I was listening to either one of Derek Featherstone, Aaron Gustafson, or boths podcasts about accessibile forms and they mentioned the same thing.

Here is a short  code example for filling out personal information on a form:

<fieldset>
<legend>Personal Information</legend>
<ul>
<li>
<label for=”first_name”>First Name</label>
<input type=”text” name=”first_name” id=”first_name” />
</li>
<li>
<label for=”last_name”>Last Name</label>
<input type=”text” name=”last_name” id=”last_name” />
</li>
<li>
<label for=”company”>Company</label>
<input type=”text” name=”company” id=”company” />
</li>
<li>
<label for=”title”>Title</label>
<input type=”text” name=”title” id=”title” />
</li>
</ul>
</fieldset>

Now here is what the code looks like as a form:

Personal Information




Of course you will need to use a bit of CSS to make this look better. You can remove such things as the fieldset border and do a bunch of other things to it. Here is the same example with CSS added, nothing fancy. When you use UL or OL in the fieldset you will be improving the accessibility of the form in my opinion.Please give me your thoughts on this matter of using UL or OL inside a fieldset.

Finally My Notes from An Event Apart Chicago 2007

Finally got around to finishing up my post about the actual two days at the An Event Apart conference in Chicago on August 27 – 28, 2007. I had  a great time both at the conference and at the different gatherings each evening. I learned as much if not more at the evening events as I did during the day at the conference.

Please download all my notes, below is just an overview of some of the things I learned. The following is a summary of what happened by day ad speaker.

DAY – 1

The first speaker of the conference was Eric Meyer and his topic of discussion was “Secrets of a CSS Jedi“. He showed that you could use tables and CSS to create pages that end up displaying graphs. I had seen his earlier article about this and had worked on creating forms to allow you to enter the amounts and then put out the graphs. It is now time to work on this again, since Eric has changed the graphs from being pixel based to now be EMs based.

The next presenter was Jeffrey Zeldman and he talk3d about “Writing the User Interface“. His three big points were:

  1. Content is King.
  2. Design helps people read less.
  3. When people read less every word counts.

Next to speak was Jason Santa Maria on the topic of “Designing Your Way Out of a Paper Bag“. His main topics were:

  1. Branding.
  2. Layout.
  3. Hierarchy and focal Point.

Jason also recommended three different books during his talk.

  1. Thinking with Type” Ellen Lupton
  2. “Grid Systems (Raster Systeme)”
  3. Making and Breaking Grids“ – Timothy Samara

After Jason finished talking we had like an hour and a half  lunch break. The food was great and I ate way to much.

This made the first afternoon talk by Lou Rosenfeld (“Search Analytics for Fun and Profit“) a bit uncomfortable because I ate a great deal. Lou talked a lot about making sure you review your website search information to see what people are looking for and where they go once they have searched. You might be able to make a few changes to your website that will greatly improve peoples ability to find certain information. Here are a list of his points:

Querying you Queries and Getting Started

  1. Most frequent unique queries.
  2. Frequent queries retrieving quality results.
  3. Click through rates.
  4. Most frequently clicked results/query.
  5. Frequent queries with zero results.
  6. What are referrer pages for frequent queries.

You should look for what type of meta data people are looking for in their searches.

By typing “site:jfciii.com” into Google’s search box will give you search results from the website you put after the”site:“.

Next, Liz Danzico talked about “The Seven Lies of Information Architecture

  1. Navigation should be consistent between pages on a website give or take a little bit.
  2. Allow users may need to get to any part of the website at any given time or place.
  3. User experience must be seamless.
  4. Shorter is better.

Dan Cederholm – “Interface Design Juggling

He suggests starting with colors and use two colors or less. Meaning stay in the same color range just use different tones and hues. He sometimes just goes to Photoshop and starts dumping paint using the paint can.

Two add texture use noise filter.

Make sure you read “Web Design is 95% Typography“.

Get on mailing lists for type foundries.

  1. Hoefler & Frere-Jones
  2. myfonts.com
  3. veer.com

Dan was the final speaker for day 1.

DAY – 2

Jermey Keith – Adactio.com and ClearLeft.com

Presentation slides

Be Pure with how you write your code and do your work.

You need

  1. content
  2. structure
  3. presentation
  4. behavior
  5. HTML
  6. CSS

Be Vigilant and try not to put in extra stuff to your code or content.

To build an AJAX website first build a plain website and once working correctly then add in the AJAX.

Show where things were changed or updated when using AJAX. Look at 37 signals “Yellow Fade“.

Test early and test often.

Luke Wroblewski – “Best Practices for Form Design” – Yahoo

Why Forms Matter?

  1. They make money.
  2. Give access to communities.

Label Alignment depends on what you are doing.

  1. Top alignment is better for familiar data.
  2. Right alignment is better for more difficult data. It makes you think before answering the questions.
  3. Left alignment is better for unfamilar information.

Matteo Pemzo has a great article on “Eye Tracking Data“.

Group data on forms of like kinds together using fieldsets.

Take data user gives you and format it yourself. Only give error if completly incorrect.

Derek Featherstone – “Accessibility Lost in Translation” – Box of Chocolates and FutureAhead

Presentation slides

Create an accessible user experience.

Remember to use keyboard and mouse interaction.

Require fewer page refreshes.

Screen readers need “alt text”if there is none, it reads source attribute which can be very weird.

Size forms and everything in EMs to make it scale for even borders, padding, etc. this makes it better and does not break pages easily.

Submit button should be last in code order.

Eric Meyer – “The State of CSS in an IE7 World”

He talked about IE7 adding the followig items.

  • min-width, max-width, min-height, and max-height
  • Attribute selections
  • Child selector
  • :first child
  • Alpha channelin PNG images
  • they fixed FIXED Â

and  a whole lot of other things.

Jeffrey Zeldman- “Selling Design”

Jeffrey mentioned that you should have a process. Be calm and methodical.

Remind client each time you see them of what you talked about at the last meeting, phone call, or last week.

Learn to translate what they said into something you and they understand.

Sell design not pixels.

Last but not least was

Jim Coudal – “Dealing With the Both of You” – coudal.com

He talked about

  • You need a cool flash of insperation for your projects or websites.
  • Learn quickly and be curious.
  • Value taste over everything else.
  • Work with others and have adult conversations.

He also showed three movies that he and his cmpany made.

  1. Copy Goes Here
  2. Regrets I Have a Few – Hobbies
  3. Subway – Ad Agency video

Please download all my notes, below is just an overview of some of the things I learned. Hopefully they are helpful to you and anyone else yu pass them on to.

DC PHP Developers Meeting

Last evening I went to the DC PHP Developers meeting. I had originally gone to the DC Tech Events website which is run by Ross M Karchner to check what time Thursday night the The DC Technology Network book group was meeting to go over “The Tipping Point” by Malcolm Gladwell.

I stayed at work late looking over general information about PHP, since I have not yet used the language. It is on my list of languages to learn along with Ruby on Rails.

The DC PHP Developers meeting was about jQuery and was presented by Joseph L. LeBlanc. It was held at the headquarters of Green Peace USA, in Chinatown. Joseph talked about using jQuery to do animations, by using the following effects:

  • fadeIn()
  • fadeOut()
  • hide()
  • show()
  • slideDown()
  • slideUp()
  • toggle()
  • slideToggle()
  • fadeTo()
  • animate()

He showed us a routine to check that the DOM was ready.

$(document).ready(function() {

// start code

});

or something like that. I might have missed something. Joseph has now put his jQuery presentation online and I while link to it when it’s available.

He recommended two different books about jQuery both by Karl Swedberg and Jonathan Chaffer:

He also listed a few website as references:

  1. http://docs.jquery.com
  2. http://visualjquery.com
  3. http://15daysofjquery.com
  4. http://ui.jquery.com

Once his talk was over people started asking general questions to him and to the rest of the group. One set of guys was looking for information about hosting and someone said they had used BlueHosting (for like $7.00 per month) and Simple Storage Service (S3) by Amazon for some of his client stuff. After that we talked about a bunch of things.

I even asked if people had been to either Refresh DC or BarCamp DC, the only person that had heard of either was Joesph and he had been to the BarCamp DC and not yet made a Refresh meeting. Since that was the case I made sure to explain what the events were and where to find them. Finally I talked about the new DC Technology Network and Ross’s DC Tech Events website.

Now it’s time to look over “The Tipping Point” tomorrow evenings meeting.