Click here to get back home

xhtml - accesskey for select not allowed?

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
xhtml - accesskey for select not allowed? Udo Marx 12-11-2005
Get Chitika Premium
Posted by Udo Marx on December 11, 2005, 11:00 am
Please log in for more thread options


Greets to ciwah!

I'm doing a little webproject for a local session event.
Tryin' to meet latest standards i failed to do this:
--snip--
<select name="fromcountry" accesskey="l" title="[Alt]+[l]">
<option value="dummy">dummy</option>
</select>
--snap--
W3C validator says: there is no attribute 'accesskey'
the url:
http://www.netzteil.com/session/test.html
I included the w3c-links for test.
Plz help me out, TIA.
--
Freundliche Gruesse,
Netzteil - Udo Marx
http://www.netzteil.com

Posted by Jukka K. Korpela on December 11, 2005, 1:11 pm
Please log in for more thread options


Udo Marx wrote:

> Tryin' to meet latest standards

Why? They don't work on the WWW. XHTML works on IE only if you fake it
as classic HTML.

> i failed to do this:
> --snip--
> <select name="fromcountry" accesskey="l" title="[Alt]+[l]">
> <option value="dummy">dummy</option>
> </select>
> --snap--

Wrong approach. Country selection should _not_ be made with a dropdown,
unless you have just a handful of countries. Use a text input field, and
accept both country names and standard abbreviations.

> W3C validator says: there is no attribute 'accesskey'

Because there is no such attribute defined for <select> in the DTD you use.

