WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Accessibility v XHTML

for

From: Paul Bohman
Date: Jan 2, 2004 9:58AM


The label tag is not a problem for XHTML compliance, but in your
question you wrote the label tag two different ways, one of which would
be incorrect. Your code snippet doesn't have any errors that I can see,
but later you use the example of <label /> -- a self-closing tag -- that
wouldn't make sense. Depending on how you wrote the label tag in your
code, it may or may not be the problem.

However, I would like to comment on your use of the drop down form with
JavaScript, especially using the onchange method. I would discourage you
from using a drop down form element with onchange. This method makes
keyboard accessibility more difficult. Try tabbing to the drop down list
and then using the arrow keys to select the second, third, or fourth
list item. You'll probably notice that you can't do it because as soon
as you select the first item, the JavaScript is activated and it sends
you to the first link. It's better to eliminate the JavaScript and
instead include a submit button. This makes it a two-step process, but
better preserves the keyboard accessibility of the menu.

mlist wrote:

> Hi,
>
> Wonder if anyone can help. I've got a website that is currently XHTML 1.0
> Transitional compliant, but I wish to improve its accessibility compliance.
>
> The page has a drop-down, and I've put a label next to it:
>
> <label for="quickselect">Clients</label>
> <select id="quickSelect" name="clients" onchange="window.location.href > this.value;">
>
> So, this reduces the error count in Bobby, but <label /> is not XHTML
> compliant. How can I get round this and be XHTML compliant? Anyone got any
> ideas?


--
Paul Ryan Bohman
Technology Coordinator
WebAIM (Web Accessibility in Mind)
www.webaim.org
Center for Persons with Disabilities
www.cpd.usu.edu
Utah State University
www.usu.edu


----
To subscribe, unsubscribe, suspend, or view list archives,
visit http://www.webaim.org/discussion/