W3C home > Mailing lists > Public > www-validator@w3.org > November 2009

Re: accesskey in select tag

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Mon, 9 Nov 2009 19:56:17 +0200
Message-ID: <E15F364B62CD4638A723688C8EF36EC2@JukanPC>
To: "Fred ." <eldmannen@gmail.com>, <www-validator@w3.org>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:38 GMT