In practice, forget accesskeys. Most accessibility experts regard them
as useless or harmful. Besides, title="[Alt]+[l]" would be both useless
(you would see the "hint" only when you don't need it any more) and
misleading (you cannot possibly know how accesskeys are used in the
user's environment - there might be no Alt key to begin with).

Posted by Roy Schestowitz on December 12, 2005, 7:02 am
Please log in for more thread options


__/ [Jukka K. Korpela] on Sunday 11 December 2005 11:11 \__

> Udo Marx wrote:
>
>> Greets to ciwah!
>>
>> I'm doing a little webproject for a local session event.
>> Tryin' to meet latest standards
>
> Why? They don't work on the WWW. XHTML works on IE only if you fake it
> as classic HTML.
>
>> i failed to do this:
>> --snip--
>> <select name="fromcountry" accesskey="l" title="[Alt]+[l]">
>> <option value="dummy">dummy</option>
>> </select>
>> --snap--
>
> Wrong approach. Country selection should _not_ be made with a dropdown,
> unless you have just a handful of countries. Use a text input field, and
> accept both country names and standard abbreviations.


I must say that I disagree. Most folk are unaware of standard abbreviations.
Moreover, too much freedom as in an open string leaves room for ambiguity,
frustration and requires programming that provides a level of tolerance. The
whole thing can be hard to maintain. Even if you list all countries in the
world, the size of the form would not become far larger, maybe just 5 KB
(uncompressed).


>> W3C validator says: there is no attribute 'accesskey'
>
> Because there is no such attribute defined for <select> in the DTD you use.
>
> In practice, forget accesskeys. Most accessibility experts regard them
> as useless or harmful. Besides, title="[Alt]+[l]" would be both useless
> (you would see the "hint" only when you don't need it any more) and
> misleading (you cannot possibly know how accesskeys are used in the
> user's environment - there might be no Alt key to begin with).


I have seen cases where different accesskeys get assigned on different
platforms. This is a real PITA to maintain and test.


>> the url:
>> http://www.netzteil.com/session/test.html
>> I included the w3c-links for test.
>> Plz help me out, TIA.


Roy

--
Roy S. Schestowitz
http://Schestowitz.com | SuSE Linux | PGP-Key: 0x74572E8E
6:55am up 1 day 14:03, 18 users, load average: 1.14, 0.74, 0.59

Posted by Jukka K. Korpela on December 12, 2005, 12:35 pm
Please log in for more thread options


Roy Schestowitz wrote:

> __/ [Jukka K. Korpela] on Sunday 11 December 2005 11:11 \__
>
>>Wrong approach. Country selection should _not_ be made with a dropdown,
>>unless you have just a handful of countries. Use a text input field, and
>> accept both country names and standard abbreviations.
>
> I must say that I disagree.
> Most folk are unaware of standard abbreviations.

Then they use the names, or they consult a list of abbreviations that
you link to.

> Moreover, too much freedom as in an open string leaves room for ambiguity,
> frustration and requires programming that provides a level of tolerance.

The purpose is to minimize users' problems, and this inevitably means
that the author needs to do some work, or to utilize other people's work.

> Even if you list all countries in the
> world, the size of the form would not become far larger, maybe just 5 KB
> (uncompressed).

The problem is the size experienced by users when they see a hundred
names in a list that can be scrolled down in a window of 10 or so names.
And how does it work in speech-based user agents?

> I have seen cases where different accesskeys get assigned on different
> platforms. This is a real PITA to maintain and test.

Perhaps, but how does that relate to "accesskey attributes considered
harmful", which was the message in my text that you quoted? It's
pointless to discuss the details of something that should not be used at
all.

>>>the url:
>>>http://www.netzteil.com/session/test.html
>>>I included the w3c-links for test.
>>>Plz help me out, TIA.

What was your point in quoting that without saying anything about it?

Posted by Chris Morris on December 12, 2005, 12:54 pm
Please log in for more thread options


> __/ [Jukka K. Korpela] on Sunday 11 December 2005 11:11 \__
> > Wrong approach. Country selection should _not_ be made with a dropdown,
> > unless you have just a handful of countries. Use a text input field, and
> > accept both country names and standard abbreviations.
>
> I must say that I disagree. Most folk are unaware of standard abbreviations.
> Moreover, too much freedom as in an open string leaves room for ambiguity,
> frustration and requires programming that provides a level of tolerance. The
> whole thing can be hard to maintain. Even if you list all countries in the
> world, the size of the form would not become far larger, maybe just 5 KB
> (uncompressed).

Hmm. I have a list of countries that is almost exactly
5KB. Unfortunately there's then an extra 7KB overhead from all the
<option> and </option> tags.

More importantly it's harder to use - many countries have multiple
overlapping names that could reasonably used in such a form (consider
England/United Kingdom/Great Britain) - do you include all of them, or
only one, etc. Additionally a 400-long <select> input is difficult to
use even if you know what you're looking for (harder with the mouse
than the keyboard).

With Burma/Myanmar, for example, the choice over which form to use (or
both) has capacity to offend people. Hide it behind a plain text
<input> and silently accept both behind the scenes, and no-one takes
offence.

My preferred solution is not to include a country field at all - just
have a <textarea> address field and leave it at that. In the case
where some other piece of software needs the country explicitly
identified, our solution is to:
1) use <input type="text" ...>

2) if it's not in the list of allowed countries when the form is
submitted, return an error

3) When returning the error and giving the user another go at the
form, we give an option to immediately select the five countries a
combination of soundex and levenshtein has given as 'most likely' to
be what they meant from their previous input, or to try typing in
again.

It's not perfect, and the addition of some more alternative names,
common abbreviations, etc. would be useful, but we don't tend to get
complaints about that bit going wrong.

--
Chris

Similar ThreadsPosted
How can one put an accesskey on a Select (Drop down box) November 18, 2004, 11:49 am
highlighting an accesskey April 16, 2008, 8:54 am
Invoking an objects accesskey functionality from javascript code. December 15, 2006, 7:13 pm
Tag P not allowed May 1, 2005, 4:21 am
Character & not allowed April 10, 2008, 6:06 pm
An error message... "Content is not allowed in prolog." September 12, 2004, 3:27 am
INPUT element not allowed in form, can't find my error July 8, 2004, 11:08 am
Select on my DIV November 16, 2005, 4:16 pm
February 19, 2005, 10:21 pm
Very Long Select !!! May 10, 2006, 2:13 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap