Re: accesskey in select tag

Fred . wrote:

> I can use 'accesskey' property in input tag.

You can, but should you? The accessibility experts' consensus seems to be 
that it should not be used, except perhaps in special situations. It tends 
to cause accessibility problems rather than solve them.

> But when I try to use 'accesskey' in SELECT tag, then it does not
> work.

It works, for some values of "work".

> It works in Firefox.

And on IE 8, for example.

> But W3 Validator complains that I am not allowed to have accesskey in
> select tag. Why?

Because it is not allowed there, according to the syntax definition that 
your document purports to comply with. Simple as that. A validator should 
not and will not consult any other view. We, as humans, might.

You could create a modified DTD that allows the attribute wherever you want 
to allow it, possibly according to your test results.

It's actually an odd anomaly that accesskey is not allowed in select and 
option elements according to HTML specifications. But it doesn't really 
matter, for practical reasons mentioned above.

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/ 

Received on Monday, 9 November 2009 17:57:38 UTC