W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > October to December 2003

Re: width of dropdowns

From: <w3wai@puoli.net>
Date: Thu, 20 Nov 2003 08:21:53 +0200 (EET)
Message-ID: <55520.>
To: w3c-wai-ig@w3.org

> on some pages the site will return data to the user in the form of
> dropdowns.  the width of the dropdowns is dependent on the number of
> characters in the lines(the lines are addresses and one of them may
> only be 20 characters long, but another one may be 400 characters
> long and that would dictate the overal width).


First, I agree with comments by Jaz-Michael King.  I wonder where the
requirement to use dropdowns is coming from but you probably have your

Are the addresses mentioned in your mail postal addresses (as I would
assume) or perhaps URI addresses?  (If they were URIs, you probably would
not even think of truncating them.  Long URIs are problematic in a way
that they don't contain spaces and thus don't wrap nicely even if
presented in an other way than dropdown lists.)

How about adding a textarea to your form, presenting truncated addresses
in the dropdown lists and using some scripting to show the full address of
the selected option in the textarea? [1]

To ensure that the application is accessible also without JavaScript, you
could initially add full addresses to option texts and truncate them using
JavaScript.  (Maybe even use JavaScript to add the textarea to the form.)

Contact me if you find this suggestion interesting and require assistance
in making it work.


[1] Code example (untested):
<select name="address"
 <option value="really long full address 1">truncated addr1...</option>
 <option value="really long full address 2">truncated addr2...</option>
 <option value="really long full address 3">truncated addr3...</option>
<textarea name="real_addr">[possible explanation text as initial value]
Received on Thursday, 20 November 2003 01:21:56 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 13 October 2015 16:21:26 UTC