[thelist] Is this a list?

Ian Anderson ian at zstudio.co.uk
Mon Sep 26 11:13:59 CDT 2005


Amanda Kuek wrote:

> I just wanted to ask how people would go about doing this. Is it best
>  to do it as, well, a list? Or would one do it with tables? (Which 
> doesn't make sense to me, seeing as it is a list, really).

Semantically, in my view this is not a data table as it does not have
headers - either row or column, and the order of the items can be
changed without impairing the meaning. The only association is between
the checkbox and the adjacent text, and they can be read in any order.
This is not enough to require data table markup. Which would be kind of 
tough to mark up anyway since you have no headers.

Actually, from an accessibility point of view the more important issue
is that the text on the right of the checkboxes should be marked up as
<label> items and associated with each checkbox using for="id".

There should also be another design element reading something like
"Choose gift:", which may be hidden in CSS, to serve as the legend for a
fieldset wrapping the table or list. This way screen reader users will hear:

"Choose gift: Cheese sandwich Feeds one normal person, or three boy
bands (checkbox not checked)"

"Choose gift: Privacy. Give the wedding couple the prrivelege of NOT
having to see you for a while (checkbox checked)"

Whether you use a table or a list is irrelevant from an access
standpoint, though a two column layout table will allow you to reproduce
the desired layout much more closely and robustly without impairing
real-world accessibility in any way. The only advantage to a list is
that the user would hear "List with three items" but in my experience of
user testing only a very small minority of screen reader users listen
closely enough to get any value from this feedback anyway.

The fieldset markup for checkboxes should read something like (forgive
the shorthand for actual form item markup):

<fieldset>
<legend>Choose gift:</legend>
<checkbox 1 id="cb1"><label for="c1">Cheese sandwich...</label>
<checkbox 2 id="cb2"><label for="c2">Privacy...</label>
...
</fieldset>


> Also, what's the general list opinion on JavaScript message boxes? I
>  thought perhaps some sort of "Are you REALLY SURE you want to commit
>  to The Fridge? Yes/No" alert would be quite handy, but if it's bad 
> practice, it'd be just as easy to have that as the next page rather 
> than as an JavaScript popup.

Alerts, with their modal dialog box and system beep, are designed to
alert the user to an error condition. They should not be used as you
describe - I would come firmly off the fence and suggest this would be
poor practice. The confirmation is part of the normal flow of the
transaction and it should be a secondary page using form controls, not
links.

This prevents browsers and caching solutions that pre-fetch subsequent
pages from inadvertently activating functionality, prevents search 
engines from spidering the next page, and allow you to
support users who have disabled JavaScript in their browsers.

Hope this helps!

Cheers

Ian


-- 
_________________________________________________
zStudio - Web development and accessibility
http://zStudio.co.uk

Snippetz.net BETA - Online code library
File, manage and re-use your code snippets online
http://snippetz.net



More information about the thelist mailing list